Karolin Seeger [Sun, 24 Jun 2012 17:19:19 +0000 (19:19 +0200)]
WHATSNEW: Break line properly.
Karolin
(cherry picked from commit
dd4a51406cc5789e984aab4861e9276448fccf60)
Karolin Seeger [Sat, 23 Jun 2012 19:58:06 +0000 (21:58 +0200)]
WHATSNEW: Add more changes since 3.6.5.
Karolin
(cherry picked from commit
1efdc5fb619c8740bc5d17fb73e22f7db5d07ac8)
Stefan Metzmacher [Wed, 13 Jun 2012 10:13:01 +0000 (12:13 +0200)]
s3:smbd: use fsp_persistent_id() as persistent_file_id part for SMB2 (bug #8995)
It seems to be important to have unique persistent file ids,
because windows clients seem to index files by server_guid + persistent_file_id.
Which may break, if we just have a 16-bit range per connection
and the client connects multiple times.
Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent
fileid in SMB2.
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 14 22:04:13 CEST 2012 on sn-devel-104
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
fc42ea02c7af66ddf5af61d444fdfe5e348d05e2)
Stefan Metzmacher [Thu, 14 Jun 2012 08:32:43 +0000 (10:32 +0200)]
s3:smbd: add a fsp_persistent_id() function
This calculates a 64-bit value that most likely uniquely identifies
the files_struct globally to the server.
* 32-bit random gen_id
* 16-bit truncated open_time
* 16-bit fnum (valatile_id)
Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent
fileid in SMB2.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
cb5a0b1bc311667818ab45bb1837dc67a241a379)
Stefan Metzmacher [Wed, 13 Jun 2012 10:11:51 +0000 (12:11 +0200)]
s3:smbd: try to make fsp->fh->gen_id as globally unique as possible
This makes sure the value is never 0, it's between 1 and UINT32_MAX.
While fsp->fh->gen_id is 'unsigned long' currently (which might by 8 bytes),
there's some oplock code which truncates it to uint32_t (using IVAL()).
Which means we could reuse fsp->fh->gen_id as persistent file id
until we have a final fix, which uses database.
See bug #8995 for more details.
Based on code from Ira Cooper. Ensure fsp->fh->gen_id starts from
a random point. We will use this as the SMB2 persistent_id.
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
8c1159461a0c5a948cd04cdf969e54e1fa83387e)
Stefan Metzmacher [Sat, 9 Jun 2012 09:11:26 +0000 (11:11 +0200)]
Revert "s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()"
This reverts commit
c2716a7d5ccf78f9716b703c22e6cf4d4f179656.
This is not needed anymore, as we have file_fsp_smb2() now.
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Jun 10 18:04:21 CEST 2012 on sn-devel-104
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
a41122337cb72fdc3f16d77396a3e68bf53c1c03)
Stefan Metzmacher [Fri, 15 Jun 2012 20:42:27 +0000 (13:42 -0700)]
s3:smb2_ioctl: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
99807792d743b7f258f0d433689b6231b260bddf)
Stefan Metzmacher [Fri, 8 Jun 2012 09:57:21 +0000 (11:57 +0200)]
s3:smb2_lock: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
f3049c6cafc252a19db84636765674300ff4162b)
Stefan Metzmacher [Fri, 15 Jun 2012 20:31:59 +0000 (13:31 -0700)]
s3:smb2_write: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
b7da435b7ca4e15265442674c876afa9f53c9d51)
Stefan Metzmacher [Fri, 15 Jun 2012 20:29:24 +0000 (13:29 -0700)]
s3:smb2_read: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
770ea1c18f35c169ce4267f335a7ecca0cda3f40)
Stefan Metzmacher [Fri, 15 Jun 2012 20:27:55 +0000 (13:27 -0700)]
s3:smb2_notify: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
742dd9dd2bb176bfe08ceac932ef68f1c182ffe9)
Stefan Metzmacher [Fri, 15 Jun 2012 20:25:11 +0000 (13:25 -0700)]
3:smb2_setinfo: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
d4b4cc33e04fe29dc98603db11173b5ca04b33d7)
Stefan Metzmacher [Fri, 15 Jun 2012 20:23:47 +0000 (13:23 -0700)]
s3:smb2_getinfo: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
e49840fc8b78d8e08ce7e662d0f760d2ee6efff0)
Stefan Metzmacher [Fri, 8 Jun 2012 08:42:43 +0000 (10:42 +0200)]
s3:smb2_find: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
45d61598c626c7e7099361e6a02e2aa3eade5d08)
Stefan Metzmacher [Fri, 8 Jun 2012 08:36:24 +0000 (10:36 +0200)]
s3:smb2_break: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
416bb94b7b6b393eef89b4cdf5d2050ed80383e5)
Stefan Metzmacher [Fri, 15 Jun 2012 20:15:27 +0000 (13:15 -0700)]
s3:smb2_close: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
feed8c0ea1523b2267aa1b30fbcb009333f21b3e)
Stefan Metzmacher [Fri, 15 Jun 2012 19:55:52 +0000 (12:55 -0700)]
s3:smb2_flush: make use of file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
3ade9604f92dc48d2ac12ff14b4ee0504e3fdf4a)
Stefan Metzmacher [Fri, 8 Jun 2012 08:11:57 +0000 (10:11 +0200)]
s3:smbd: add file_fsp_smb2()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
6334f807d21a54d8da0f3f9531b3f49e921e072d)
Stefan Metzmacher [Fri, 8 Jun 2012 09:19:00 +0000 (11:19 +0200)]
s3:smb2_write: pass fsp->fnum to init_strict_lock_struct()
fsp->fnum is the same as in_file_id_volatile.
When we start to support durable handles we should pass
in_file_id_persistent.
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jun 9 18:50:32 CEST 2012 on sn-devel-104
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
46d293d03a895d82bfbf2b6b0c6af797acc39d0e)
Stefan Metzmacher [Fri, 8 Jun 2012 09:19:00 +0000 (11:19 +0200)]
s3:smb2_read: pass fsp->fnum to init_strict_lock_struct()
fsp->fnum is the same as in_file_id_volatile.
When we start to support durable handles we should pass
in_file_id_persistent.
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
0afc9592774b0084a0c5d3191e91570f124447fa)
Stefan Metzmacher [Fri, 8 Jun 2012 09:19:00 +0000 (11:19 +0200)]
s3:smb2_lock: use fsp->fnum as locking context
fsp->fnum is the same as in_file_id_volatile.
When we start to support durable handles we should pass
in_file_id_persistent.
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
c47b3ff25fcc62be3bc96ecf797990e61f5d08ef)
Stefan Metzmacher [Fri, 8 Jun 2012 10:05:56 +0000 (12:05 +0200)]
s3:smb2_lock: use smb2req->compat_chain_fsp instead of looking it up again
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
09dde2e60ee78a60a7521f2225fed7d8a74620d0)
Stefan Metzmacher [Sat, 9 Jun 2012 09:09:25 +0000 (11:09 +0200)]
s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()
metze
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
6ed9df52ec81a8bca884d452adec92f89fdfe2cd)
Volker Lendecke [Thu, 14 Jun 2012 18:26:44 +0000 (11:26 -0700)]
Part 2 of fix for bug #8998 - Notify code can miss a ChDir.
Do a ChDir for notify_onelevel.
(cherry picked from commit
0ace3ca03df76a1c22e112ea41d491f90afc0f94)
Volker Lendecke [Thu, 14 Jun 2012 18:24:01 +0000 (11:24 -0700)]
Part 1 of fix for bug #8998 - Notify code can miss a ChDir.
Factor out notify_parent_dir.
(cherry picked from commit
2b92491ba7cc5fd541e3f8988ecf831c3949fb00)
Jeremy Allison [Fri, 11 May 2012 10:27:01 +0000 (03:27 -0700)]
Fix bug #8922.
Looking at the do_list status returns was historically
ignored, allowing tar to continue after NT_STATUS_ACCESS_DENIED.
Return to this state.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May 11 14:55:53 CEST 2012 on sn-devel-104
(cherry picked from commit
633093685734e44afd7a0de1d58a0ffe905ae13a)
Jeremy Allison [Fri, 30 Mar 2012 18:58:31 +0000 (11:58 -0700)]
Complete fix for bug #8811 - sd_has_inheritable_components segfaults on an SD that se_access_check accepts.
(cherry picked from commit
e5e86688bdcb91817954fb23ecf10a3b6ddd3933)
Björn Jacke [Tue, 5 Jun 2012 13:37:00 +0000 (15:37 +0200)]
s3: remove dependency on automake for "make everything"
the dependency was introduced by
737a1c9b96a4ba8d8688f4dba1df6d931e10e64d
We now call auto* in examples/VFS from within the main autogen.sh.
This fixes bug #8978.
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue Jun 5 17:32:22 CEST 2012 on sn-devel-104
(cherry picked from commit
5cc86fd560568202bef069eb89f5906f20050085)
(cherry picked from commit
2041ef3df94842822102d371029cbb14a7f2c024)
Jeremy Allison [Wed, 13 Jun 2012 17:48:32 +0000 (10:48 -0700)]
Fix bug #8972 - Directory group write permission bit is set if unix extensions are enabled
We can't manipulate file_attributes if it's a posix call.
(cherry picked from commit
bb750d7232bd266c06a14ac3ea577aeecfb81b14)
Matthieu Patou [Fri, 1 Jun 2012 22:33:04 +0000 (15:33 -0700)]
s3-winbindd: call dump_core_setup after command line option has been parsed
Without this fix in some situations winbindd can't coredump.
Such cases append when samba is compiled in a custom prefix (ie.
/home/build/mat/prod/1/) in this case get_dyn_LOGFILEBASE or basename(lp_logfile)
before the configuration file and the command line is parsed will be something like /home/build/mat/prod/1/var
which might not exists on the host where you run it (where it's most
probably more "normal" directories).
Specifying --log-basename didn't help as dump_core_setup is called before the command line and
the config file is read so it didn't help getting a correct value in dump_core_setup.
We fix this issue by calling dump_core_setup() also after the command
line has been read and also after the configfile has been parsed so that
the final location for the coredump is coherent with the final logile
location.
Fix bug #8975 (winbindd can't coredump).
(cherry picked from commit
4cf3fb815610c6f0939f8b142296cd836faac7e6)
Stefan Metzmacher [Mon, 4 Jun 2012 22:59:35 +0000 (15:59 -0700)]
Fix bug #8311 - Winzip occasionally can not read files out of an open winzip dialog.
Backport of the changes in master without the VFS change. Move
all processing into smb_fsctl().
(cherry picked from commit
87d75c675ccd1cd455afb67e149ce1e835ad6b21)
Alexander Bokovoy [Thu, 7 Jun 2012 15:24:38 +0000 (18:24 +0300)]
s3-librpc-crypto: avoid crash with MIT krb5 1.10.0 in gss_get_name_attribute()
gss_get_name_attribute() can return unintialized pac_display_buffer
and later gss_release_buffer() will crash on attempting to release it.
The fix on MIT krb5 side is in 1.10.1, reported in both Debian and MIT upstream:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658514
http://krbdev.mit.edu/rt/Ticket/Display.html?user=guest&pass=guest&id=7087
We need to initialize variables before using gss_get_name_attribute()
Fix bug #8988 (avoid crash with MIT krb5 1.10.0 in gss_get_name_attribute()).
(cherry picked from commit
185c2054fd22de0ab07a762a279a7ef0db5d802c)
Jeremy Allison [Fri, 1 Jun 2012 19:28:33 +0000 (12:28 -0700)]
We are triggering the cleanup_timeout_fn() too often, on exiting when an smbd is idle.
Calls to exit_server_cleanly() should be treated as a "clean" shutdown,
and not trigger the master smbd to call cleanup_timeout_fn.
The last 2 patches address bug #8971 (cleanup_timeout_fn() is called too often,
on exiting when an smbd is idle.)
(cherry picked from commit
8b3b1aa4ff76d7f03285e3fa87f30f3068a7ea5d)
Jeremy Allison [Fri, 1 Jun 2012 19:02:04 +0000 (12:02 -0700)]
Stop spamming the logs with "Could not remove pid XX from serverid.tdb" messages and initiating the cleanup function on every process deat
We now have many sub-processes from smbd that don't serve SMB1/SMB2 requests and
don't register themselves in the serverid.tdb. Only initiate the cleanup
from processes that were explicitly in the child list.
(cherry picked from commit
777ac04a99467594805a03635b04011c495ff7e7)
Volker Lendecke [Tue, 29 May 2012 13:31:49 +0000 (15:31 +0200)]
s3: Fix uninitialized memory read in talloc_free()
Thanks to laurent gaffie <laurent.gaffie@gmail.com> for reporting
this issue!
(cherry picked from commit
445f314614e4e514a70ff5f1fbbfedb4d3ab0aac)
Jeremy Allison [Thu, 31 May 2012 23:25:52 +0000 (16:25 -0700)]
Forward port of Richard Sharpe's <realrichardsharpe@gmail.com> fix for bug #8970 - Possible memory leaks in the samba master process.
(cherry picked from commit
ec7a5f2593b67797fc3924611d3b0b05b807d0bf)
Björn Jacke [Tue, 29 May 2012 06:01:40 +0000 (08:01 +0200)]
s3: fix compile of krb5 locator on Solaris
the krb5 locator plugin on Solaris needs LIBREPLACE_LIBS (bug #8732)
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue May 29 09:58:42 CEST 2012 on sn-devel-104
(cherry picked from commit
3085225e72c75abf84d7740334459cd971ee4c56)
(cherry picked from commit
7ca265423a36c114ac9216a780e005956967eae7)
Matthieu Patou [Wed, 25 Jan 2012 05:29:11 +0000 (21:29 -0800)]
s3-pid: Catch with pid filename's change when config file is not smb.conf
This is what is done in pidfile_create
(cherry picked from commit
9b43ad4fcac1eb6796973336c5614b18a054080d)
Fix bug #8714 (smbcontrol can't find the pid file of winbindd because the later
is created with a different name).
(cherry picked from commit
1a596076697624545f415eb558c4647267cfe46c)
Jeremy Allison [Thu, 31 May 2012 19:19:53 +0000 (21:19 +0200)]
Fix bug #8627: Crash bug in dns_create_probe.
Fix crash bug in dns_create_probe when dns_create_update fails.
(cherry picked from commit
ddad733a2166fb629157298a54a5ccc10a6b11fe)
Herb Lewis [Tue, 29 May 2012 23:38:53 +0000 (16:38 -0700)]
Second part of fix for bug 8953 - winbind can hang as nbt_getdc() has no timeout.
If we're running with SEC_ADS and we don't get a cldap response from
the server when querying its name, don't fall back to NetBIOS requests
as they're unlikely to succeed.
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
b0a17d803dea133146ac9ee1a25c87fea7bd4cd8)
Jeremy Allison [Tue, 29 May 2012 23:37:35 +0000 (16:37 -0700)]
Fix bug #8953 - winbind can hang as nbt_getdc() has no timeout.
Add a timeout_in_seconds parameter to nbt_getdc() to make it fail
after that time with NT_STATUS_IO_TIMEOUT.
(cherry picked from commit
0d9d67d180ffea2a4e1942ec0c34ce3b4910fe18)
Jeremy Allison [Fri, 25 May 2012 16:16:50 +0000 (09:16 -0700)]
Fix bug #8373 - Can't join XP Pro workstations to 3.6.1 DC.
Treat LIBNDR_FLAG_NOALIGN and LIBNDR_FLAG_REMAINING the same as the
other align flags - make them mutually exclusive.
Combined work from Metze, Günther and Jeremy.
(cherry picked from commit
035342c11719d1daa647c0b2ae7cec27a969f83a)
(cherry picked from commit
dea11050ae2e9b2dd4ceb231760d41b68e11f5fd)
Ira Cooper [Wed, 30 May 2012 18:50:06 +0000 (11:50 -0700)]
Fix bad bugfix for bug #8910 - resolve_ads() code can return zero addresses and miss valid DC IP addresses
Original code incorrectly used a while() instead of a for() loop.
We need to iterate over the entire array here.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed May 30 23:29:03 CEST 2012 on sn-devel-104
(cherry picked from commit
fc7e1113c34819de6fc8053fb81ee2e0e970bec2)
(cherry picked from commit
6797759a36b50f82fb1f75a4cc9c2555a79073a2)
Jeremy Allison [Tue, 24 Apr 2012 00:49:49 +0000 (17:49 -0700)]
Fix bug #8882 - Broken processing of %U with vfs_full_audit when force user is set.
When doing a "force user" we need to remember what the "sanitized_username"
was from the original connect.
(cherry picked from commit
f68121db6f78680a328acec11f475ccca3184412)
Andrew Bartlett [Fri, 18 May 2012 12:02:57 +0000 (22:02 +1000)]
s3-utils: Use ads_do_search_retry in net ads search
This makes it possible to search against a slow server, as will
fallback from 1000 to (eventually) 125 users at a time.
Andrew Bartlett
The last 4 patches address big #8943 (Slow but responsive DC can lock up
winbindd for > 10 minutes at a time).
(cherry picked from commit
04a9988ffa60b0ca32923da20a0d25d14aa460e4)
Andrew Bartlett [Fri, 18 May 2012 12:01:14 +0000 (22:01 +1000)]
s3-libads: Use a reducing page size to try and cope with a slow LDAP server
If we cannot get 1000 users downloaded in 15seconds, try with 500, 250
and then 125 users at a time.
Andrew Bartlett
(cherry picked from commit
0f58ea6c58d78c845aa3fda22c238f126620d226)
Andrew Bartlett [Fri, 18 May 2012 07:40:59 +0000 (17:40 +1000)]
s3-winbindd: Always map the LDAP error code to an NTSTATUS
We do this so that we catch LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT, which
has special handling in winbindd_cache.c
Andrew Bartlett
(cherry picked from commit
483a01ea7f50227cb5328c52d8b71a2a31e7acea)
Andrew Bartlett [Fri, 18 May 2012 07:38:48 +0000 (17:38 +1000)]
s3-libads: Map LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT
This allows Samba to then handle this error in the same way it would for RPC connections
Andrew Bartlett
(cherry picked from commit
80e60a8f824f3d709fc45ec11e3ee0a161a622d8)
Jeremy Allison [Mon, 30 Apr 2012 18:05:51 +0000 (11:05 -0700)]
Fix the loop unrolling inside resolve_ads(). If we don't get an IP list don't use interpret_string_addr(), as this only returns one address, use interpret_string_addr_internal() instead.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Apr 30 23:21:16 CEST 2012 on sn-devel-104
(cherry picked from commit
1270cfb45ffa0bbcacf7254b5b45f492a8dcde77)
The last 4 patches address bug #8910 (resolve_ads() code can return zero
addresses and miss valid DC IP addresses).
(cherry picked from commit
79658018ec73755bbd495963f977af61b4497bfb)
Jeremy Allison [Fri, 27 Apr 2012 23:25:58 +0000 (16:25 -0700)]
Protect all of the name resolution methods from returning null addrs. Ensure all returns go through remove_duplicate_addrs2(). (cherry picked from commit
11973608186926e5417ee81c8709ea5b0a7ef2e1)
(cherry picked from commit
495f12d932a2ec2848a17917e6f1aa39590dc97d)
Jeremy Allison [Mon, 30 Apr 2012 21:45:43 +0000 (14:45 -0700)]
Fix convert_ss2service() to filter out zero addresses.
(cherry picked from commit
d259cd40204108d262b6b3c18d1f2a9f9d0fee42)
Jeremy Allison [Fri, 27 Apr 2012 23:02:15 +0000 (16:02 -0700)]
Fix remove_duplicate_addrs2 to do exactly what it says. Previously it could leave zero addresses in the list. (cherry picked from commit
01e884675e3d1cffb0149108225fbd21c3a73f4e)
(cherry picked from commit
d7bddfe22aca1663554757e9245232718adec92d)
Jeremy Allison [Sat, 26 May 2012 00:19:29 +0000 (17:19 -0700)]
Fix bug #8957 - Typo in pam_winbindd code MUST fix.
(cherry picked from commit
ee4ef9a535a2d9db11bd94987fb96ae8f8771e79)
Ira Cooper [Thu, 24 May 2012 01:39:03 +0000 (21:39 -0400)]
s3-passdb: Fix negative SID->uid/gid cache handling. (bug #8952)
-1 uid/gid signals a non existent uid/gid.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
baac32c43460ed5e78e7f8bb2304f79cae2b15ef)
Andreas Schneider [Mon, 14 May 2012 08:31:32 +0000 (10:31 +0200)]
s3-auth: Don't lookup the system user in pdb.
This fixes bug #8944, ldapsam:trusted and ipasam. It is an additional
fix for bug #8567 (
0528cb5f3a15b72dcb34ece21a3ffb3e7b8d6eb9).
Signed-off-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
96b6f3a4777fa3288ee071e01bf293c28002fc5f)
Richard Sharpe [Thu, 17 May 2012 03:21:34 +0000 (20:21 -0700)]
Check the return from create_acl_blob
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Thu May 17 07:17:29 CEST 2012 on sn-devel-104
(cherry picked from commit
632af6645376185500820a5be9dbf5c0c3d1e515)
The last two commits address bug #8945 (vfs_acl_common discards errors from
writing to the underlying storage).
(cherry picked from commit
865eca15e080d9eb9e81e91985d6859e316ce081)
Richard Sharpe [Tue, 15 May 2012 14:47:14 +0000 (07:47 -0700)]
Fix the overwriting of errno before use in a DEBUG statement and use the return value from store_acl_blob_fsp rather than ignoring it.
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Wed May 16 03:43:41 CEST 2012 on sn-devel-104
(cherry picked from commit
bfe4a2baeec6bc4558a617ec67532ea11f865861)
(cherry picked from commit
a398d1bc102933da01d126f2c893ad393f1fb1d2)
Karolin Seeger [Fri, 11 May 2012 14:26:25 +0000 (16:26 +0200)]
WHATSNEW: Start release notes for 3.6.6.
Karolin
(cherry picked from commit
6ea4ad30f4d3c30f824f278c7a93347887942514)
Björn Baumbach [Fri, 28 Oct 2011 03:43:05 +0000 (05:43 +0200)]
s3-printing: Add new printers to registry.
This fixes bug #8554, #8612 and #8748.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
8a553705d9045dbbc3ab71189f2496fe97e1a802)
Alejandro Escanero Blanco [Wed, 9 May 2012 09:35:51 +0000 (11:35 +0200)]
s3:auth/server_info: the primary rid should be in the groups rid array (bug #8798)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 9 19:36:01 CEST 2012 on sn-devel-104
(cherry picked from commit
6132cf2a5cd77c79546a2d6cc3fbf3c93f54183b)
(cherry picked from commit
6eae984cfc3ceb0661f7993c9274e048c6eda6e0)
Michael Adam [Fri, 4 May 2012 16:01:00 +0000 (18:01 +0200)]
s3:registry: return error when Key does not exist in regdb_fetch_values_internal() (cherry picked from commit
8a723ddfc1645e52830fb5f47a34f032f9c38931)
(cherry picked from commit
32cf92f2388c0fc26e24c3174fab43089bffba03)
Michael Adam [Mon, 23 Apr 2012 14:44:15 +0000 (16:44 +0200)]
s3:registry: replace call to reg_openkey() in reg_createkey() by accesscheck. (cherry picked from commit
c1cc15c33be8926ffef173b514d0fb260292d9a3)
(cherry picked from commit
2b29bfcf593aa8a80e1e4cab1d344f5a70036c6e)
Michael Adam [Mon, 23 Apr 2012 14:13:29 +0000 (16:13 +0200)]
s3:registry: remove a superfluous fill_subkey_cache() in reg_createkey()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit
03ae7117df2ae42213a3ef9a5ea3adad2bf264e0)
(cherry picked from commit
404c9cec7e538a8301ad1a57f04ec4f4f05e80e1)
Michael Adam [Mon, 23 Apr 2012 14:07:21 +0000 (16:07 +0200)]
s3:registry: use fill_subkey_cache to check exsistence in regkey_open_onelevel().
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit
af9d70fbce541c382a5fc54b1cc1af9b0b60a692)
(cherry picked from commit
98c96425420485ae1609a16a88d8af4310fa85d6)
Michael Adam [Mon, 23 Apr 2012 14:05:33 +0000 (16:05 +0200)]
s3:registry: let fill_subkey_cache return WERR_BADFILE when the subkey list could not be loaded
WERR_NO_MORE_ITEMS seems inappropriate.
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit
4b3dca83bf0da405524a64ca19771fd747ebe267)
(cherry picked from commit
015033657a9b4bf0de043cbc00e1513616c2d714)
Michael Adam [Mon, 23 Apr 2012 13:47:33 +0000 (15:47 +0200)]
s3:registry: convert reg_openkey() to use talloc instead of SMB_STRDUP etc (cherry picked from commit
42dd99d85ca04c10691f78d6340c6b702ade974b)
(cherry picked from commit
086c1e96b412688691639e89eb6cb947710eedb0)
Michael Adam [Mon, 23 Apr 2012 13:30:38 +0000 (15:30 +0200)]
s3:registry untangle an assignment from the check in regkey_open_onelevel() (cherry picked from commit
12b7b4f0a7d8607dc206c32a3822d5678c14d43b)
(cherry picked from commit
7a36a22f00d8b5024df04932eb60ec9ffa5c2932)
Michael Adam [Mon, 23 Apr 2012 13:29:41 +0000 (15:29 +0200)]
s3:registry: untangle assignment from check in regkey_open_onelevel() (cherry picked from commit
52d3c5c14898b5f2514d1512289370eb6f6fd369)
(cherry picked from commit
e4fc313293c35dda0ff35392dbcdccbfda0e1d24)
Michael Adam [Wed, 11 Apr 2012 13:51:40 +0000 (15:51 +0200)]
s3:registry: fix seqnum race in regdb_fetch_keys_internal
This prevents race between fetching seqnum and key content.
Because there is currently no way to atomically fetch the
record along with the seqnum, I use a loop.
This is far from optimal and should should ideally be done
differently. But for now it fixes the race.
(cherry picked from commit
66fcac5e479a530091ecb43d9f8cf90f4351ad17)
(cherry picked from commit
521c7ea32d36263d218d98fc31420afc1b7cb0e1)
Gregor Beck [Wed, 13 Jul 2011 14:51:54 +0000 (16:51 +0200)]
s3:registry avoid pruning the sequencenumber while flushing the regsubkey_ctr
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul 15 08:34:47 CEST 2011 on sn-devel-104
(cherry picked from commit
5049e3e142977a4c3d0f5a0fd9c06429f4d85bed)
(cherry picked from commit
2517f435574876ad44bf0212f507114a610f2377)
Michael Adam [Wed, 11 Apr 2012 13:48:02 +0000 (15:48 +0200)]
s3:registry: fix seqnum race in fetch_values_internal
This prevents race between fetching seqnum and key content.
Because there is currently no way to atomically fetch the
record along with the seqnum, I use a loop.
This is far from optimal and should should ideally be done
differently. But for now it fixes the race.
(cherry picked from commit
13bccba3c2f6e6fdda2b4a40dd4b1e250a98a7ef)
Conflicts:
source3/registry/reg_backend_db.c
(cherry picked from commit
11413a95a2db14ef14a8f8f4fcb1f11adf44e7a0)
Michael Adam [Wed, 11 Apr 2012 14:02:44 +0000 (16:02 +0200)]
s3:registry: update the seqnum in the subkey cache at the end of regval_store_keys
The purpose is to prevent next reads from going to disk.
Note that this will currently only be effective with local tdbs, not
with ctdb: For tdb, store and delete bump the seqnum while transaction
commit does not. For ctdb, transaction commit bumps the seqnum, while
store and delete don't... This needs fixing (in ctdb).
(cherry picked from commit
16d83149c1b5620598edd37bbd1a73bebec82b6e)
(cherry picked from commit
96f08f6d43cb9bebda175efd5719ca15549a5b99)
Michael Adam [Wed, 11 Apr 2012 13:38:29 +0000 (15:38 +0200)]
s3:registry:db: update the value container seqnum after storing/deleting to prevent next read from going to disk if possible
Note that this will currently only be effective in the local TDB implementation.
For CTDB, this wont work since seqnum currently works differently there (needs
fixing): For tdb, store and delete operations bump the db seqnum, while
transaction commits don't. For ctdb, the seqnum is bumped by the transaction
commit but not by store and delete operations.
(cherry picked from commit
13347d11c0e918f82e7e3c21125acc5e241d389f)
(cherry picked from commit
f4d800d8d010e638d37d993d8eef00645398f811)
Michael Adam [Thu, 12 Apr 2012 20:53:24 +0000 (22:53 +0200)]
s3:registry: wrap reg_deletekey() into a transaction
This is wrong layering but fixes a race condition.
(cherry picked from commit
e3ad0456515c97f6697190c86b8cec4af8e1e190)
(cherry picked from commit
8980168a16463e1d4fabd5a96f8385882aa0fe7b)
Michael Adam [Thu, 12 Apr 2012 20:17:35 +0000 (22:17 +0200)]
s3:registry: wrap reg_createkey() in a transaction
This is wrong layering (calling into regdb_transaction* in the reg_api code)
but fixes a potential race. It makes the multi-step create procedure atomic.
This should completely be done in the backend.
(cherry picked from commit
65d9b116d0283b010e9e3c9ecf185ca42850838e)
(cherry picked from commit
14d9621c39c67872316c6d4f11387b7c3a6dbb00)
Michael Adam [Thu, 12 Apr 2012 15:58:26 +0000 (17:58 +0200)]
s3:registry: untangle assignments from checks in reg_createkey() (cherry picked from commit
4ac9625fe42ded0717aafdf6eec4c1b2217c3c68)
(cherry picked from commit
95ba1aa132e6097a0d35cbc05296427aebdf21b1)
Michael Adam [Thu, 12 Apr 2012 15:52:43 +0000 (17:52 +0200)]
s3:registry: wrap reg_deletevalue() in a transaction
This is at the wrong layer, but if fixes a race potentially causing
data corruption by concurrent access.
(cherry picked from commit
c1208c4a9c10b03579dca3bcd304709e631d3c25)
(cherry picked from commit
d67b1813ac563f79ed055a7e918c5f293a7069fc)
Michael Adam [Thu, 12 Apr 2012 15:46:02 +0000 (17:46 +0200)]
s3:registry: untangle assignment from check in reg_deletevalue() (cherry picked from commit
585746338bda22ff8337d41c8cc50533c5facf56)
(cherry picked from commit
866faf77f92c17e7dbb21686601c7e45a3f406cd)
Michael Adam [Thu, 12 Apr 2012 11:38:32 +0000 (13:38 +0200)]
s3:registry: fix race in reg_setvalue that could lead to data corruption
(there was no lock around fetching the values and storing them)
The layering is wrong in that it uses regdb transactions in reg_api
(cherry picked from commit
9220377ceebf05e756fd108cbd30b503598e0fb8)
(cherry picked from commit
e2d087619076e8c7ec9e46e63037753d8c07138f)
Michael Adam [Fri, 20 Apr 2012 13:19:47 +0000 (15:19 +0200)]
s3:registry: untangle assignment from check and add a debugmessage in reg_setvalue() (cherry picked from commit
a81d399456eb86ffb60bed8704cd8c7864b742db)
(cherry picked from commit
a5025e27890a96b11d8d2119ca72a27b929aa2bc)
Michael Adam [Thu, 12 Apr 2012 06:18:04 +0000 (08:18 +0200)]
s3:registry: don't leak the old contents when updating the value cache (cherry picked from commit
0bf44361caace3a4974dafa305033fb926d0f6d6)
(cherry picked from commit
488b94637952de1cc6251f2d4267ee361b041a0e)
Michael Adam [Fri, 30 Mar 2012 13:39:58 +0000 (15:39 +0200)]
s3:registry: fix debug message in regdb_store_values_internal() (cherry picked from commit
c46403f74116708f2f8b1d531f5881bb9d7f2a84)
(cherry picked from commit
b6aaf6b043699cd2d518100ac2934190e3d51639)
Michael Adam [Fri, 30 Mar 2012 13:35:14 +0000 (15:35 +0200)]
s3:registry: improve log message in regdb_unpack_values() (cherry picked from commit
ae441d97cdbe8e35cd342ba979bacc3757c06cb7)
(cherry picked from commit
bdbfde84e2b722cc8697228d8abdb0663f4addd7)
Michael Adam [Fri, 30 Mar 2012 13:14:01 +0000 (15:14 +0200)]
s3:registry: fix a debug message typo (cherry picked from commit
9f82e1175f28bdc1c09e7bd795699b29049a77e3)
(cherry picked from commit
6413d234911ab9211cf05b89412162d864b89c0a)
Michael Adam [Fri, 30 Mar 2012 12:39:50 +0000 (14:39 +0200)]
s3:registry: add a new function regval_ctr_value_byname()
This is like regval_ctr_key_exists() but does not return bool,
but the regval_blob instead, if found, and NULL if not found.
(cherry picked from commit
b037d5461a7a9a2e51a3dd2794fcc47dfcff4468)
(cherry picked from commit
18d3d3f34c355b182bdb0327a8e4d890965f1594)
Michael Adam [Fri, 30 Mar 2012 12:33:39 +0000 (14:33 +0200)]
s3:registry: rename regval_ctr_key_exists() to regval_ctr_value_exists() (cherry picked from commit
60cdf3c8b5bbda9434f0d8a05fc581ab41b42d5c)
(cherry picked from commit
b712448006fe5d31d9c8db164ffd7b0f0ee1191f)
Michael Adam [Thu, 29 Mar 2012 23:00:51 +0000 (01:00 +0200)]
s4:torture:rpc:spoolss: also initialize driverName before checking it in test_PrinterData_DsSpooler() (cherry picked from commit
46428f96a4089925355b4eeebebb8d7f27e2ec0b)
(cherry picked from commit
4cfbe636d4398e4486a6e402a86e53b77f4aaaf9)
Michael Adam [Thu, 29 Mar 2012 22:10:14 +0000 (00:10 +0200)]
s3:registry:reg_api: fix reg_queryvalue to not fail when values are modified while it runs (cherry picked from commit
5d26120b5ab180212d570dd256e8989e0c80224d)
(cherry picked from commit
b356e42c0828049af8b8f3b5b977aee89c086db6)
Michael Adam [Sat, 5 May 2012 00:12:25 +0000 (02:12 +0200)]
s3:registry: implement values_need_update and subkeys_need_update in the smbconf backend
It simply calls to the regdb functions.
This fixes a caching issue uncovered by recent changes.
(cherry picked from commit
bff7589818e602ace6cd0a4125d5f6a2ba97cded)
(cherry picked from commit
f2ab0372049f839c9201bc326030163996dec769)
Steve Langasek [Wed, 9 May 2012 05:56:00 +0000 (07:56 +0200)]
Fix bug 8920, null dereference
Description: Avoid null dereference in initialize_password_db()
When initialize_password_db() is called with reload=True, it's assumed that
the free_private_data member of pdb_methods is non-null. This is not
necessarily the case, as the tdb backend has no private data and therefore
no free function. Check to see if we have private data that needs freed
before calling.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/829221
(cherry picked from commit
da5c342b6d3d3c05a8ab42bb40eb2e77d7b40ec2)
Jeremy Allison [Thu, 10 May 2012 07:53:57 +0000 (09:53 +0200)]
s3-pam_winbind: Fix the build.
Jeremy
Part of a fix for bug #8915 (Samba fails to build with iniparser-3.0.0 and
iniparser-3.1.0).
(cherry picked from commit
00c901a5be83bfe4c70eccbe7fa2a35d3d2a368d)
Simo Sorce [Wed, 9 May 2012 11:55:41 +0000 (13:55 +0200)]
Fix pam_winbind build against newer iniparser library.
iniparser_getstr is deprecated and has been removed in newer libraries
available in Fedora. Use iniparse_getstring instead.
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Apr 24 02:56:10 CEST 2012 on sn-devel-104
Based on commit
adbace20a24b6ae4fbd6d17b7153833f4ac8c88d in master.
(cherry picked from commit
e295905f2840b5e814f88cd483b7f5f0fb3b4150)
Karolin Seeger [Tue, 8 May 2012 14:33:07 +0000 (16:33 +0200)]
s3-docs: Fix bug #7930.
Add hint that setting "profile acls = yes" on normal shares can cause trouble.
Karolin
Autobuild-User: Karolin Seeger <kseeger@samba.org>
Autobuild-Date: Tue May 8 18:47:59 CEST 2012 on sn-devel-104
(cherry picked from commit
4cc04a29247a0c4b3de9884890364a5712534073)
(cherry picked from commit
5efc31595beae5ec661d0bf6d001bcfbf59bc446)
Richard Sharpe [Tue, 8 May 2012 12:53:10 +0000 (14:53 +0200)]
s3-VFS: Fix building out-of-tree modules.
Fix bug #8822 (VFS module init function name has to be manually changed
depending on build environment).
(cherry picked from commit
d2f4164e3db2c341ff3a1b35a68f691848c9a859)
Karolin Seeger [Tue, 8 May 2012 10:01:28 +0000 (12:01 +0200)]
s3-docs: Fix several typos.
Part of a fix for bug #7938. Based on a patch provided by John Bradshaw
<john@johnbradshaw.org>.
Karolin
(cherry picked from commit
3522cbb537069286b55264bfdd5484c278d76181)
Karolin Seeger [Tue, 8 May 2012 09:05:37 +0000 (11:05 +0200)]
s3-docs: overrided -> overridden
Fix typo. Part of a fix for bug #7938. Based on a patch provided by John
Bradshaw <john@johnbradshaw.org>.
(cherry picked from commit
6b4890246ddbd606484e7247bea86c238cc0a057)
Björn Jacke [Tue, 8 May 2012 12:10:51 +0000 (14:10 +0200)]
s3/ldap: remove outdated netscape ds 5 schema file
remove outdated netscape ds 5 schema file and put a README there pointing to
the FDS schema file instead. This fixes bug #8869
(commit
b31f773ae1640313dc1ba86b334e9bbb9cb31bd6 in master)
(cherry picked from commit
9fd8692a9d066f4e469eb0668ae1f0c8b2c8db6c)
Joseph Tam [Thu, 19 Apr 2012 18:46:16 +0000 (11:46 -0700)]
Fix bug #8877 - Syslog broken owing to mistyping of debug_settings.syslog.
Setting "syslog only = yes" did not divert log messages to syslog. The test in
lib/util/debug.c:Debug1():747
if( syslog_level < state.settings.syslog )
produces wrong results since .syslog is typed "bool" rather than "int".
The attached patch fixes this by typing this field correctly as "int".
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr 20 00:06:12 CEST 2012 on sn-devel-104
(cherry picked from commit
00d5f32025bf13285ab3f8ffae914107c9eca275)
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
50973b96e2e5bf1f8a434a8be986e359a9e3b3e5)
Jeremy Allison [Tue, 17 Apr 2012 01:17:25 +0000 (18:17 -0700)]
Bugfix for #8857 - Setting traverse rights fails to enable directory traversal when acl_xattr in use.
We were incorrectly checking the parent directory ACL, instead
of the ACL of the directory we're trying to open.
(cherry picked from commit
faafade5dd948918a27284b82384340995d1bf55)
Jeremy Allison [Tue, 17 Apr 2012 01:04:51 +0000 (18:04 -0700)]
Fix incorrect debug - parent_name is never set !
(cherry picked from commit
bed05b8d6b10c77a98a73318ba483bafcccb8a34)