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 577604 Details for
Bug 683523
[RFE] Use sssd (when available) for automounter map lookups in LDAP
[?]
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]
Patch to check calling endmntent then setmntent and performing a ny name query using libsss_autofs as a shared library (rev 2)
sssd-1.8.2-autofs_test_client.c-shared-2.patch (text/plain), 2.59 KB, created by
Ian Kent
on 2012-04-16 00:27:04 UTC
(
hide
)
Description:
Patch to check calling endmntent then setmntent and performing a ny name query using libsss_autofs as a shared library (rev 2)
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2012-04-16 00:27:04 UTC
Size:
2.59 KB
patch
obsolete
>--- autofs_test_client.c.orig 2012-04-13 11:18:04.901864144 +0800 >+++ autofs_test_client.c 2012-04-16 08:13:02.226703949 +0800 >@@ -18,18 +18,14 @@ > along with this program. If not, see <http://www.gnu.org/licenses/>. > */ > >-#ifdef HAVE_CONFIG_H >-#include <config.h> >-#endif >- > #include <stdio.h> > #include <stdlib.h> > #include <dlfcn.h> > #include <errno.h> > #include <popt.h> > >-#include "util/util.h" >-#include "sss_client/autofs/sss_autofs_private.h" >+typedef int errno_t; >+#include "sss_autofs_private.h" > > struct automtent { > const char *mapname; >@@ -44,6 +40,8 @@ > char *key = NULL; > char *value = NULL; > char *pc_key = NULL; >+ char *wild = "/"; >+ unsigned int saved = 0; > struct poptOption long_options[] = { > POPT_AUTOHELP > { "by-name", 'n', POPT_ARG_STRING, &pc_key, 0, "Request map by name", NULL }, >@@ -86,7 +84,12 @@ > } > > printf("key: %s\t\tvalue: %s\n", key, value); >- free(key); >+ if (saved) >+ free(key); >+ else { >+ pc_key = key; >+ saved++; >+ } > key = NULL; > free(value); > value = NULL; >@@ -98,6 +101,45 @@ > ret, strerror(ret)); > goto end; > } >+ >+ if (!pc_key) >+ goto end; >+ >+ ret = _sss_endautomntent(&ctx); >+ if (ret) { >+ fprintf(stderr, "endautomntent failed [%d]: %s\n", >+ ret, strerror(ret)); >+ exit(EXIT_FAILURE); >+ } >+ >+ ret = _sss_setautomntent(mapname, &ctx); >+ if (ret) { >+ fprintf(stderr, "setautomntent failed [%d]: %s\n", >+ ret, strerror(ret)); >+ exit(EXIT_FAILURE); >+ } >+ >+ ret = _sss_getautomntbyname_r(pc_key, &value, ctx); >+ if (ret) { >+ fprintf(stderr, "getautomntbyname_r for \"%s\" failed [%d]: %s\n", >+ pc_key, ret, strerror(ret)); >+ goto end; >+ } >+ >+ printf("get key \"%s\" in map:\t\tvalue: %s\n", pc_key, value); >+ free(value); >+ free(pc_key); >+ >+ pc_key = wild; >+ ret = _sss_getautomntbyname_r(pc_key, &value, ctx); >+ if (ret) { >+ fprintf(stderr, "getautomntbyname_r for \"%s\" failed [%d]: %s\n", >+ pc_key, ret, strerror(ret)); >+ goto end; >+ } >+ >+ printf("get key \"%s\" in map:\t\tvalue: %s\n", pc_key, value); >+ free(value); > } else { > ret = _sss_getautomntbyname_r(pc_key, &value, ctx); > if (ret == ENOENT) {
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 683523
:
532963
|
532964
|
532965
|
562152
|
562153
|
562156
|
562158
|
575059
|
575244
|
575294
|
577220
|
577221
| 577604 |
582837