From: Andreas Schneider Date: Tue, 6 Nov 2012 08:27:43 +0000 (+0100) Subject: s3fs-client: Burn commandline password of client utils. X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=50d47fc0816c842717a5c0bfb3c0863d99eed78c s3fs-client: Burn commandline password of client utils. Signed-off-by: Andreas Schneider Reviewed by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Nov 8 21:24:21 CET 2012 on sn-devel-104 --- diff --git a/source3/client/client.c b/source3/client/client.c index ab0e77f50a5c..f8cc27d63a60 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 0dad971c9688..d204d7fae2de 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 85fe2f6454a7..465d2a08216a 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 7df4e4872580..d22e2f3bac08 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 b96210386da9..d248bbe1ebf4 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 e2f109e9eb2a..40b1f096ad99 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();