summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-12-31 18:06:57 -0800
committerJeremy Allison <jra@samba.org>2008-12-31 18:06:57 -0800
commit07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00 (patch)
tree412f448d68b4b0f36c5b330a1f3eef77acf12a2f /source3/utils/net_rpc.c
parentbb23f5725f538d14b2ccec0463cfb1136be3ebd0 (diff)
downloadsamba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.tar.gz
samba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.tar.bz2
samba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.zip
Fix all warnings in source3 with gcc4.3.
Jeremy.
Diffstat (limited to 'source3/utils/net_rpc.c')
-rw-r--r--source3/utils/net_rpc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 5c83b590c1..e0d606c19a 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -749,7 +749,9 @@ static int rpc_user_password(struct net_context *c, int argc, const char **argv)
if (argv[1]) {
u1003.usri1003_password = argv[1];
} else {
- asprintf(&prompt, "Enter new password for %s:", argv[0]);
+ if (asprintf(&prompt, "Enter new password for %s:", argv[0]) == -1) {
+ return -1;
+ }
u1003.usri1003_password = getpass(prompt);
SAFE_FREE(prompt);
}
@@ -5533,7 +5535,9 @@ static int rpc_trustdom_establish(struct net_context *c, int argc,
strupper_m(domain_name);
/* account name used at first is our domain's name with '$' */
- asprintf(&acct_name, "%s$", lp_workgroup());
+ if (asprintf(&acct_name, "%s$", lp_workgroup()) == -1) {
+ return -1;
+ }
strupper_m(acct_name);
/*