The Samba-Bugzilla – Attachment 12544 Details for
Bug 12270
smbcquotas cannot list quotas against a Windows server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.5.next
fix-12270.patch (text/plain), 3.15 KB, created by
Uri Simchoni
on 2016-10-04 19:40:58 UTC
(
hide
)
Description:
git-am fix for 4.5.next
Filename:
MIME Type:
Creator:
Uri Simchoni
Created:
2016-10-04 19:40:58 UTC
Size:
3.15 KB
patch
obsolete
>From d6c9b88de18d6210491ea18295487e99520f846f Mon Sep 17 00:00:00 2001 >From: Uri Simchoni <uri@samba.org> >Date: Fri, 16 Sep 2016 21:57:50 +0300 >Subject: [PATCH 1/2] s3-cliquota: correctly handle no-more-entries > >When listing quota records, a Windows server would >return STATUS_SUCCESS until no more entries are available, >where it would return STATUS_NO_MORE_ENTRIES. > >The fix keeps old behavior of empty answer also signifying >end of record, to maintain compatibility with Samba servers. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12270 > >Signed-off-by: Uri Simchoni <uri@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit 5a947d6ca1928e4e4bd4caf2b86698b86d378a81) >--- > source3/libsmb/cliquota.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > >diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c >index 875c419..778fefc 100644 >--- a/source3/libsmb/cliquota.c >+++ b/source3/libsmb/cliquota.c >@@ -242,13 +242,15 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum, > &rparam, 0, &rparam_count, > &rdata, 0, &rdata_count); > >- if (!NT_STATUS_IS_OK(status)) { >+ if (!NT_STATUS_IS_OK(status) && >+ !NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) { > DEBUG(1, ("NT_TRANSACT_GET_USER_QUOTA failed: %s\n", > nt_errstr(status))); > goto cleanup; > } > >- if (rdata_count == 0) { >+ if (NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES) || >+ rdata_count == 0) { > *pqt_list = NULL; > return NT_STATUS_OK; > } >@@ -304,13 +306,16 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum, > &rparam, 0, &rparam_count, > &rdata, 0, &rdata_count); > >- if (!NT_STATUS_IS_OK(status)) { >+ if (!NT_STATUS_IS_OK(status) && >+ !NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) { > DEBUG(1, ("NT_TRANSACT_GET_USER_QUOTA failed: %s\n", > nt_errstr(status))); > goto cleanup; > } > >- if (rdata_count == 0) { >+ if (NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES) || >+ rdata_count == 0) { >+ status = NT_STATUS_OK; > break; > } > >-- >2.5.5 > > >From b7225ec30e1df809eb3601f8317f038cf0183530 Mon Sep 17 00:00:00 2001 >From: Uri Simchoni <uri@samba.org> >Date: Fri, 16 Sep 2016 22:01:46 +0300 >Subject: [PATCH 2/2] smbcquotas: fix error message listing quotas > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12270 > >Signed-off-by: Uri Simchoni <uri@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit 610c26d74c1314142981e5cc31a0706a4a99766f) >--- > source3/utils/smbcquotas.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c >index e6f1dfb..cda5f92 100644 >--- a/source3/utils/smbcquotas.c >+++ b/source3/utils/smbcquotas.c >@@ -408,9 +408,9 @@ static int do_quota(struct cli_state *cli, > status = cli_list_user_quota( > cli, quota_fnum, &qtl); > if (!NT_STATUS_IS_OK(status)) { >- d_printf("%s cli_set_user_quota %s\n", >- nt_errstr(status), >- username_str); >+ d_printf( >+ "%s cli_list_user_quota\n", >+ nt_errstr(status)); > return -1; > } > dump_ntquota_list(&qtl,verbose,numeric,SidToString); >-- >2.5.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 12270
: 12544