]> git.pld-linux.org Git - packages/amanda.git/blob - amanda-krb5-auth.patch
- rediff patches
[packages/amanda.git] / amanda-krb5-auth.patch
1 diff -urNp -x '*.orig' amanda-3.5.1.org/amandad-src/amandad.c amanda-3.5.1/amandad-src/amandad.c
2 --- amanda-3.5.1.org/amandad-src/amandad.c      2017-12-01 14:26:32.000000000 +0100
3 +++ amanda-3.5.1/amandad-src/amandad.c  2021-05-08 10:23:15.193461026 +0200
4 @@ -476,6 +476,11 @@ main(
5         exit_on_qlength = 1;
6      }
7  
8 +    /* krb5 require the euid to be 0 */
9 +    if (strcasecmp(auth, "krb5") == 0) {
10 +       if(seteuid((uid_t)0) != 0) { error("Can't set euid to 0"); };
11 +    }
12 +
13  #ifndef SINGLE_USERID
14      if (getuid() == 0) {
15         if (strcasecmp(auth, "krb5") != 0) {
16 @@ -510,11 +515,6 @@ main(
17         dbprintf(_("WARNING: argv[0] not defined: check inetd.conf\n"));
18      }
19  
20 -    /* krb5 require the euid to be 0 */
21 -    if (strcasecmp(auth, "krb5") == 0) {
22 -       if(seteuid((uid_t)0) != 0) { error("Can't set euid to 0"); };
23 -    }
24 -
25      /*
26       * Schedule to call protocol_accept() when new security handles
27       * are created on stdin.
This page took 0.028547 seconds and 3 git commands to generate.