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 147358 Details for
Bug 227345
pam_namespace should convert the context names before it uses them as filenames
[?]
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]
Proposed patch by Ted X Toth
pam-0.99.7.0-namespace-polydir-name.patch (text/plain), 1.55 KB, created by
Tomas Mraz
on 2007-02-05 15:06:17 UTC
(
hide
)
Description:
Proposed patch by Ted X Toth
Filename:
MIME Type:
Creator:
Tomas Mraz
Created:
2007-02-05 15:06:17 UTC
Size:
1.55 KB
patch
obsolete
>--- Linux-PAM-0.99.7.0/modules/pam_namespace/pam_namespace.c 2007-01-23 17:37:38.000000000 -0600 >+++ Linux-PAM-0.99.7.0/modules/pam_namespace/pam_namespace.c.polydir-name 2007-01-23 17:39:08.000000000 -0600 >@@ -530,6 +530,21 @@ > #endif > > /* >+ valid_filename_from_context replaces character in the context that are not >+ valid in a filename with '_'. This can occur with CAPCO standard security >+ labels which can contain '/' characters. >+ */ >+#ifdef WITH_SELINUX >+static void valid_filename_from_context(security_context_t *i_context, char *o_filename) { >+ char *ptr = NULL; >+ strcpy(o_filename, (char *)*i_context); >+ while ((ptr = strpbrk(o_filename, " \\'/?\"<>|*\t")) != NULL) { >+ *ptr = '_'; >+ } >+} >+#endif >+ >+/* > * poly_name returns the name of the polyinstantiated instance directory > * based on the method used for polyinstantiation (user, context or both) > * In addition, the function also returns the security contexts of the >@@ -548,6 +563,7 @@ > int rc; > > # ifdef WITH_SELINUX >+ char *filename = NULL; > rc = form_context(polyptr, i_context, origcon, idata); > #endif > rc = PAM_SUCCESS; >@@ -567,10 +583,13 @@ > #ifdef WITH_SELINUX > case LEVEL: > case CONTEXT: >- if (asprintf(i_name, "%s_%s", *i_context, idata->user) < 0) { >+ filename = (char *)malloc(strlen((char *)*i_context) + 1); >+ valid_filename_from_context(i_context, filename); >+ if (asprintf(i_name, "%s_%s", filename, idata->user) < 0) { > *i_name = NULL; > rc = PAM_SESSION_ERR; > } >+ free(filename); > break; > > #endif /* WITH_SELINUX */
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 227345
:
147358
|
154209