summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorTim Potter <tpot@hp.com>2008-02-18 10:24:51 +1100
committerGünther Deschner <gd@samba.org>2008-02-18 10:15:53 +0100
commit9053bdf57c39102f0a9ec78cbbee3f7ff45d72e1 (patch)
tree63ee808841022849f96af7385616351db2022da7 /source3/rpcclient
parenta8fbb92146ddfe0b774f8385dfdea672447a1c46 (diff)
downloadsamba-9053bdf57c39102f0a9ec78cbbee3f7ff45d72e1.tar.gz
samba-9053bdf57c39102f0a9ec78cbbee3f7ff45d72e1.tar.bz2
samba-9053bdf57c39102f0a9ec78cbbee3f7ff45d72e1.zip
Fix off-by-one bugs in subcommand argument passing.
(This used to be commit d85a2782a483e563a8b68924d4897a145bc25896)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_samr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index f8b8ba893c..8b4ee47a67 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -1044,8 +1044,8 @@ static NTSTATUS cmd_samr_enum_domains(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
- if (argc > 2) {
- sscanf(argv[2], "%x", &access_mask);
+ if (argc > 1) {
+ sscanf(argv[1], "%x", &access_mask);
}
/* Get sam policy handle */
@@ -1194,11 +1194,11 @@ static NTSTATUS cmd_samr_query_aliasinfo(struct rpc_pipe_client *cli,
sscanf(argv[2], "%i", &alias_rid);
- if (argc > 3) {
+ if (argc > 2) {
level = atoi(argv[3]);
}
- if (argc > 4) {
+ if (argc > 3) {
sscanf(argv[4], "%x", &access_mask);
}