X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmds.c;h=0af47825ef0aaadc3e153aae4db930209ba2c055;hb=70066ac4bc811c668284cc7ffd0ba949c099f7df;hp=131df3403bf9bf32e6050da978da4e55dab1baf2;hpb=4b83f8e50792b459dfd8a6ffe470c2fccb524e7b;p=betaftpd diff --git a/cmds.c b/cmds.c index 131df34..0af4782 100644 --- 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 {