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 232751 Details for
Bug 334931
Add Kerberos support to CIFS mounts
[?]
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.
sample request-key callout program
cifskey.c (text/plain), 1.43 KB, created by
Jeff Layton
on 2007-10-19 16:46:27 UTC
(
hide
)
Description:
sample request-key callout program
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-10-19 16:46:27 UTC
Size:
1.43 KB
patch
obsolete
>#include <sys/types.h> >#include <keyutils.h> >#include <string.h> >#include <stdlib.h> >#include <stdarg.h> >#include <stdio.h> >#include <syslog.h> >#include <errno.h> > >struct cifs_spnego_msg { > uint32_t len; > uint8_t data[1]; >}; > >static void >error(const char *fmt, ...) >{ > va_list va; > > va_start(va, fmt); > vsyslog(LOG_ERR, fmt, va); > va_end(va); > > exit(1); >} > >int >main(int argc, char **argv) >{ > long clen, ret; > key_serial_t key; > struct cifs_spnego_msg *rep; > > if (argc < 2) > error("usage: %s <key_id>\n", argv[0]); > > /* pass the key SN to instantiate on command line */ > key = atoi(argv[1]); > > /* we have to assume authority over auth_key to get callout_data */ > ret = keyctl_assume_authority(key); > if (ret < 0 && !(argc == 9 || errno == EOPNOTSUPP)) > error("Failed to assume authority over key %d (%m)\n", key); > > /* get the length of callout_data */ > clen = keyctl_read(KEY_SPEC_REQKEY_AUTH_KEY, NULL, 0); > if (clen < 0) > error("Failed to retrieve callout info length %d\n", clen); > > /* allocate memory for response struct */ > rep = malloc(clen + 4); > if (rep == NULL) > error("can't allocate reply buffer"); > > /* set len field in reply and read the data into data field */ > rep->len = clen; > ret = keyctl_read(KEY_SPEC_REQKEY_AUTH_KEY, (char *)rep->data, clen); > > /* instantiate the key */ > ret = keyctl_instantiate(key, rep, (rep->len+4), 0); > if (ret < 0) > error("keyctl_instantiate failed: %d", errno); > > free(rep); > return 0; >}
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 Raw
Actions:
View
Attachments on
bug 334931
:
229111
|
232751