[SCM] Samba Shared Repository - branch v4-1-test updated
Karolin Seeger
kseeger at samba.org
Tue Jul 21 17:03:05 UTC 2015
The branch, v4-1-test has been updated
via e889ea3 s3-auth: Fix a possible null pointer dereference
via 28ee83d s3-smbd: Leave sys_disk_free() if dfree command is used
from d7d60d8 s3-smbd: reset protocol in smbXsrv_connection_init_tables failure paths.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-1-test
- Log -----------------------------------------------------------------
commit e889ea33b03e2f88e285549793356f70930b53d8
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jul 17 10:54:17 2015 +0200
s3-auth: Fix a possible null pointer dereference
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11404
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
(cherry picked from commit 109ff388fd5e1306189d680a8f964a69374f1b01)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-1-test): Tue Jul 21 19:02:14 CEST 2015 on sn-devel-104
commit 28ee83dbf46888b1f68693f6a7ca778a8b382df4
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jul 17 09:35:11 2015 +0200
s3-smbd: Leave sys_disk_free() if dfree command is used
If we have a broken system which reports incorrect sizes we provide the
'dfree command'. This command makes sure Samba gets the correct values.
However after that we call the quota command which then reports the
broken values. The dfree command should take care to provide the correct
values and in case of quota's it should also calculate the quote
correctly.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11403
Pair-Programmed-With: Michael Adam <obnox at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 48a4d5a4078ff2a66dd753323d6e5d76d34b9828)
-----------------------------------------------------------------------
Summary of changes:
source3/auth/auth_ntlmssp.c | 4 +++-
source3/smbd/dfree.c | 29 +++++++++++++----------------
2 files changed, 16 insertions(+), 17 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index f99bd44..dae5f77 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -153,7 +153,9 @@ NTSTATUS auth3_check_password(struct auth4_context *auth4_context,
&server_info,
user_info->client.account_name,
user_info->client.domain_name);
- *server_returned_info = talloc_steal(mem_ctx, server_info);
+ if (NT_STATUS_IS_OK(nt_status)) {
+ *server_returned_info = talloc_steal(mem_ctx, server_info);
+ }
return nt_status;
}
diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c
index e6a0af2..1e5aba6 100644
--- a/source3/smbd/dfree.c
+++ b/source3/smbd/dfree.c
@@ -98,7 +98,7 @@ uint64_t sys_disk_free(connection_struct *conn, const char *path, bool small_que
DEBUG (3, ("disk_free: Running command '%s'\n", syscmd));
lines = file_lines_pload(syscmd, NULL);
- if (lines) {
+ if (lines != NULL) {
char *line = lines[0];
DEBUG (3, ("Read input from dfree, \"%s\"\n", line));
@@ -122,22 +122,18 @@ uint64_t sys_disk_free(connection_struct *conn, const char *path, bool small_que
*dsize = 2048;
if (!*dfree)
*dfree = 1024;
- } else {
- DEBUG (0, ("disk_free: file_lines_load() failed for "
- "command '%s'. Error was : %s\n",
- syscmd, strerror(errno) ));
- if (sys_fsusage(path, dfree, dsize) != 0) {
- DEBUG (0, ("disk_free: sys_fsusage() failed. Error was : %s\n",
- strerror(errno) ));
- return (uint64_t)-1;
- }
- }
- } else {
- if (sys_fsusage(path, dfree, dsize) != 0) {
- DEBUG (0, ("disk_free: sys_fsusage() failed. Error was : %s\n",
- strerror(errno) ));
- return (uint64_t)-1;
+
+ goto dfree_done;
}
+ DEBUG (0, ("disk_free: file_lines_load() failed for "
+ "command '%s'. Error was : %s\n",
+ syscmd, strerror(errno) ));
+ }
+
+ if (sys_fsusage(path, dfree, dsize) != 0) {
+ DEBUG (0, ("disk_free: sys_fsusage() failed. Error was : %s\n",
+ strerror(errno) ));
+ return (uint64_t)-1;
}
if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_q)) {
@@ -161,6 +157,7 @@ uint64_t sys_disk_free(connection_struct *conn, const char *path, bool small_que
*dfree = MAX(1,*dfree);
}
+dfree_done:
disk_norm(small_query,bsize,dfree,dsize);
if ((*bsize) < 1024) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list