]> git.sesse.net Git - betaftpd/commitdiff
root (or in fact, any user with uid=0) can no longer login.
authorsgunderson <sgunderson>
Wed, 26 Jul 2000 02:02:29 +0000 (02:02 +0000)
committersgunderson <sgunderson>
Wed, 26 Jul 2000 02:02:29 +0000 (02:02 +0000)
cmds.c

diff --git a/cmds.c b/cmds.c
index 131df3403bf9bf32e6050da978da4e55dab1baf2..0af47825ef0aaadc3e153aae4db930209ba2c055 100644 (file)
--- a/cmds.c
+++ b/cmds.c
@@ -341,6 +341,10 @@ int cmd_pass(struct conn * const c)
        }
 #endif /* !WANT_NONROOT */
 
+       /* root should not be allowed to FTP */
+       if (c->uid == 0) {
+               c->auth = 0;
+       }
        if (c->auth == 0) {
                numeric(c, 530, "Login incorrect.");
        } else {