summaryrefslogtreecommitdiffstats
path: root/src/appl
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1999-02-18 23:34:54 +0000
committerTom Yu <tlyu@mit.edu>1999-02-18 23:34:54 +0000
commit173e6b07b767f57c50ef802da79d4f9e94f945bb (patch)
tree2eff405f886ca328d29f86389d26e40625ae2d73 /src/appl
parent6af7079089f3ff2291f2ae77173f5f008e8dfc44 (diff)
downloadkrb5-173e6b07b767f57c50ef802da79d4f9e94f945bb.tar.gz
krb5-173e6b07b767f57c50ef802da79d4f9e94f945bb.tar.xz
krb5-173e6b07b767f57c50ef802da79d4f9e94f945bb.zip
* ftpd.c (login): Add call to setluid() if necessary
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11182 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl')
-rw-r--r--src/appl/gssftp/ftpd/ChangeLog4
-rw-r--r--src/appl/gssftp/ftpd/ftpd.c11
2 files changed, 15 insertions, 0 deletions
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 <tlyu@mit.edu>
+
+ * ftpd.c (login): Add call to setluid() if necessary.
+
Fri Feb 12 21:11:18 1999 Tom Yu <tlyu@mit.edu>
* 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;