summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/adduser/adduser.perl9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl
index c1a52edfd14..5d360e28a0d 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.5 1997/05/29 04:26:56 gene Exp $
+# $OpenBSD: adduser.perl,v 1.6 1998/02/16 16:04:41 bitblt Exp $
#
# Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
# All rights reserved.
@@ -921,6 +921,7 @@ sub salt {
sub encrypt {
local($pass, $salt) = ($_[0], $_[1]);
local $args, $crypt;
+ local $goodpass;
if ($encryptionmethod eq "des") {
$args = "-s $salt";
@@ -930,7 +931,9 @@ sub encrypt {
$args = "-b $salt";
}
- $crypt = `encrypt $args $pass`;
+ $pass =~ s/(.)/\\$1/g;
+
+ $crypt = `/usr/bin/encrypt $args $pass`;
chop $crypt;
return($crypt);
}
@@ -1440,7 +1443,7 @@ sub config_write {
print C <<EOF;
#
-# $OpenBSD: adduser.perl,v 1.5 1997/05/29 04:26:56 gene Exp $
+# $OpenBSD: adduser.perl,v 1.6 1998/02/16 16:04:41 bitblt Exp $
# $config - automatic generated by adduser(8)
#
# Note: adduser read *and* write this file.