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 208031 Details for
Bug 308651
pam_stack.so service=system-auth behaving differently compared to explicit setting of configuration
[?]
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.
pamtest.c
pamtest.c (text/x-csrc), 1.38 KB, created by
Jose Plans
on 2007-09-27 09:43:57 UTC
(
hide
)
Description:
pamtest.c
Filename:
MIME Type:
Creator:
Jose Plans
Created:
2007-09-27 09:43:57 UTC
Size:
1.38 KB
patch
obsolete
>#include <stdio.h> >#include <security/pam_appl.h> >#include <security/pam_misc.h> > > >int main(int argc, char **argv) { > char *username = NULL; > pam_handle_t *pamh = NULL; > const char *service = "pamtest"; > struct pam_conv conv; > int ret = 0; > > > if (argc != 2) { > fprintf(stderr, "Usage: pamtest <username>\n"); > exit(1); > } > > username = argv[1]; > > if (!username) { > fprintf(stderr, "Failed to get username.\n"); > exit(1); > } > > conv.conv = misc_conv; > conv.appdata_ptr = NULL; > > ret = pam_start(service, username, &conv, &pamh); > if (ret != PAM_SUCCESS) { > fprintf(stderr, "pam_start failed: %s\n", pam_strerror(pamh, ret)); > exit(1); > } > > ret = pam_authenticate(pamh, 0); > if (ret != PAM_SUCCESS) { > fprintf(stderr, "pam_authenticate failed: %s\n", pam_strerror(pamh, ret)); > exit(1); > } > > ret = pam_acct_mgmt(pamh, 0); > if (ret != PAM_SUCCESS && ret != PAM_NEW_AUTHTOK_REQD) { > fprintf(stderr, "pam_acct_mgmt failed: %s\n", pam_strerror(pamh, ret)); > exit(1); > } > > if (ret == PAM_NEW_AUTHTOK_REQD) { > fprintf(stderr, "Calling pam_chauthtok.\n"); > ret = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); > if (ret != PAM_SUCCESS) { > fprintf(stderr, "pam_chauthtok failed: %s \n", pam_strerror(pamh, ret)); > exit(1); > } > } > > ret = pam_end(pamh, 0); > if (ret != PAM_SUCCESS) { > fprintf(stderr, "pam_end failed: %s \n", pam_strerror(pamh, ret)); > exit(1); > } > > fprintf(stderr, "Success\n"); > exit(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 308651
:
208011
|
208021
| 208031 |
208071
|
269941