summaryrefslogtreecommitdiff
path: root/usr.sbin/adduser
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-01-18 03:05:49 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-01-18 03:05:49 +0000
commit28d7f2fcdafa4d4e1adfb310f0a5d7b967d01e1a (patch)
tree7b654968df9ba9d730eb152506a2a3cfa2e0e8a0 /usr.sbin/adduser
parent5f5fcf23fa36ea33684ebe2596d24dde08ec8102 (diff)
add 'old' as a synonym for 'des'
Diffstat (limited to 'usr.sbin/adduser')
-rw-r--r--usr.sbin/adduser/adduser.perl16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl
index 3ba04c55e41..a25f66bc6f7 100644
--- a/usr.sbin/adduser/adduser.perl
+++ b/usr.sbin/adduser/adduser.perl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $OpenBSD: adduser.perl,v 1.13 1999/01/16 03:13:01 weingart Exp $
+# $OpenBSD: adduser.perl,v 1.14 1999/01/18 03:05:48 millert Exp $
#
# Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
# All rights reserved.
@@ -86,7 +86,7 @@ sub variables {
# common shells, first element has higher priority
@shellpref = ('csh', 'sh', 'bash', 'tcsh', 'ksh');
- @encryption_methods = ('blowfish', 'md5', 'des');
+ @encryption_methods = ('blowfish', 'md5', 'des', 'old');
$defaultshell = 'sh'; # defaultshell if not empty
$group_uniq = 'USER';
@@ -837,7 +837,7 @@ sub encryption_default {
# Confirm that we have a valid encryption method
sub encryption_check {
- local ($m) = $_[0];
+ local($m) = $_[0];
foreach $i (@encryption_methods) {
if ($m eq $i) { return 1; }
@@ -894,7 +894,7 @@ sub uniq {
# That may be a DES salt or a blowfish rotation count
sub salt {
local($salt); # initialization
- if ($encryptionmethod eq "des") {
+ if ($encryptionmethod eq "des" || $encryptionmethod eq "old") {
local($i, $rand);
local(@itoa64) = ( 0 .. 9, a .. z, A .. Z ); # 0 .. 63
@@ -925,10 +925,10 @@ sub salt {
# Encrypt a password using the selected method
sub encrypt {
local($pass, $salt) = ($_[0], $_[1]);
- local $args, $crypt;
- local $goodpass;
+ local($args, $crypt);
+ local($goodpass);
- if ($encryptionmethod eq "des") {
+ if ($encryptionmethod eq "des" || $encryptionmethod eq "old") {
$args = "-s $salt";
} elsif ($encryptionmethod eq "md5") {
$args = "-m";
@@ -1447,7 +1447,7 @@ sub config_write {
print C <<EOF;
#
-# $OpenBSD: adduser.perl,v 1.13 1999/01/16 03:13:01 weingart Exp $
+# $OpenBSD: adduser.perl,v 1.14 1999/01/18 03:05:48 millert Exp $
# $config - automatic generated by adduser(8)
#
# Note: adduser read *and* write this file.