[Pkg-shadow-commits] r1452 - in upstream/trunk: . libmisc
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Fri Nov 23 23:57:48 UTC 2007
Author: nekral-guest
Date: 2007-11-23 23:57:47 +0000 (Fri, 23 Nov 2007)
New Revision: 1452
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/salt.c
Log:
Make sure method is not NULL, defaulting to DES. Thanks to Dan Kopecek <dkopecek at redhat.com>.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2007-11-23 21:04:43 UTC (rev 1451)
+++ upstream/trunk/ChangeLog 2007-11-23 23:57:47 UTC (rev 1452)
@@ -1,3 +1,9 @@
+2007-11-24 Nicolas François <nicolas.francois at centraliens.net>
+
+ * libmisc/salt.c: Make sure method is not NULL, defaulting to DES.
+ Thanks to Dan Kopecek <dkopecek at redhat.com>.
+
+
2007-11-23 Nicolas François <nicolas.francois at centraliens.net>
* libmisc/salt.c: Move the srandom call to gensalt.
Modified: upstream/trunk/libmisc/salt.c
===================================================================
--- upstream/trunk/libmisc/salt.c 2007-11-23 21:04:43 UTC (rev 1451)
+++ upstream/trunk/libmisc/salt.c 2007-11-23 23:57:47 UTC (rev 1452)
@@ -180,18 +180,18 @@
*/
static char result[40];
size_t salt_len = 8;
- char *method = "DES";
+ char *method;
result[0] = '\0';
if (NULL != meth)
method = meth;
- else
+ else {
#ifdef ENCRYPTMETHOD_SELECT
if ((method = getdef_str ("ENCRYPT_METHOD")) == NULL)
#endif
- if (getdef_bool ("MD5_CRYPT_ENAB"))
- method = "MD5";
+ method = getdef_bool ("MD5_CRYPT_ENAB") ? "MD5" : "DES";
+ }
if (!strcmp (method, "MD5")) {
MAGNUM(result, '1');
More information about the Pkg-shadow-commits
mailing list