diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-03-11 14:11:43 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-03-11 14:11:43 +0000 |
commit | f2a6c90b001bca2c91f6bc3351d2a8b7c8d2d9d2 (patch) | |
tree | 06e8e29c4fd5667b8ef7cf98d607af1f80c5ef53 /usr.sbin | |
parent | 1d98c12accde52361c289c8cc24ed4fbb98a00d1 (diff) | |
download | src-f2a6c90b001bca2c91f6bc3351d2a8b7c8d2d9d2.tar.gz src-f2a6c90b001bca2c91f6bc3351d2a8b7c8d2d9d2.zip |
Fix srandom arg according to Lite2
Notes
Notes:
svn path=/head/; revision=23700
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index a5ea8017434b..0d2679560d47 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pw_user.c,v 1.15 1997/02/22 16:12:30 peter Exp $ + * $Id: pw_user.c,v 1.17 1997/03/03 07:59:54 ache Exp $ */ #include <unistd.h> @@ -835,7 +835,7 @@ pw_pwcrypt(char *password) /* * Calculate a salt value */ - srandom((unsigned) (time(NULL) ^ getpid())); + srandom((unsigned long) (time(NULL) ^ getpid())); for (i = 0; i < 8; i++) salt[i] = chars[random() % 63]; salt[i] = '\0'; @@ -920,7 +920,7 @@ pw_password(struct userconf * cnf, struct cargs * args, char const * user) switch (cnf->default_password) { case -1: /* Random password */ - srandom((unsigned) (time(NULL) ^ getpid())); + srandom((unsigned long) (time(NULL) ^ getpid())); l = (random() % 8 + 8); /* 8 - 16 chars */ pw_getrand(rndbuf, l); for (i = 0; i < l; i++) |