]> git.pld-linux.org Git - packages/amanda.git/blobdiff - amanda-krb5-auth.patch
perl 5.36.0 rebuild
[packages/amanda.git] / amanda-krb5-auth.patch
index ea2cd063343ad38ebdc503e00a3971697f19ac14..8888bcff83f36406522c06fb0d599b2334e9bd51 100644 (file)
@@ -1,55 +1,27 @@
---- 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 @@
+diff -urNp -x '*.orig' amanda-3.5.1.org/amandad-src/amandad.c amanda-3.5.1/amandad-src/amandad.c
+--- amanda-3.5.1.org/amandad-src/amandad.c     2017-12-01 14:26:32.000000000 +0100
++++ amanda-3.5.1/amandad-src/amandad.c 2021-05-08 10:23:15.193461026 +0200
+@@ -476,6 +476,11 @@ main(
        exit_on_qlength = 1;
      }
  
 +    /* krb5 require the euid to be 0 */
 +    if (strcasecmp(auth, "krb5") == 0) {
-+      seteuid((uid_t)0);
++      if(seteuid((uid_t)0) != 0) { error("Can't set euid to 0"); };
 +    }
 +
  #ifndef SINGLE_USERID
-     if (geteuid() == 0) {
+     if (getuid() == 0) {
        if (strcasecmp(auth, "krb5") != 0) {
-@@ -474,11 +479,6 @@
+@@ -510,11 +515,6 @@ main(
        dbprintf(_("WARNING: argv[0] not defined: check inetd.conf\n"));
      }
  
 -    /* krb5 require the euid to be 0 */
 -    if (strcasecmp(auth, "krb5") == 0) {
--      seteuid((uid_t)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.
---- amanda-3.2.0/common-src/krb5-security.c~   2010-11-29 14:24:29.826165323 +0100
-+++ amanda-3.2.0/common-src/krb5-security.c    2010-11-29 14:45:41.683165324 +0100
-@@ -46,7 +46,7 @@
- #include "et/com_err.h"
- #endif
--#define BROKEN_MEMORY_CCACHE
-+#undef BROKEN_MEMORY_CCACHE
- #ifdef BROKEN_MEMORY_CCACHE
- /*
-@@ -712,7 +712,7 @@
-     beenhere = 1;
- #ifndef BROKEN_MEMORY_CCACHE
--    putenv(stralloc("KRB5_ENV_CCNAME=MEMORY:amanda_ccache"));
-+    putenv(stralloc(KRB5_ENV_CCNAME"=MEMORY:amanda_ccache"));
- #else
-     /*
-      * MEMORY ccaches seem buggy and cause a lot of internal heap
-@@ -727,7 +727,7 @@
-       char *ccache;
-       ccache = malloc(128);
-       g_snprintf(ccache, SIZEOF(ccache),
--               "KRB5_ENV_CCNAME=FILE:/tmp/amanda_ccache.%ld.%ld",
-+               KRB5_ENV_CCNAME"=FILE:/tmp/amanda_ccache.%ld.%ld",
-                (long)geteuid(), (long)getpid());
-       putenv(ccache);
-     }
This page took 0.213489 seconds and 4 git commands to generate.