diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/appl/gssftp/ftpd/ChangeLog | 6 | ||||
| -rw-r--r-- | src/appl/gssftp/ftpd/ftpd.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index 3c7727883..c84e77028 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,9 @@ +Thu Mar 25 23:13:56 1999 Tom Yu <tlyu@mit.edu> + + * ftpd.c (login): Check that the luid is not the uid we want to + change to prior to calling setluid() so that we can run as + non-root. + Wed Mar 24 17:11:32 1999 Tom Yu <tlyu@mit.edu> * ftpcmd.y (urgsafe_getc): New function; like getc() except it diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index f880734a5..d4987affc 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -1093,7 +1093,8 @@ login(passwd) * set the login uid. If this fails this opens up a problem on DEC OSF * with C2 enabled. */ - if (setluid((uid_t)pw->pw_uid) < 0) { + if (((uid_t)getluid() != pw->pw_uid) + && setluid((uid_t)pw->pw_uid) < 0) { reply(550, "Can't set luid."); goto bad; } |
