summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-03 09:16:21 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-03 09:16:21 +0000
commit04efc2dcf7cad460edc5646c066afb1300ba962f (patch)
tree8d0e6b4a46fc923417f91051d7f5f65369e3ab7a /source3
parent1cf903851279309b9060357ce73e1ed680757929 (diff)
downloadsamba-04efc2dcf7cad460edc5646c066afb1300ba962f.tar.gz
samba-04efc2dcf7cad460edc5646c066afb1300ba962f.tar.bz2
samba-04efc2dcf7cad460edc5646c066afb1300ba962f.zip
Try the PASSWD environment variable if we don't have one from the command line.
(This used to be commit 14d7d8b22993ca7f1c273a7baaccb09c8fa04ef9)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index ada0ed53e1..c1285bc64b 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -636,6 +636,10 @@ static struct functable net_func[] = {
exit(1);
}
}
+
+ if (!opt_password) {
+ opt_password = getenv("PASSWD");
+ }
rc = net_run_function(argc_new-1, argv_new+1, net_func, net_help);