summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmbclient.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index b1f073debc..32f195547f 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -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;
}