Project

General

Profile

Bug #1556

no reason why passwd -e should be disallowed on FILES repo

Added by John Sonnenschein almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
cmd - userland programs
Start date:
2011-09-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

users currently cannot change their shell by policy fiat. Nobody's been able to come up with a good reason for that policy

diff --git a/usr/src/cmd/passwd/passwd.c b/usr/src/cmd/passwd/passwd.c
index e155f35..851de6f 100644
--- a/usr/src/cmd/passwd/passwd.c
+++ b/usr/src/cmd/passwd/passwd.c
@@ -1066,14 +1066,6 @@ ckarg(int argc, char **argv, attrlist **attributes)
                        if (repository.type == NULL)
                                repository = __REPFILES;

-                       /*
-                        * Only privileged process can execute this
-                        * for FILES
-                        */
-                       if (IS_FILES(repository) && (ckuid() != SUCCESS)) {
-                               retval = NOPERM;
-                               return (FAIL);
-                       }
                        if (flag & (EFLAG|SAFLAG|AGEFLAG)) {
                                retval = BADOPT;
                                return (FAIL);
diff --git a/usr/src/man/man1/passwd.1 b/usr/src/man/man1/passwd.1
index d7735dd..b9ac605 100644
--- a/usr/src/man/man1/passwd.1
+++ b/usr/src/man/man1/passwd.1
@@ -439,9 +439,7 @@ returned by \fBdomainname\fR(1M).
 .ad
 .RS 17n
 .rt  
-Changes the login shell. For the \fBfiles\fR repository, this only works for
-the superuser. Normal users can change the \fBldap\fR, \fBnis\fR, or
-\fBnisplus\fR repositories. The choice of shell is limited by the requirements
+Changes the login shell. The choice of shell is limited by the requirements
 of \fBgetusershell\fR(3C). If the user currently has a shell that is not
 allowed by \fBgetusershell\fR, only root can change it.
 .RE

History

#1

Updated by Rich Lowe almost 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Resolved in r13475 commit:f6cca4323de0

Also available in: Atom PDF