]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lda: Fixed binary setuid-checking.
authorTimo Sirainen <tss@iki.fi>
Tue, 27 Oct 2009 17:10:54 +0000 (13:10 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 27 Oct 2009 17:10:54 +0000 (13:10 -0400)
--HG--
branch : HEAD

src/lda/main.c

index e2d095d0e4c5560d142686783f9727e827754b48..d108b47154a9c3f9ba44186e678531045199c423 100644 (file)
@@ -274,7 +274,7 @@ int main(int argc, char *argv[])
                        fprintf(stderr, "stat(%s) failed: %s\n",
                                argv[0], strerror(errno));
                        return EX_TEMPFAIL;
-               } else if ((st.st_mode & 1) != 0) {
+               } else if ((st.st_mode & 1) != 0 && (st.st_mode & 04000) != 0) {
                        fprintf(stderr, "%s must not be both world-executable "
                                "and setuid-root. This allows root exploits. "
                                "See http://wiki.dovecot.org/LDA#multipleuids\n",