summaryrefslogtreecommitdiff
path: root/cifskey.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-20cifscreds: better error handling for key_addJeff Layton1-2/+6
If the string buffers would have been overrun, set errno to EINVAL before returning. Then, have the callers report the errors to stderr or syslog as appropriate. Cc: Sebastian Krahmer <krahmer@suse.de> Signed-off-by: Jeff Layton <jlayton@samba.org>
2014-04-20cifscreds: better error handling when key_search failsJeff Layton1-1/+4
If we ended up getting a bogus string that would have overflowed, then make key_search set errno to EINVAL before returning. The callers can then test to see if the returned error is what was expected or something else and handle it appropriately. Cc: Sebastian Krahmer <krahmer@suse.de> Signed-off-by: Jeff Layton <jlayton@samba.org>
2014-04-14cifskey: better use snprintf()Sebastian Krahmer1-3/+7
Prefer snprintf() over sprintf() in cifskey.c Projects that fork the code (pam_cifscreds) can't rely on the max-size parameters. [jlayton: removed unneeded initialization of "len" in key_add] Signed-off-by: Sebastian Krahmer <krahmer@suse.de>
2013-12-07cifscreds: create PAM module to insert credentials at loginOrion Poplawski1-0/+52
Split out some of the cifscreds key handling routines into a separate file, and then link that in to both cifscreds and the new PAM module. Fix up autoconf to handle building this automatically. Signed-off-by: Orion Poplawski <orion@nwra.com>