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 663134 Details for
Bug 886995
open the cracklib dictionary directly to control how to handle errors
[?]
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 test application
chkchroot.c (text/plain), 1.21 KB, created by
Nalin Dahyabhai
on 2012-12-13 19:02:22 UTC
(
hide
)
Description:
sample test application
Filename:
MIME Type:
Creator:
Nalin Dahyabhai
Created:
2012-12-13 19:02:22 UTC
Size:
1.21 KB
patch
obsolete
>#include <sys/types.h> >#include <limits.h> >#include <stdio.h> >#include <string.h> >#include <unistd.h> > >#include <crack.h> >#include <packer.h> > >extern char *FascistLook(PWDICT *pw, const char *candidate); > >int >main(int argc, char **argv) >{ > PWDICT *pw; > char buf[LINE_MAX]; > const char *destination = "/var/empty/sshd", *dict = NULL, *result; > > if (argc > 1) { > if (strlen(argv[1]) > 1) { > dict = argv[1]; > pw = PWOpen(dict, "r"); > } else { > dict = GetDefaultCracklibDict(); > pw = PWOpen(dict, "r"); > } > if (pw == NULL) { > printf("error opening dictionary \"%s\": %m\n", dict); > } > } else { > dict = GetDefaultCracklibDict(); > pw = NULL; > } > if (argc > 2) { > destination = argv[2]; > } > if (chroot(destination) != 0) { > printf("chroot(\"%s\") failure: %m, continuing\n", destination); > } else { > printf("chroot(\"%s\") succeeded\n", destination); > } > while (fgets(buf, sizeof(buf), stdin) != NULL) { > buf[strcspn(buf, "\r\n")] = '\0'; > if (pw != NULL) { > result = FascistLook(pw, buf); > } else { > result = FascistCheck(buf, dict); > } > if (result != NULL) { > printf("\"%s\" rejected: %s\n", buf, result); > } else { > printf("\"%s\" accepted\n", buf); > } > } > if (pw != NULL) { > PWClose(pw); > } > 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 886995
: 663134 |
663135