components/krb5/patches/037-getuid-mod.patch
changeset 6867 87f7fd05f888
parent 6599 1d033832c5e7
child 6978 14cbeb78966a
equal deleted inserted replaced
6866:4c1935f5ec9a 6867:87f7fd05f888
       
     1 #
       
     2 # This patch provides support for programs like gssd to control how
       
     3 # expand_userid() determines the UID of the running process so those apps can
       
     4 # proxy for other users and thus influence the construction of the default
       
     5 # ccache path so the krb code accesses that user's ccache.  This patch in
       
     6 # conjuction with the patch that allows root to auto-acquire an init cred via
       
     7 # the system keytab also allows a process to influence that fall-back behavior.
       
     8 # See Solaris/getuid.c and search for instances of app_krb5_user_uid in ON12.
       
     9 # Eventually this patch should be removed when the various ON components that
       
    10 # rely on it are modified to remove that reliance.
       
    11 #
       
    12 # This is Solaris specific behavior that MIT will not take upstream.
       
    13 # Patch source: in-house
       
    14 #
       
    15 
       
    16 --- krb5-1.14.3-036/src/include/k5-int.h
       
    17 +++ krb5-1.14.3-037/src/include/k5-int.h
       
    18 @@ -2353,4 +2353,6 @@
       
    19  #define k5_prependmsg krb5_prepend_error_message
       
    20  #define k5_wrapmsg krb5_wrap_error_message
       
    21  
       
    22 +uid_t krb5_getuid();
       
    23 +
       
    24  #endif /* _KRB5_INT_H */
       
    25 --- krb5-1.14.3-036/src/lib/krb5/os/Makefile.in
       
    26 +++ krb5-1.14.3-037/src/lib/krb5/os/Makefile.in
       
    27 @@ -24,6 +24,7 @@
       
    28  	gen_port.o	\
       
    29  	genaddrs.o	\
       
    30  	gen_rname.o	\
       
    31 +	getuid.o	\
       
    32  	hostaddr.o	\
       
    33  	hostrealm.o	\
       
    34  	hostrealm_dns.o \
       
    35 @@ -71,6 +72,7 @@
       
    36  	$(OUTPRE)gen_port.$(OBJEXT)	\
       
    37  	$(OUTPRE)genaddrs.$(OBJEXT)	\
       
    38  	$(OUTPRE)gen_rname.$(OBJEXT)	\
       
    39 +	$(OUTPRE)getuid.$(OBJEXT)	\
       
    40  	$(OUTPRE)hostaddr.$(OBJEXT)	\
       
    41  	$(OUTPRE)hostrealm.$(OBJEXT)	\
       
    42  	$(OUTPRE)hostrealm_dns.$(OBJEXT) \
       
    43 @@ -118,6 +120,7 @@
       
    44  	$(srcdir)/gen_port.c	\
       
    45  	$(srcdir)/genaddrs.c	\
       
    46  	$(srcdir)/gen_rname.c	\
       
    47 +	$(srcdir)/getuid.c	\
       
    48  	$(srcdir)/hostaddr.c	\
       
    49  	$(srcdir)/hostrealm.c	\
       
    50  	$(srcdir)/hostrealm_dns.c \
       
    51 --- krb5-1.14.3-036/src/lib/krb5/os/expand_path.c
       
    52 +++ krb5-1.14.3-037/src/lib/krb5/os/expand_path.c
       
    53 @@ -291,7 +291,7 @@
       
    54  expand_userid(krb5_context context, PTYPE param, const char *postfix,
       
    55                char **str)
       
    56  {
       
    57 -    if (asprintf(str, "%lu", (unsigned long)getuid()) < 0)
       
    58 +    if (asprintf(str, "%lu", (unsigned long)krb5_getuid()) < 0)
       
    59          return ENOMEM;
       
    60      return 0;
       
    61  }