diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-11-11 17:11:57 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-11-11 17:11:57 +0100 |
commit | 634c87dd7718aaea9c6f2dbcb8992e0a82bd159a (patch) | |
tree | 21ecd40168481145cc6d629d5a74be039cdaa211 /source3/utils/net_rpc_samsync.c | |
parent | 2f438b4cdeaacf55b0832bf71b2ef15b30cdd758 (diff) | |
parent | dee2c61ce0a5ff2485f4a0704c9d7288ca75cb52 (diff) | |
download | samba-634c87dd7718aaea9c6f2dbcb8992e0a82bd159a.tar.gz samba-634c87dd7718aaea9c6f2dbcb8992e0a82bd159a.tar.bz2 samba-634c87dd7718aaea9c6f2dbcb8992e0a82bd159a.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/utils/net_rpc_samsync.c')
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index c0922efe6b..73e6dd03cb 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -249,7 +249,10 @@ NTSTATUS rpc_vampire_keytab_internals(struct net_context *c, return status; } - if (argc >= 1) { + if (argc < 1) { + /* the caller should ensure that a filename is provided */ + return NT_STATUS_INVALID_PARAMETER; + } else { ctx->output_filename = argv[0]; } @@ -299,9 +302,13 @@ static NTSTATUS rpc_vampire_keytab_ds_internals(struct net_context *c, ctx->force_full_replication = c->opt_force_full_repl ? true : false; ctx->clean_old_entries = c->opt_clean_old_entries ? true : false; - if (argc >= 1) { + if (argc < 1) { + /* the caller should ensure that a filename is provided */ + return NT_STATUS_INVALID_PARAMETER; + } else { ctx->output_filename = argv[0]; } + if (argc >= 2) { ctx->object_dns = &argv[1]; ctx->object_count = argc - 1; @@ -342,9 +349,9 @@ int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv) { int ret = 0; - if (c->display_usage) { + if (c->display_usage || (argc < 1)) { d_printf("Usage:\n" - "net rpc vampire keytab\n" + "net rpc vampire keytab <keytabfile>\n" " Dump remote SAM database to Kerberos keytab file\n"); return 0; } |