summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorDavid O'Neill <dmo@samba.org>2001-01-11 23:21:17 +0000
committerDavid O'Neill <dmo@samba.org>2001-01-11 23:21:17 +0000
commitea1e6f9e7bc845ddf93a1603d7e43050be0e7917 (patch)
treea8a65d4ed32eaff57e992538ad869bd001ffe1d8 /source3/utils
parentbd72966aaa3f95fe1bc2ae3ee23f1a3bdd89dbc2 (diff)
downloadsamba-ea1e6f9e7bc845ddf93a1603d7e43050be0e7917.tar.gz
samba-ea1e6f9e7bc845ddf93a1603d7e43050be0e7917.tar.bz2
samba-ea1e6f9e7bc845ddf93a1603d7e43050be0e7917.zip
Changes from APPLIANCE_HEAD:
source/lib/smbpasswd.c - Only call load_interfaces() when doing a network related operation. This means you can add, remove, enable or disable smbpasswd entries without a network. Changing passwords always requires a network. (This used to be commit e2193c3a360562dd66a16c8f23f8cf3eed20b8cf)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbpasswd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index d6a0c3dba8..cb86669728 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -327,6 +327,12 @@ static int process_root(int argc, char *argv[])
usage();
}
+ /* Only load interfaces if we are doing network operations. */
+
+ if (joining_domain || remote_machine) {
+ load_interfaces();
+ }
+
if(joining_domain) {
if (argc != 0)
usage();
@@ -506,11 +512,13 @@ static int process_nonroot(int argc, char *argv[])
* via a remote machine (even if that machine is
* localhost).
*/
+
+ load_interfaces(); /* Delayed from main() */
+
if (remote_machine == NULL) {
remote_machine = "127.0.0.1";
}
-
if (remote_machine != NULL) {
old_passwd = get_pass("Old SMB password:",stdin_passwd_get);
}
@@ -585,7 +593,6 @@ int main(int argc, char **argv)
codepage_initialise(lp_client_code_page());
- load_interfaces();
secrets_init();
/* Check the effective uid - make sure we are not setuid */