[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Sun Nov 14 07:08:05 MST 2010
The branch, master has been updated
via c52e6db s3: string_to_sid does thorough syntax checking
via a2769b0 s3: Avoid two calls cli_errstr
from 36637a7 s3: Convert cli_get_posix_fs_info() to cli_trans()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c52e6db8a2d5ef56cac59315f16f70eb9624b5d7
Author: Volker Lendecke <vl at samba.org>
Date: Sun Nov 14 15:15:52 2010 +0100
s3: string_to_sid does thorough syntax checking
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Sun Nov 14 14:07:29 UTC 2010 on sn-devel-104
commit a2769b069b11c92f4b4822f4eb3e66b8aadd18ca
Author: Volker Lendecke <vl at samba.org>
Date: Sun Nov 14 14:11:24 2010 +0100
s3: Avoid two calls cli_errstr
-----------------------------------------------------------------------
Summary of changes:
source3/utils/smbcacls.c | 4 ++--
source3/utils/smbcquotas.c | 17 +++++++++++------
2 files changed, 13 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index bb438ba..9f740f7 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -200,8 +200,8 @@ static bool StringToSid(struct cli_state *cli, struct dom_sid *sid, const char *
{
enum lsa_SidType type;
- if (strncmp(str, "S-", 2) == 0) {
- return string_to_sid(sid, str);
+ if (string_to_sid(sid, str)) {
+ return true;
}
return NT_STATUS_IS_OK(cli_lsa_lookup_name(cli, str, &type, sid));
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 980ba2b..63ea269 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -117,8 +117,8 @@ static bool StringToSid(struct dom_sid *sid, const char *str)
struct dom_sid *sids = NULL;
bool result = True;
- if (strncmp(str, "S-", 2) == 0) {
- return string_to_sid(sid, str);
+ if (string_to_sid(sid, str)) {
+ return true;
}
if (!cli_open_policy_hnd() ||
@@ -238,11 +238,14 @@ static int do_quota(struct cli_state *cli,
uint16_t quota_fnum = 0;
SMB_NTQUOTA_LIST *qtl = NULL;
SMB_NTQUOTA_STRUCT qt;
+ NTSTATUS status;
+
ZERO_STRUCT(qt);
- if (!NT_STATUS_IS_OK(cli_get_fs_attr_info(cli, &fs_attrs))) {
+ status = cli_get_fs_attr_info(cli, &fs_attrs);
+ if (!NT_STATUS_IS_OK(status)) {
d_printf("Failed to get the filesystem attributes %s.\n",
- cli_errstr(cli));
+ nt_errstr(status));
return -1;
}
@@ -251,10 +254,12 @@ static int do_quota(struct cli_state *cli,
return 0;
}
- if (!NT_STATUS_IS_OK(cli_get_quota_handle(cli, "a_fnum))) {
+ status = cli_get_quota_handle(cli, "a_fnum);
+ if (!NT_STATUS_IS_OK(status)) {
d_printf("Quotas are not enabled on this share.\n");
d_printf("Failed to open %s %s.\n",
- FAKE_FILE_NAME_QUOTA_WIN32,cli_errstr(cli));
+ FAKE_FILE_NAME_QUOTA_WIN32,
+ nt_errstr(status));
return -1;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list