1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

r22914: - Fixes bug 4599. A missing <code>if</code> statement forced subseqeuent

attempts to set attributes to fail.

- I also noticed that missing attributes were setting an invalid return string
  by getxattr(), e.g. if there was not group, the return string had "GROUP:;"
  instead of excluding the GROUP attribute entirely as it should.  The big
  problem with the way it was, is that the string could not then be passed to
  setxattr() and parsed.
(This used to be commit 7213b5ebec)
This commit is contained in:
Derrell Lipman
2007-05-15 19:10:29 +00:00
committed by Gerald (Jerry) Carter
parent 8c3f8e5697
commit 4a413b3043
3 changed files with 91 additions and 4 deletions

View File

@ -4546,7 +4546,7 @@ cacl_get(SMBCCTX *context,
return -1;
}
n = strlen(p);
} else {
} else if (sidstr[0] != '\0') {
n = snprintf(buf, bufsize,
",OWNER:%s", sidstr);
}
@ -4591,7 +4591,7 @@ cacl_get(SMBCCTX *context,
return -1;
}
n = strlen(p);
} else {
} else if (sidstr[0] != '\0') {
n = snprintf(buf, bufsize,
",GROUP:%s", sidstr);
}
@ -5317,7 +5317,9 @@ smbc_setxattr_ctx(SMBCCTX *context,
ipc_srv = smbc_attr_server(context, server, share,
workgroup, user, password,
&pol);
srv->no_nt_session = True;
if (! ipc_srv) {
srv->no_nt_session = True;
}
} else {
ipc_srv = NULL;
}
@ -5742,7 +5744,9 @@ smbc_removexattr_ctx(SMBCCTX *context,
ipc_srv = smbc_attr_server(context, server, share,
workgroup, user, password,
&pol);
srv->no_nt_session = True;
if (! ipc_srv) {
srv->no_nt_session = True;
}
} else {
ipc_srv = NULL;
}