summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-12-14 18:14:34 +0100
committerGünther Deschner <gd@samba.org>2012-12-21 13:56:00 +0100
commite41f0ccdd280f18e3b4f72f1f20cd768c4572427 (patch)
treef6bcc4827974846f119fd4cd41d336e767bf1135 /source3/utils
parent15c0594feeed89b66d869bbfaf75f9af38269c33 (diff)
downloadsamba-e41f0ccdd280f18e3b4f72f1f20cd768c4572427.tar.gz
samba-e41f0ccdd280f18e3b4f72f1f20cd768c4572427.tar.bz2
samba-e41f0ccdd280f18e3b4f72f1f20cd768c4572427.zip
s3-utils: Check return value of secrets_init().
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbpasswd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 66c80da618..3af7e56f7d 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -605,7 +605,12 @@ int main(int argc, char **argv)
}
if (local_flags & LOCAL_AM_ROOT) {
- secrets_init();
+ bool ok;
+
+ ok = secrets_init();
+ if (!ok) {
+ return 1;
+ }
ret = process_root(local_flags);
} else {
ret = process_nonroot(local_flags);