Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 605032 Details for
Bug 848223
cifs.upcall will need to search locations other than /tmp for Kerberos credential caches
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
search the user's directory for ccaches first, then try /tmp (untested)
cifs-utils-5.6-user.patch (text/plain), 2.03 KB, created by
Nalin Dahyabhai
on 2012-08-16 22:02:46 UTC
(
hide
)
Description:
search the user's directory for ccaches first, then try /tmp (untested)
Filename:
MIME Type:
Creator:
Nalin Dahyabhai
Created:
2012-08-16 22:02:46 UTC
Size:
2.03 KB
patch
obsolete
>When scanning for credential caches, check the user's directory under >/run/user first, then fall back to /tmp as we have previously. >--- cifs-utils-5.6/cifs.upcall.c >+++ cifs-utils-5.6/cifs.upcall.c >@@ -53,7 +53,8 @@ > #include "cifs_spnego.h" > > #define CIFS_DEFAULT_KRB5_DIR "/tmp" >-#define CIFS_DEFAULT_KRB5_PREFIX "krb5cc_" >+#define CIFS_DEFAULT_KRB5_USER_DIR "/run/user/%U" >+#define CIFS_DEFAULT_KRB5_PREFIX "krb5cc" > #define CIFS_DEFAULT_KRB5_KEYTAB "/etc/krb5.keytab" > > #define MAX_CCNAME_LEN PATH_MAX + 5 >@@ -258,6 +259,34 @@ icfk_cleanup: > return ccname; > } > >+/* resolve a pattern to an actual directory path */ >+static char *resolve_krb5_dir(const char *pattern, uid_t uid) >+{ >+ char name[MAX_CCNAME_LEN]; >+ int i, j; >+ for (i = 0, j = 0; pattern[i] != '\0'; i++) { >+ switch (pattern[i]) { >+ case '%': >+ switch (pattern[i + 1]) { >+ case '%': >+ name[j++] = pattern[i]; >+ i++; >+ break; >+ case 'U': >+ j += snprintf(name + j, sizeof(name) - j, >+ "%lu", (unsigned long) uid); >+ i++; >+ break; >+ } >+ break; >+ default: >+ name[j++] = pattern[i]; >+ break; >+ } >+ } >+ return strndup(name, MAX_CCNAME_LEN); >+} >+ > /* search for a credcache that looks like a likely candidate */ > static char *find_krb5_cc(const char *dirname, uid_t uid) > { >@@ -788,7 +817,7 @@ int main(const int argc, char *const arg > unsigned int have; > long rc = 1; > int c, try_dns = 0, legacy_uid = 0; >- char *buf, *ccname = NULL; >+ char *buf, *ccdir = NULL, *ccname = NULL; > char hostbuf[NI_MAXHOST], *host; > struct decoded_args arg; > const char *oid; >@@ -896,7 +925,12 @@ int main(const int argc, char *const arg > syslog(LOG_ERR, "setuid: %s", strerror(errno)); > goto out; > } >- ccname = find_krb5_cc(CIFS_DEFAULT_KRB5_DIR, uid); >+ ccdir = resolve_krb5_dir(CIFS_DEFAULT_KRB5_USER_DIR, uid); >+ if (ccdir != NULL) >+ ccname = find_krb5_cc(ccdir, uid); >+ if (ccname == NULL) >+ ccname = find_krb5_cc(CIFS_DEFAULT_KRB5_DIR, uid); >+ SAFE_FREE(ccdir); > > /* Couldn't find credcache? Try to use keytab */ > if (ccname == NULL && arg.username != NULL)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 848223
:
605030
| 605032