From 173e6b07b767f57c50ef802da79d4f9e94f945bb Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 18 Feb 1999 23:34:54 +0000 Subject: [PATCH] * ftpd.c (login): Add call to setluid() if necessary git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11182 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftpd/ChangeLog | 4 ++++ src/appl/gssftp/ftpd/ftpd.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index bf2c78968..eab64226d 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,7 @@ +Thu Feb 18 18:34:23 1999 Tom Yu + + * ftpd.c (login): Add call to setluid() if necessary. + Fri Feb 12 21:11:18 1999 Tom Yu * ftpd.c: strcat -> strncat diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index 897a81433..1adad89ef 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -1043,6 +1043,17 @@ login(passwd) goto bad; } } +#ifdef HAVE_SETLUID + /* + * If we're on a system which keeps track of login uids, then + * 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) { + reply(550, "Can't set luid."); + goto bad; + } +#endif if (krb5_seteuid((uid_t)pw->pw_uid) < 0) { reply(550, "Can't set uid."); goto bad; -- 2.26.2