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 949045 Details for
Bug 1146945
RFE: Kerberos should support dropping configuration snippets to /etc/ and /usr
[?]
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]
Prototype patch
krb5_etckrb5confd_prototype003.diff.txt (text/plain), 4.18 KB, created by
Roland Mainz
on 2014-10-21 16:29:16 UTC
(
hide
)
Description:
Prototype patch
Filename:
MIME Type:
Creator:
Roland Mainz
Created:
2014-10-21 16:29:16 UTC
Size:
4.18 KB
patch
obsolete
>diff --git a/src/include/osconf.hin b/src/include/osconf.hin >index 6f28bc3..681593d 100644 >--- a/src/include/osconf.hin >+++ b/src/include/osconf.hin >@@ -50,7 +50,7 @@ > #define KDB5_PLUGIN_BUNDLE_DIR "/System/Library/KerberosPlugins/KerberosDatabasePlugins" > #define KRB5_AUTHDATA_PLUGIN_BUNDLE_DIR "/System/Library/KerberosPlugins/KerberosAuthDataPlugins" > #else >-#define DEFAULT_SECURE_PROFILE_PATH "/etc/krb5.conf@SYSCONFCONF" >+#define DEFAULT_SECURE_PROFILE_PATH "/usr/share/krb5/krb5.conf.d/:/etc/krb5.conf.d/:/etc/krb5.conf@SYSCONFCONF" > #define DEFAULT_PROFILE_PATH DEFAULT_SECURE_PROFILE_PATH > #endif > #endif /* _WINDOWS */ >diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c >index 5611233..8535a7f 100644 >--- a/src/util/profile/prof_file.c >+++ b/src/util/profile/prof_file.c >@@ -307,7 +307,9 @@ errcode_t profile_update_file_data_locked(prf_data_t data, char **ret_modspec) > time_t now; > #endif > FILE *f; >- >+ int isdir; >+ ssize_t sz; >+ > #ifdef HAVE_STAT > now = time(0); > if (now == data->last_stat && data->root != NULL) { >@@ -345,19 +347,42 @@ errcode_t profile_update_file_data_locked(prf_data_t data, char **ret_modspec) > return 0; > } > #endif >- errno = 0; >- f = fopen(data->filespec, "r"); >- if (f == NULL) { >- retval = errno; >- if (retval == 0) >- retval = ENOENT; >- return retval; >+ >+ if ( >+#ifdef HAVE_STAT >+ S_ISDIR(st.st_mode) || >+#endif >+ (sz = strlen(data->filespec), (sz > 0L) && (data->filespec[sz-1] == '/'))) { >+ isdir = 1; > } >- set_cloexec_file(f); >+ else >+ { >+ isdir = 0; >+ >+ errno = 0; >+ f = fopen(data->filespec, "r"); >+ >+ if (f == NULL) { >+ retval = errno; >+ if (retval == 0) >+ retval = ENOENT; >+ return retval; >+ } >+ >+ set_cloexec_file(f); >+ } >+ > data->upd_serial++; > data->flags &= PROFILE_FILE_SHARED; /* FIXME same as '=' operator */ >- retval = profile_parse_file(f, &data->root, ret_modspec); >- fclose(f); >+ >+ if (isdir) { >+ retval = profile_process_directory(data->filespec, &data->root); >+ } >+ else >+ { >+ retval = profile_parse_file(f, &data->root, ret_modspec); >+ (void)fclose(f); >+ } > if (retval) { > return retval; > } >diff --git a/src/util/profile/prof_int.h b/src/util/profile/prof_int.h >index 38ea59a..aa5c4f7 100644 >--- a/src/util/profile/prof_int.h >+++ b/src/util/profile/prof_int.h >@@ -122,6 +122,9 @@ struct _profile_t { > > errcode_t profile_parse_file > (FILE *f, struct profile_node **root, char **ret_modspec); >+ >+errcode_t profile_process_directory >+ (const char *dirname, struct profile_node **root); > > errcode_t profile_write_tree_file > (struct profile_node *root, FILE *dstfile); >diff --git a/src/util/profile/prof_parse.c b/src/util/profile/prof_parse.c >index bcb88d2..baeb223 100644 >--- a/src/util/profile/prof_parse.c >+++ b/src/util/profile/prof_parse.c >@@ -238,7 +238,7 @@ static int valid_name(const char *filename) > * alphanumeric chracters, dashes, and underscores are included, in order to > * avoid including editor backup files, .rpmsave files, and the like. > */ >-static errcode_t parse_include_dir(char *dirname, struct parse_state *state) >+static errcode_t parse_include_dir(const char *dirname, struct parse_state *state) > { > #ifdef _WIN32 > char *wildcard = NULL, *pathname; >@@ -449,6 +449,32 @@ errcode_t profile_parse_file(FILE *f, struct profile_node **root, > return 0; > } > >+ >+errcode_t profile_process_directory(const char *dirname, struct profile_node **root) >+{ >+ struct parse_state state; >+ errcode_t retval; >+ >+ *root = NULL; >+ >+ /* Initialize parsing state with a new root node. */ >+ state.state = STATE_INIT_COMMENT; >+ state.group_level = 0; >+ state.current_section = NULL; >+ retval = profile_create_node("(root)", 0, &state.root_section); >+ if (retval) >+ return retval; >+ >+ retval = parse_include_dir(dirname, &state); >+ if (retval) { >+ profile_free_node(state.root_section); >+ return retval; >+ } >+ *root = state.root_section; >+ return 0; >+} >+ >+ > /* > * Return TRUE if the string begins or ends with whitespace > */
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 1146945
:
948872
| 949045