[PATCH 2/2] s3fs-client: Burn commandline password of client utils.
Andreas Schneider
asn at samba.org
Sat Nov 3 05:06:17 MDT 2012
Signed-off-by: Andreas Schneider <asn at samba.org>
---
source3/client/client.c | 2 ++
source3/rpcclient/rpcclient.c | 1 +
source3/utils/net.c | 2 ++
source3/utils/smbcacls.c | 2 ++
source3/utils/smbcquotas.c | 2 ++
source3/utils/smbtree.c | 1 +
6 files changed, 10 insertions(+)
diff --git a/source3/client/client.c b/source3/client/client.c
index ab0e77f..f8cc27d 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -5408,6 +5408,7 @@ static int do_message_op(struct user_auth_info *a_info)
poptGetArg(pc));
}
+
switch (opt) {
case 'M':
/* Messages are sent to NetBIOS name type 0x3
@@ -5555,6 +5556,7 @@ static int do_message_op(struct user_auth_info *a_info)
}
poptFreeContext(pc);
+ popt_burn_cmdline_password(argc, argv);
DEBUG(3,("Client started (version %s).\n", samba_version_string()));
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 0dad971..d204d7f 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -960,6 +960,7 @@ out_free:
}
poptFreeContext(pc);
+ popt_burn_cmdline_password(argc, argv);
if (!init_names()) {
result = 1;
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 85fe2f6..465d2a0 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -945,6 +945,8 @@ static struct functable net_func[] = {
c->opt_password = getenv("PASSWD");
}
+ popt_burn_cmdline_password(argc, argv);
+
/* Failing to init the msg_ctx isn't a fatal error. Only
root-level things (joining/leaving domains etc.) will be denied. */
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 7df4e48..d22e2f3 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -1371,6 +1371,7 @@ static struct cli_state *connect_one(struct user_auth_info *auth_info,
popt_common_set_auth_info(auth_info);
pc = poptGetContext("smbcacls", argc, argv, long_options, 0);
+ popt_burn_cmdline_password(argc, argv);
poptSetOtherOptionHelp(pc, "//server1/share1 filename\nACLs look like: "
"'ACL:user:[ALLOWED|DENIED]/flags/permissions'");
@@ -1436,6 +1437,7 @@ static struct cli_state *connect_one(struct user_auth_info *auth_info,
}
poptFreeContext(pc);
+ popt_burn_cmdline_password(argc, argv);
string_replace(path,'/','\\');
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index b962103..d248bbe 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -608,6 +608,7 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
popt_common_set_auth_info(smbcquotas_auth_info);
pc = poptGetContext("smbcquotas", argc, argv, long_options, 0);
+ popt_burn_cmdline_password(argc, argv);
poptSetOtherOptionHelp(pc, "//server1/share1");
@@ -689,6 +690,7 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
}
poptFreeContext(pc);
+ popt_burn_cmdline_password(argc, argv);
string_replace(path, '/', '\\');
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index e2f109e..40b1f09 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -317,6 +317,7 @@ static bool print_tree(struct user_auth_info *user_info)
POPT_CONTEXT_KEEP_FIRST);
while(poptGetNextOpt(pc) != -1);
poptFreeContext(pc);
+ popt_burn_cmdline_password(argc, argv);
lp_load_global(get_dyn_CONFIGFILE());
load_interfaces();
--
1.8.0
More information about the samba-technical
mailing list