summaryrefslogtreecommitdiff
path: root/source3/libsmb/clirap2.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2005-04-19 19:23:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:40 -0500
commit1d08b9013a67184b0ecfe8b013926128719b68a6 (patch)
tree48b05c1be341c1f5183abb7673435e1b0634058a /source3/libsmb/clirap2.c
parent67e9fb7c7c61a337da7efb887e401dfaa828b7b5 (diff)
downloadsamba-1d08b9013a67184b0ecfe8b013926128719b68a6.tar.gz
samba-1d08b9013a67184b0ecfe8b013926128719b68a6.tar.bz2
samba-1d08b9013a67184b0ecfe8b013926128719b68a6.zip
r6392: - Fixes bug 2564: when smbc_opendir() was called with a file rather than
a directory, the errno returned could end up as ENOENT rather than ENOTDIR. - Fixes some compiler warnings which showed up on IRIX, as reported by James Peach. (This used to be commit 615a62b21f8d2f7f97bde2f166ddd6849d39b95c)
Diffstat (limited to 'source3/libsmb/clirap2.c')
-rw-r--r--source3/libsmb/clirap2.c41
1 files changed, 17 insertions, 24 deletions
diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c
index d8a8519550..b15ee1a63e 100644
--- a/source3/libsmb/clirap2.c
+++ b/source3/libsmb/clirap2.c
@@ -369,10 +369,9 @@ int cli_RNetGroupEnum0(struct cli_state *cli,
if (rdata) {
if (res == 0 || res == ERRmoredata) {
- int i, converter, count;
+ int i, count;
- p = rparam + WORDSIZE; /* skip result */
- GETWORD(p, converter);
+ p = rparam + WORDSIZE + WORDSIZE; /* skip result and converter */
GETWORD(p, count);
for (i=0,p=rdata;i<count;i++) {
@@ -543,10 +542,9 @@ int cli_NetGroupGetUsers(struct cli_state * cli, const char *group_name, void (*
}
if (rdata) {
if (res == 0 || res == ERRmoredata) {
- int i, converter, count;
+ int i, count;
fstring username;
- p = rparam +WORDSIZE;
- GETWORD(p, converter);
+ p = rparam + WORDSIZE + WORDSIZE;
GETWORD(p, count);
for (i=0,p=rdata; i<count; i++) {
@@ -598,10 +596,9 @@ int cli_NetUserGetGroups(struct cli_state * cli, const char *user_name, void (*f
}
if (rdata) {
if (res == 0 || res == ERRmoredata) {
- int i, converter, count;
+ int i, count;
fstring groupname;
- p = rparam +WORDSIZE;
- GETWORD(p, converter);
+ p = rparam + WORDSIZE + WORDSIZE;
GETWORD(p, count);
for (i=0,p=rdata; i<count; i++) {
@@ -800,7 +797,6 @@ int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char
char username[RAP_USERNAME_LEN];
char userpw[RAP_UPASSWD_LEN];
pstring comment, homedir, logonscript;
- int pwage, priv, flags;
p = rparam + WORDSIZE; /* skip result */
GETWORD(p, converter);
@@ -810,11 +806,11 @@ int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char
GETSTRINGF(p, username, RAP_USERNAME_LEN);
p++; /* pad byte */
GETSTRINGF(p, userpw, RAP_UPASSWD_LEN);
- GETDWORD(p, pwage); /* password age */
- GETWORD(p, priv); /* 0=guest, 1=user, 2=admin */
+ p += DWORDSIZE; /* skip password age */
+ p += WORDSIZE; /* skip priv: 0=guest, 1=user, 2=admin */
GETSTRINGP(p, homedir, rdata, converter);
GETSTRINGP(p, comment, rdata, converter);
- GETWORD(p, flags);
+ p += WORDSIZE; /* skip flags */
GETSTRINGP(p, logonscript, rdata, converter);
fn(username, comment, homedir, logonscript, cli);
@@ -868,11 +864,10 @@ int cli_RNetUserEnum0(struct cli_state *cli,
}
if (rdata) {
if (res == 0 || res == ERRmoredata) {
- int i, converter, count;
+ int i, count;
char username[RAP_USERNAME_LEN];
- p = rparam + WORDSIZE; /* skip result */
- GETWORD(p, converter);
+ p = rparam + WORDSIZE + WORDSIZE; /* skip result and converter */
GETWORD(p, count);
for (i=0,p=rdata;i<count;i++) {
@@ -1473,10 +1468,9 @@ BOOL cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 sty
cli->rap_error = res;
if (res == 0 || res == ERRmoredata) {
- int i, converter, count;
+ int i, count;
- p = rparam + WORDSIZE;
- GETWORD(p, converter);
+ p = rparam + WORDSIZE + WORDSIZE;
GETWORD(p, count);
p = rdata;
@@ -1798,10 +1792,9 @@ int cli_RNetServiceEnum(struct cli_state *cli, void (*fn)(const char *, const ch
if (rdata) {
if (res == 0 || res == ERRmoredata) {
- int i, converter, count;
+ int i, count;
- p = rparam + WORDSIZE; /* skip result */
- GETWORD(p, converter);
+ p = rparam + WORDSIZE + WORDSIZE; /* skip result and converter */
GETWORD(p, count);
for (i=0,p=rdata;i<count;i++) {
@@ -1943,14 +1936,14 @@ int cli_NetSessionGetInfo(struct cli_state *cli, const char *workstation, void (
res = GETRES(rparam);
if (res == 0 || res == ERRmoredata) {
- int rsize, converter;
+ int converter;
pstring wsname, username, clitype_name;
uint16 num_conns, num_opens, num_users;
unsigned int sess_time, idle_time, user_flags;
p = rparam + WORDSIZE;
GETWORD(p, converter);
- GETWORD(p, rsize);
+ p += WORDSIZE; /* skip rsize */
p = rdata;
GETSTRINGP(p, wsname, rdata, converter);