--- amanda-3.2.0/amandad-src/amandad.c~ 2010-10-06 18:36:28.000000000 +0200 +++ amanda-3.2.0/amandad-src/amandad.c 2010-11-29 14:23:20.580165324 +0100 @@ -440,6 +440,11 @@ exit_on_qlength = 1; } + /* krb5 require the euid to be 0 */ + if (strcasecmp(auth, "krb5") == 0) { + if(seteuid((uid_t)0) != 0) { error("Can't set euid to 0"); }; + } + #ifndef SINGLE_USERID if (geteuid() == 0) { if (strcasecmp(auth, "krb5") != 0) { @@ -474,11 +479,6 @@ dbprintf(_("WARNING: argv[0] not defined: check inetd.conf\n")); } - /* krb5 require the euid to be 0 */ - if (strcasecmp(auth, "krb5") == 0) { - if(seteuid((uid_t)0) != 0) { error("Can't set euid to 0"); }; - } - /* * Schedule to call protocol_accept() when new security handles * are created on stdin.