samba.git
15 years agoFix Coverity ID 745 (RESOURCE_LEAK)
Volker Lendecke [Fri, 13 Feb 2009 10:18:31 +0000 (11:18 +0100)]
Fix Coverity ID 745 (RESOURCE_LEAK)
(cherry picked from commit 3077f2ab45b08595b4849add56110a37069d12ec)

15 years agoFix double free caused by incorrect talloc_steal usage.
Dan Sledz [Thu, 12 Feb 2009 20:02:43 +0000 (12:02 -0800)]
Fix double free caused by incorrect talloc_steal usage.
(cherry picked from commit 7274764436deb21f821c7a62a3ac3454e1af9025)

15 years ago[Bug 6069] Add a fstatvfs function for libsmbclient
Derrell Lipman [Thu, 12 Feb 2009 14:16:48 +0000 (09:16 -0500)]
[Bug 6069] Add a fstatvfs function for libsmbclient

- DFS is not a POSIX feature, so the state of that bit should be zero if DFS
  is *not* supported. Bit feature reversed.

- Added smbc_statvfs function

Derrell
(cherry picked from commit 0697cffe211a922c816b6c75230c4186328498ed)

15 years agoFix bug #6098 - When the DNS server is invalid, the ads_find_dc() does not work corre...
Yasuma Takeda [Wed, 11 Feb 2009 22:36:51 +0000 (14:36 -0800)]
Fix bug #6098 - When the DNS server is invalid, the ads_find_dc() does not work correctly with "security = domain"

1. If DNS server is invalid, the get_sorted_dc_list() is called with
realm(FQDN) and it fails.
2. On the next step, the get_sorted_dc_list() is called with realm(FQDN) again.

I think "again" is wrong place.
On the 2nd step, get_sorted_dc_list() should be called with realm(WORKGROUP).
(cherry picked from commit a8a7040d7dbffe7b1c2bccb8b46e08fb996786ac)

15 years agos3:packaging: fix parsing of include.h in fill-templates
Michael Adam [Wed, 11 Feb 2009 21:27:48 +0000 (22:27 +0100)]
s3:packaging: fix parsing of include.h in fill-templates

The content has changed slightly in master for the merged build,
and we must be more exact when parsing the lines.

Michael
(cherry picked from commit d1b2f90f881d554e844525ddf44232b04f14e8eb)

15 years agos3:packaging: fix path to calling update-pkginfo after pushd in fill-templates
Michael Adam [Wed, 11 Feb 2009 21:25:41 +0000 (22:25 +0100)]
s3:packaging: fix path to calling update-pkginfo after pushd in fill-templates

Michael
(cherry picked from commit 88a3430e6db9fe31fe711a6fdc90d6604dac63e3)

15 years agos3:packaging: paths cosmetics in fill-templates
Michael Adam [Wed, 11 Feb 2009 21:24:52 +0000 (22:24 +0100)]
s3:packaging: paths cosmetics in fill-templates

Michael
(cherry picked from commit d75e0756a39e30414d5277edd2e098da9cec464e)

15 years agoenable IPv6 support for NetBSD, FreeBSD
Björn Jacke [Wed, 11 Feb 2009 15:34:02 +0000 (16:34 +0100)]
enable IPv6 support for NetBSD, FreeBSD

most systems include netinet/in.h via netdb.h but *BSD don't.
(cherry picked from commit 5b551d6e3ef2c69a5fd050abcecb4c6b0ab36402)

15 years agos3:build: some implementations of "ln" are picky about the order of arguments
Michael Adam [Wed, 11 Feb 2009 10:02:57 +0000 (11:02 +0100)]
s3:build: some implementations of "ln" are picky about the order of arguments

Michael
(cherry picked from commit 1ea19073afa1e9a04f18763b731d792ffe97d499)

15 years agoFix resume handle for _samr_EnumDomainGroups
Volker Lendecke [Wed, 11 Feb 2009 03:08:46 +0000 (19:08 -0800)]
Fix resume handle for _samr_EnumDomainGroups
(cherry picked from commit 5f69f4a57ec0942d3c5c6969cb2bccab0ca6ec4c)

15 years agopackaging: make update-pkginfo callable from any directory
Michael Adam [Tue, 10 Feb 2009 22:52:40 +0000 (23:52 +0100)]
packaging: make update-pkginfo callable from any directory

Michael
(cherry picked from commit 7ea90835ebf6e2f2c6f325760800d8361d087ede)
(cherry picked from commit d5d668efc0b5af825344ec01851c105fe91a3096)

15 years agopackaging: use "find" instead of "du" to find files... :-)
Michael Adam [Fri, 12 Sep 2008 13:07:00 +0000 (15:07 +0200)]
packaging: use "find" instead of "du" to find files... :-)

Michael
(This used to be commit 768aa82361a2c4b0aab71433b7593723a2868f0a)
(cherry picked from commit fd7635a1161e25d88a8252a5cf9de70ca2fe4232)
(cherry picked from commit 0f7ced3088f327417e32a509fa3e5b4c3c19b93c)

15 years agopackaging: remove commented out stuff from update-pkginfo
Michael Adam [Tue, 10 Feb 2009 22:50:14 +0000 (23:50 +0100)]
packaging: remove commented out stuff from update-pkginfo

Michael
(cherry picked from commit d714e58ec1f74897cd13e7cd9dd9003600052b45)
(cherry picked from commit 6e47cc96526961486e545285a46f2bc31e6cd2a2)

15 years agopackaging: don't clutter the output of fillup-templates with popd output
Michael Adam [Tue, 10 Feb 2009 22:31:52 +0000 (23:31 +0100)]
packaging: don't clutter the output of fillup-templates  with popd output

Michael
(cherry picked from commit 0c711935d30b500a15ef06fd658d382b2c1e2c84)
(cherry picked from commit 9e54a408acab42abb073c8660cadebdd0975fa04)

15 years agopackaging: fix fill-templates call to update-pkginfo to pushd appropriately first
Michael Adam [Tue, 10 Feb 2009 22:30:48 +0000 (23:30 +0100)]
packaging: fix fill-templates call to update-pkginfo to pushd appropriately first

Michael
(cherry picked from commit c28d4ae537d9fc0b76eae758d32356eaf1113c89)
(cherry picked from commit 0f9cfcb7a1b34a6e76209a0fe0e8d49e3ffe15c5)

15 years agopackaging: add script fill-templates
Michael Adam [Tue, 10 Feb 2009 17:54:16 +0000 (18:54 +0100)]
packaging: add script fill-templates

This is a standalone-wrapper for update-pkginfo, which is
usually called from create-tarball. It basically repeats
some functionality of create-tarball.

Michael
(cherry picked from commit ca23469a906bab690162184e8d3949897f7b5a67)
(cherry picked from commit 3c7927141d0fa586440ecd4c39bd601c1f9a5bfa)

15 years ago[Bug 6069] Add a fstatvfs function for libsmbclient
Derrell Lipman [Tue, 10 Feb 2009 20:03:32 +0000 (15:03 -0500)]
[Bug 6069] Add a fstatvfs function for libsmbclient

- Fill in the remainder of the data (or at least as much as we can get) for
  the fstatvfs return value.

Derrell
(cherry picked from commit eeeceea8b92b8b814209f496a7ab953dcd0a8367)

15 years ago[Bug 6069] Add a fstatvfs function for libsmbclient
Derrell Lipman [Tue, 10 Feb 2009 15:28:32 +0000 (10:28 -0500)]
[Bug 6069] Add a fstatvfs function for libsmbclient

- Reverse the sense of the flags. Since the fstatvfs() function on POSIX-like
  systems would almost certainly indicate case sensitivity (for example),
  leave the bit turned off if the result is the POSIX-like result just as if
  issued on a typical local file system on a POSIX system.

Derrell
(cherry picked from commit 0acc962e3968253a3f64b5a92def177ced44994d)

15 years agos3-spoolss: fix memleak in get_remote_printer_publishing_data().
Günther Deschner [Tue, 10 Feb 2009 09:59:34 +0000 (10:59 +0100)]
s3-spoolss: fix memleak in get_remote_printer_publishing_data().

Guenther
(cherry picked from commit 97f1514ce95800f1296b1979f1b34dcc5d56a376)

15 years ago[Bug 6069] Add a fstatvfs function for libsmbclient
Derrell Lipman [Tue, 10 Feb 2009 03:46:29 +0000 (22:46 -0500)]
[Bug 6069] Add a fstatvfs function for libsmbclient

- Complete the implementation of the f_flag field. We now return a flag
  indicatin UNIX CIFS, CASE SENSITIVE, and/or DFS support.

Derrell
(cherry picked from commit df15e8f84d108f8e9df1408155b0f9ccc44da3fe)

15 years agoRevert "s3:winbindd_user: create domain connection in winbindd_fill_pwent if necessary."
Michael Adam [Mon, 9 Feb 2009 22:26:36 +0000 (23:26 +0100)]
Revert "s3:winbindd_user: create domain connection in winbindd_fill_pwent if necessary."

This reverts commit 3981603761a1cc6fb74ff135fadf4ab3340be1c5.

I was confused about the real meaning of find_domain_from_name_noinit()
vs. find_domain_from_name(). We don't need the connection established
here, just the domain struct which gets initialized by rescan_trusted_domains().

Sorry for the noise.

Michael
(cherry picked from commit c8e295a1b5216c1190ec5d555606b3eadabab82a)

15 years agodocs: Add man sharesec.
Karolin Seeger [Mon, 9 Feb 2009 20:00:47 +0000 (21:00 +0100)]
docs: Add man sharesec.

Karolin
(cherry picked from commit cc51cbc862055975bcef016876662576b00e72ef)
(cherry picked from commit b16d6aaf981e6b0b7c706f6abd659dc3cde30094)

15 years ago[Bug 6069] Add a fstatvfs function for libsmbclient
Derrell Lipman [Mon, 9 Feb 2009 17:41:29 +0000 (12:41 -0500)]
[Bug 6069] Add a fstatvfs function for libsmbclient

- Add initial test implementation. This works on a Linux client to determine
  whether a connection's server supports UNIX CIFS. I'm eager to see what the
  build farm has to say about this, specifically how many, if any, hosts don't
  provide a statvfs.h file with the requisite struct statvfs.

Derrell
(cherry picked from commit ff6a1bebd589637a4aecb9c76b4e33f579d7b0df)

15 years agos3:winbindd_user: create domain connection in winbindd_fill_pwent if necessary.
Michael Adam [Mon, 9 Feb 2009 12:50:31 +0000 (13:50 +0100)]
s3:winbindd_user: create domain connection in winbindd_fill_pwent if necessary.

Calling find_domain_from_name_noinit() might not be enough here.
This makes winbindd_getpwent() behave the same as winbindd_getgrent().

Michael

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 3981603761a1cc6fb74ff135fadf4ab3340be1c5)

15 years agos3:winbindd_user: fix a debug message.
Michael Adam [Mon, 9 Feb 2009 10:07:11 +0000 (11:07 +0100)]
s3:winbindd_user: fix a debug message.

find_domain_from_name_noinit() is no longer called only for
name alias support.

Michael

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit ca6e3ee1e52b16e88f3906dc4cf64e977e165663)

15 years agoFix coverity ID 876 (FORWARD_NULL)
Volker Lendecke [Sat, 7 Feb 2009 10:09:45 +0000 (11:09 +0100)]
Fix coverity ID 876 (FORWARD_NULL)

Michael, please check!

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit bd0febbd1b390b2890df13fbfed5bf26dede658f)

15 years agoFix count in _srvsvc_NetDiskEnum()
Volker Lendecke [Mon, 9 Feb 2009 11:32:16 +0000 (12:32 +0100)]
Fix count in _srvsvc_NetDiskEnum()

Without this, remotely adding a share via MMC fails
(cherry picked from commit 197b4c42bbf53347f4953e39099192693d709a7d)
(cherry picked from commit 7f6bf488fd3758f631edcade61378955cf9bf674)

15 years agos3-rpcclient: fix getform command asprintf return code.
Günther Deschner [Sun, 8 Feb 2009 23:06:36 +0000 (00:06 +0100)]
s3-rpcclient: fix getform command asprintf return code.

Guenther
(cherry picked from commit 6dc87c67198f27c359370399022910ba77c1d44d)

15 years agoeliminate compiler warnings
Derrell Lipman [Mon, 9 Feb 2009 03:07:25 +0000 (22:07 -0500)]
eliminate compiler warnings
(cherry picked from commit b657020d0a3d43099e55956d13a7a73324888bcb)

15 years agomount.cifs: initialize rc to 0 in main
Jeff Layton [Fri, 6 Feb 2009 13:31:45 +0000 (08:31 -0500)]
mount.cifs: initialize rc to 0 in main

The value of rc in main() isn't initialized in the declaration. This
wasn't a problem before, but Shirish's fakemount patch can make it so
that we return the uninitialized variable if the -n flag is used.

Fix this by initializing rc to 0.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 45d75ece3e35b5180e82dc0488b13fbd2a93c41e)

15 years agomount.cifs: add fakemount (-f) and nomtab (-n) flags to mount.cifs
Shirish Pargaonkar [Fri, 6 Feb 2009 13:15:35 +0000 (08:15 -0500)]
mount.cifs: add fakemount (-f) and nomtab (-n) flags to mount.cifs

...so that these options work correctly when passed in by mount(8).
(cherry picked from commit 5cd79db1326d70c592e86491d36567a2eb4e1717)

15 years agos3:net conf: remove check for sharename being a usernam in "net conf addshare"
Michael Adam [Fri, 6 Feb 2009 09:42:11 +0000 (10:42 +0100)]
s3:net conf: remove check for sharename being a usernam in "net conf addshare"

This is useless and can be overriden by "net conf setparm" anyways.

Michael
(cherry picked from commit e513360db3f2cc6ff1865ec08fc243dd6346e18e)

15 years agodocs: fix two typos in the mount.cifs manpage
Michael Adam [Thu, 5 Feb 2009 21:19:58 +0000 (22:19 +0100)]
docs: fix two typos in the mount.cifs manpage

Michael
(cherry picked from commit 145fe37766cf1ecffb16a03b58b44d08f7ed7558)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 38ea92a4c1cb0e8c52ccff9b77bb59070030d10c)

15 years agodocs: Clarify "ldap ssl" description in man smb.conf.
Karolin Seeger [Fri, 6 Feb 2009 08:41:21 +0000 (09:41 +0100)]
docs: Clarify "ldap ssl" description in man smb.conf.

Mention "ldap ssl ads".

Karolin
(cherry picked from commit 61f1747441ff43c1d9c99bbf69e218c1984834c7)
(cherry picked from commit ba3884d4d5c55723c1989e8e3868aa7ea8db8c60)

15 years agodocs: Add description of "ldap ssl ads" to man smb.conf.
Karolin Seeger [Fri, 6 Feb 2009 08:10:15 +0000 (09:10 +0100)]
docs: Add description of "ldap ssl ads" to man smb.conf.

Karolin
(cherry picked from commit 02f13538f00cc8368e3e5e8e510bac468c21089b)
(cherry picked from commit fef1a664de477b3d434b9d8c276933236042ae20)

15 years agoDon't try and delete a default ACL from a file.
Günter Kukkukk [Fri, 6 Feb 2009 02:59:03 +0000 (18:59 -0800)]
Don't try and delete a default ACL from a file.
(cherry picked from commit 1d277bdb6997e3b913bcd1c0b3173c9c735e64c1)

15 years agoHave nmbd check all available interfaces for WINS before failing
Aravind Srinivasan [Thu, 5 Feb 2009 22:46:59 +0000 (14:46 -0800)]
Have nmbd check all available interfaces for WINS before failing

When nmbd is acting as WINS, it picks the first interface's IP as WINS
server's IP. If the first interface's IP is zero, we will just quit
(even though we might have other interfaces with valid IPs).

This patch makes nmbd look at all interfaces and pick the first interface
with a valid IP as the WINS server's IP.
(cherry picked from commit d998ee9025f2ad2df73e25c12e35e9218b97147e)

15 years agoumount.cifs: clean-up entries in /etc/mtab after unmount
Shirish Pargaonkar [Thu, 5 Feb 2009 19:16:53 +0000 (14:16 -0500)]
umount.cifs: clean-up entries in /etc/mtab after unmount

This patch removes the remaining entry in /etc/mtab after a filesystem
is unmounted by canonicalizing the mountpoint supplied on the command
line.

Please refer to bug 4370 in samba bugzilla.
(cherry picked from commit 544faebe894b2b0661d6c9fe68ee7c01945ee824)

15 years agos3/libads: Change "ldap ssl:ads" parameter to "ldap ssl ads".
Karolin Seeger [Thu, 5 Feb 2009 14:55:14 +0000 (15:55 +0100)]
s3/libads: Change "ldap ssl:ads" parameter to "ldap ssl ads".

This used to be commit 3f9daf43.

Karolin
(cherry picked from commit 91c78b7d2bbb52015378f2a9752e783df33a6fff)

15 years agos3-net: remove unused ENUM_HND.
Günther Deschner [Wed, 4 Feb 2009 22:55:54 +0000 (23:55 +0100)]
s3-net: remove unused ENUM_HND.

Guenther
(cherry picked from commit a713060a6e36706cfd5b997aa4cbfabf4e180c84)

15 years agoFix bug #Bug 6090 renaming or deleting a "not matching/resolving" symlink is failing.
Jeremy Allison [Wed, 4 Feb 2009 23:35:02 +0000 (15:35 -0800)]
Fix bug #Bug 6090 renaming or deleting a "not matching/resolving" symlink is failing.
Reported by Kukks. Make sure we correctly use LSTAT in all cases where
POSIX pathnames are being used. This matters when dealing with symlinks
pointing to invalid paths being renamed or deleted not all deletes and
renames are done via an nt_create open.
Jeremy.
(cherry picked from commit 249dab1abbf49b0ca45360eb9aedb20d51a80e5f)

15 years agoFix bug #6085 - In vfs_default.c change utime( ) call.
Miguel Suarez [Tue, 3 Feb 2009 22:35:19 +0000 (14:35 -0800)]
Fix bug #6085 - In vfs_default.c change utime( ) call.
(cherry picked from commit 2937519665be41237ee0f2c3374bea716bf95e8a)

15 years agoProbably fixes a crash during name resolution when log level >= 10
Ted Percival [Tue, 3 Feb 2009 22:10:20 +0000 (14:10 -0800)]
Probably fixes a crash during name resolution when log level >= 10
and libc segfaults if printf is passed NULL for a "%s" arg
(eg. Solaris).
(cherry picked from commit 16e49e8be8a942aa77a013c197a20d4c0bb3875f)

15 years agos3: Fix 'net rpc join' for users with the SeMachineAccountPrivilege.
Volker Lendecke [Tue, 3 Feb 2009 13:41:49 +0000 (14:41 +0100)]
s3: Fix 'net rpc join' for users with the SeMachineAccountPrivilege.

This used to be commit fda8abac in master.
(cherry picked from commit 5994c90ff8754b64a3a6658e28bd94f6a91a441b)

15 years agoFix bug #6082 - smbd_gpfs_getacl failed: Windows client can´t rename or delete file
Jeremy Allison [Tue, 3 Feb 2009 01:11:15 +0000 (17:11 -0800)]
Fix bug #6082 - smbd_gpfs_getacl failed: Windows client can´t rename or delete file
This fixes the generic rename/delete problem for 3.3.0 and above.
Fixed slightly differently to discussions, user viewable modified
ACLs are not a good idea :-).
Jeremy.
(cherry picked from commit c5462c8b43435763783185a03029903efe3b0c11)

15 years agoAdjust regex to match variable names including underscores
Lars Müller [Mon, 2 Feb 2009 20:38:38 +0000 (21:38 +0100)]
Adjust regex to match variable names including underscores

This is required to get the CIFSUPCALL_PROGS setting extracted from
config.log.
(cherry picked from commit 64982295fccc5758aff4464b5527a27621386bc9)

15 years agoConditional install of the cifs.upcall man page
Lars Müller [Mon, 2 Feb 2009 20:12:52 +0000 (21:12 +0100)]
Conditional install of the cifs.upcall man page

Only install the cifs.upcall man page if CIFSUPCALL_PROGS was set while
configure.
(cherry picked from commit e9e2414e798a2eb447de45803e61cc0a49752f11)

15 years agos3 build: Fix "assignment discards qualifiers from pointer target type" warnings
Tim Prouty [Mon, 2 Feb 2009 07:59:53 +0000 (23:59 -0800)]
s3 build: Fix "assignment discards qualifiers from pointer target type" warnings
(cherry picked from commit 1aa6c76dd003b0c625c6910bb78798a7d98c5a8c)

15 years agodocs: Describe "service" in man mount.cifs.
Karolin Seeger [Mon, 2 Feb 2009 10:46:39 +0000 (11:46 +0100)]
docs: Describe "service" in man mount.cifs.

This fixes bug #5346.
Thanks to the Debian Samba package maintainers for reporting and providing a
patch!

Karolin
(cherry picked from commit 73f4fc1f802f31459b70dba4777d142d00fcdd92)
(cherry picked from commit ab4768452811e67f6606253b5a79101184f777d0)

15 years agofix build with external dns_sd libraries
Björn Jacke [Sun, 1 Feb 2009 02:22:41 +0000 (03:22 +0100)]
fix build with external dns_sd libraries

This used to be commit 16f07280 in master.
(cherry picked from commit 89919a131b234485564ff2f2f20e3d9f9eb83522)

15 years agos3:winbind_group: fix "getent group" to allocate new gids.
Michael Adam [Sun, 1 Feb 2009 23:46:57 +0000 (00:46 +0100)]
s3:winbind_group: fix "getent group" to allocate new gids.

"getent group" used to fill the idmap cache with negative
cache entries for unmapped group sids.

Don't pass domain name unconditionally to idmap_sid_to_gid().
idmap_sid_to_gid() only creates new mappings (allocating
idmap backends tdb, tdb2, ldap...) when the domain name passed
in is "".

Note that it is _wrong_ to directly call the idmap_sid_to_gid()
functions here, in the main winbindd. The correct fix would be
to send a sid_to_gid request to winbindd itself, but this needs
more work to prepare the async mechanisms, and we nee a quick
fix for getent passwd now.

Michael
(cherry picked from commit 8c64302915bde8a5400b575389b12e0eaf2cf140)

15 years agos3:winbind_user: fix "getent passwd" to allocate new uids.
Michael Adam [Sun, 1 Feb 2009 23:36:59 +0000 (00:36 +0100)]
s3:winbind_user: fix "getent passwd" to allocate new uids.

"getent passwd" used to fill the idmap cache with negative
cache entries for unmapped user sids.

Don't pass domain name unconditionally to idmap_sid_to_[ug]id().
idmap_sid_to_[ug]id() only creates new mappings (allocating
idmap backends tdb, tdb2, ldap...) when the domain name passed
in is "".

Note that it is _wrong_ to directly call the idmap_sid_to_[ug]id()
functions here, in the main winbindd. The correct fix would be
to send a sid_to_[ug]id request to winbindd itself, but this needs
more work to prepare the async mechanisms, and we nee a quick
fix for getent passwd now.

Michael
(cherry picked from commit 877808450bb108ed306ef77db97a3acc7297e579)

15 years agos3:winbind_user: move initialization of domain up in winbindd_fill_pwent()
Michael Adam [Sun, 1 Feb 2009 23:35:43 +0000 (00:35 +0100)]
s3:winbind_user: move initialization of domain up in winbindd_fill_pwent()

and streamline logic some

Michael
(cherry picked from commit f2acdca4ded8646752d154d55a0ade405f159e17)

15 years agoFix bug 5798: "CFLAGS info lost in configure"
Volker Lendecke [Thu, 2 Oct 2008 00:17:04 +0000 (02:17 +0200)]
Fix bug 5798: "CFLAGS info lost in configure"

picked from 9097a67de

Volker
(cherry picked from commit 9ffb1e6f0ded2647efe567912873a1a63e2ffed1)

15 years agos3-docs: fix typo in eventlogadm manpage.
Günther Deschner [Thu, 22 Jan 2009 18:31:22 +0000 (19:31 +0100)]
s3-docs: fix typo in eventlogadm manpage.

Guenther
(cherry picked from commit fb7b92abc2bea4b3d91cdd896f02db88065a4b8f)
(cherry picked from commit 0cc588ac53316299d2e1ff7d61947fd864d412f9)

15 years agoFix coverity CID#117 - resource leak in error path.
Jeremy Allison [Fri, 30 Jan 2009 01:56:08 +0000 (17:56 -0800)]
Fix coverity CID#117 - resource leak in error path.
Jeremy.
(cherry picked from commit 250caa1f2f285063249b2c4a7266196938d24761)

15 years agoFix coverity CID#116. Resource leak on error path.
Jeremy Allison [Fri, 30 Jan 2009 01:30:45 +0000 (17:30 -0800)]
Fix coverity CID#116. Resource leak on error path.
Jeremy.
(cherry picked from commit 8241669521772cc75a9ca278a7f9a57256907ded)

15 years agoFix coverity CID#115. Resource leak in error path.
Jeremy Allison [Fri, 30 Jan 2009 01:27:16 +0000 (17:27 -0800)]
Fix coverity CID#115. Resource leak in error path.
Jeremy.
(cherry picked from commit 8e11901f92b2ecb976f0c24c5eb96fb6b8127207)

15 years agoadd Tru64 sub-second resolution timestamp support
Björn Jacke [Thu, 29 Jan 2009 21:59:00 +0000 (22:59 +0100)]
add Tru64 sub-second resolution timestamp support
(cherry picked from commit 61465c57b9579a6f25381a9f16bca0852ca67f75)

15 years agoadd configure check for Tru64 sub-second timestamp resolution
Björn Jacke [Thu, 29 Jan 2009 20:59:44 +0000 (21:59 +0100)]
add configure check for Tru64 sub-second timestamp resolution
(cherry picked from commit bc59a4398fb264c75e60881b2eda0f71d05048f0)

15 years agoadd missing semicolons
Björn Jacke [Thu, 29 Jan 2009 19:56:51 +0000 (20:56 +0100)]
add missing semicolons

the fixed configure check led to a missing semicolon in the now activated BSD
code. Then this error was even copypasted into the new AIX code. grrr
(cherry picked from commit ee90448a7aa0a0972e5801b319a011fd52750c20)

15 years agoFollowing Björn JACKE's patch, unify the detection of the timespec code in configure...
Jeremy Allison [Thu, 29 Jan 2009 18:47:02 +0000 (10:47 -0800)]
Following Björn JACKE's patch, unify the detection of the timespec code in configure.in, and the application of it in time.c
Jeremy.
(cherry picked from commit 9ef86eff7ac41a174dcb8eae070eda24006c6c70)

15 years agoadd configure check for AIX style sub-second resolution support
Björn Jacke [Wed, 28 Jan 2009 23:33:19 +0000 (00:33 +0100)]
add configure check for AIX style sub-second resolution support
(cherry picked from commit 86add869c391ab01a749bda7de09bd909f5da634)

15 years agorather cosmetic fix for failed birthtime configure checks
Björn Jacke [Wed, 28 Jan 2009 23:20:00 +0000 (00:20 +0100)]
rather cosmetic fix for failed birthtime configure checks
(cherry picked from commit 39aec29794a2339f37bc431195842aef22bc0504)

15 years agogive configure check "sub-second timestamps without struct timespec" a chance to...
Björn Jacke [Wed, 28 Jan 2009 23:17:12 +0000 (00:17 +0100)]
give configure check "sub-second timestamps without struct timespec" a chance to succeed
(cherry picked from commit 2588a540be2a18bc1c023398bfdd783b8b3c2046)

15 years agos3:configure: autodetect ctdb/cluster support
Stefan Metzmacher [Wed, 28 Jan 2009 16:36:36 +0000 (17:36 +0100)]
s3:configure: autodetect ctdb/cluster support

We need to make sure ctdb has transaction support
and we autodetect ipv6 support.

metze
(cherry picked from commit 11163720e6f30e83f523c5009e1e60b5cf28cda6)
(cherry picked from commit f87f4842cc0ffc62d76ee5350b94f7bda735aa71)

15 years agos3:ctdbd_conn: canonicalize ips before sending them to ctdbd
Stefan Metzmacher [Wed, 28 Jan 2009 17:55:13 +0000 (18:55 +0100)]
s3:ctdbd_conn: canonicalize ips before sending them to ctdbd

This makes samba work with older ctdb versions.

metze
(cherry picked from commit 7540d13956a8a69d25f6fbbc4f9a3417e91db1d2)
(cherry picked from commit a7fcaff295c3a36e2b783398ac212500eef33ecb)

15 years agofix bug #6073: prevent ads_connect() from using SSL unless explicitly requested
Michael Adam [Thu, 29 Jan 2009 12:17:46 +0000 (13:17 +0100)]
fix bug #6073: prevent ads_connect() from using SSL unless explicitly requested

This fixes "net ads join".
It copes with the changed default "ldap ssl = start tls".
A new boolean option "ldap ssl : ads" is added to allow for
explicitly requesting ssl with  ads.

Michael
(cherry picked from commit d332da87068cd72489941010a33e372ab53d3bcc)

15 years agoAvoid valgrind errors
Volker Lendecke [Wed, 28 Jan 2009 09:35:35 +0000 (10:35 +0100)]
Avoid valgrind errors

In event handlers, we might destroy other events that are pending in the lists.
We can only run one event safely per select call.

Yes, I've seen these valgrind errors :-)

Jeremy, with ccdd921e61 you had checked in the change to run multiple events.
Do you remember why it was necessary and could not be solved in a different
way?

Volker
(cherry picked from commit 910cbc5d6e932fa8ed0066d407a40195b6629a37)

15 years agoFix a valgrind error when the socket dies
Volker Lendecke [Tue, 27 Jan 2009 18:41:34 +0000 (19:41 +0100)]
Fix a valgrind error when the socket dies

Don't reference anything that might have been deleted in the async_req_error
call.
(cherry picked from commit 3e9c89e81b2915ba1a2aac7b8d72a780f7f9b80e)

15 years agoFix warning (bad handler prototype) and fix detection of dns_sd
Jeremy Allison [Wed, 28 Jan 2009 00:17:55 +0000 (16:17 -0800)]
Fix warning (bad handler prototype) and fix detection of dns_sd
libraries.
Jeremy.
(cherry picked from commit a8a8dde5ac2b0c0b33e49af685650440469b287f)

15 years agoFix bug #6069 - Build breaks with too many arguments to
Jeremy Allison [Tue, 27 Jan 2009 23:47:47 +0000 (15:47 -0800)]
Fix bug #6069 - Build breaks with too many arguments to
samba-3.3.0/source/smbd/dnsregister.c:85:event_add_timed().
Jeremy.
(cherry picked from commit 458a6a4265bc9b429375d7efb52d25969d7faad5)

15 years agoWHATSNEW: oops, the wrong parameter was reported to have been removed.
Michael Adam [Tue, 27 Jan 2009 21:13:47 +0000 (22:13 +0100)]
WHATSNEW: oops, the wrong parameter was reported to have been removed.

Micheal
(cherry picked from commit 8c35bb3c9fc0834ff1d6915b7b4098e1dc712ed1)

15 years agolibreplace: fix detection of netinet/ip.h on solaris 8
Michael Adam [Tue, 27 Jan 2009 14:48:20 +0000 (15:48 +0100)]
libreplace: fix detection of netinet/ip.h on solaris 8

(The test needs to additionally include <netinet/in_systm.h>.)

Michael
(cherry picked from commit a223b096700bc54b446a0e152c842b088566720b)

15 years agolibreplace: fix bug #6066 - netinet/ip.h present but cannot be compiled
Michael Adam [Tue, 27 Jan 2009 11:13:55 +0000 (12:13 +0100)]
libreplace: fix bug #6066 - netinet/ip.h present but cannot be compiled

under solaris

Michael
(cherry picked from commit 1b7beaed69823b3c401bc4c0b1c502b671169168)

15 years agoDocument default of the printing config variable. samba-3.3.0
Andreas Schneider [Mon, 26 Jan 2009 13:38:34 +0000 (14:38 +0100)]
Document default of the printing config variable.

Signed-off-by: Andreas Schneider <anschneider@suse.de>
(cherry picked from commit d8f15e4efc00b9d509ff5761e9ca8ff5c6f443f7)
(cherry picked from commit 541704e253f06f8b33006b6c27f51b934c2eb51f)

15 years agodocs: Adapt version number in new vfs_fileid manpage.
Karolin Seeger [Mon, 26 Jan 2009 13:19:48 +0000 (14:19 +0100)]
docs: Adapt version number in new vfs_fileid manpage.

Karolin
(cherry picked from commit 3069401f5b46cfe2d2909c3d7ae75419ac5e673e)

15 years agodocs: Adapt version number in new vfs_shadow_copy2 manpage.
Karolin Seeger [Mon, 26 Jan 2009 13:19:07 +0000 (14:19 +0100)]
docs: Adapt version number in new vfs_shadow_copy2 manpage.

Karolin
(cherry picked from commit fd5ee7b35ffb7dd7dab1e17a01534470c12f415b)

15 years agodocs: Add manpage for vfs_shadow_copy2.
Karolin Seeger [Mon, 26 Jan 2009 13:17:23 +0000 (14:17 +0100)]
docs: Add manpage for vfs_shadow_copy2.

Karolin
(cherry picked from commit 512cf0ad50d30fcb35a28b0ef1b859d754f42a99)
(cherry picked from commit 7ca4b8ec65d5f8794c58f27f3f17033143732897)

15 years agos3-eventlog: fix various invalid memcpy in read_package_entry().
Günther Deschner [Sat, 24 Jan 2009 01:10:47 +0000 (02:10 +0100)]
s3-eventlog: fix various invalid memcpy in read_package_entry().

Guenther
(cherry picked from commit 75fff603625e0259f187e0fa47efd85887092fae)

15 years agos3-eventlog: fix buffer allocation in eventlog read call.
Günther Deschner [Sat, 24 Jan 2009 01:07:40 +0000 (02:07 +0100)]
s3-eventlog: fix buffer allocation in eventlog read call.

This broke with f6fa3080fee1b20df9f1968500840a88cf0ee592 back in April 2007...

Guenther
(cherry picked from commit 547c70e896b6890dd5f7b911e4e0ca107c8a3fa3)

15 years agodocs: Fix formatting issue in man libsmbclient.
Karolin Seeger [Fri, 23 Jan 2009 12:02:46 +0000 (13:02 +0100)]
docs: Fix formatting issue in man libsmbclient.

Karolin
(cherry picked from commit aa2fb0efb7ce2bc732569b4baf20c57375fdce59)
(cherry picked from commit e1e3a0554fcaabacc5bec51c213622271a83ad04)

15 years agoWHATSNEW: Add note about libsmbclient changes.
Karolin Seeger [Fri, 23 Jan 2009 10:51:56 +0000 (11:51 +0100)]
WHATSNEW: Add note about libsmbclient changes.

Karolin
(cherry picked from commit 3a4e410e7802073e159b6e4dfdfb3319053503f9)

15 years agolib/replace: add defines to let the callers find out if pwrite and pread are thread...
Stefan Metzmacher [Thu, 22 Jan 2009 10:52:54 +0000 (11:52 +0100)]
lib/replace: add defines to let the callers find out if pwrite and pread are thread/fork safe

metze
(cherry picked from commit 7fc7ee9331d0539359ad88c527f59d5fdf212209)
(cherry picked from commit d74b63091781e442e42b1fa7881e903a0bcc928c)

15 years agoWHATSNEW: Add "Changes since" sections of pre releases and RCs.
Karolin Seeger [Fri, 23 Jan 2009 10:09:07 +0000 (11:09 +0100)]
WHATSNEW: Add  "Changes since" sections of pre releases and RCs.

Karolin
(cherry picked from commit 646468f1a504a1ab00b27f9e61d56acbc42ffda9)

15 years agoWHATSNEW: Update changes since 3.3.0rc2.
Karolin Seeger [Fri, 23 Jan 2009 09:36:25 +0000 (10:36 +0100)]
WHATSNEW: Update changes since 3.3.0rc2.

Karolin
(cherry picked from commit 50b8d5a1625d22512cf32b0bcd2f068e364a7403)

15 years agoApply same logic fix for #4308 Excel save operation corrupts file ACLs
Jeremy Allison [Fri, 23 Jan 2009 00:22:04 +0000 (16:22 -0800)]
Apply same logic fix for #4308 Excel save operation corrupts file ACLs
to NFSv4 ACL code as this uses the same flawed logic as posix_acls.c.
Jeremy.
(cherry picked from commit cad872fc385ba30fb72baab25ee6341a41396e39)

15 years agoFix logic error in try_chown - we shouldn't arbitrarily chown
Jeremy Allison [Fri, 23 Jan 2009 00:09:26 +0000 (16:09 -0800)]
Fix logic error in try_chown - we shouldn't arbitrarily chown
to ourselves unless that was passed in.
Jeremy.
(cherry picked from commit db2d56484e21daeb91df4b5e2286d242910336e8)

15 years agoSecond part of the attemt to fix #4308 - Excel save operation corrupts file ACLs.
Jeremy Allison [Thu, 22 Jan 2009 22:32:32 +0000 (14:32 -0800)]
Second part of the attemt to fix #4308 - Excel save operation corrupts file ACLs.
If the chown succeeds then the ACL set should also. Ensure this is the case
(refactor some of this code to make it simpler to read also).
Jeremy.
(cherry picked from commit 90b660e2382711d005e8c4c4ae1c6adbd5e5b687)

15 years agoAnother attempt to fix bug #4308 - Excel save operation corrupts file ACLs.
Jeremy Allison [Thu, 22 Jan 2009 18:59:14 +0000 (10:59 -0800)]
Another attempt to fix bug #4308 - Excel save operation corrupts file ACLs.
Simo is completely correct. We should be doing the chown *first*, and fail the
ACL set if this fails. The long standing assumption I made when writing the
initial POSIX ACL code was that Windows didn't control who could chown a file
in the same was as POSIX. In POSIX only root can do this whereas I wasn't sure
who could do this in Windows at the time (I didn't understand the privilege
model). So the assumption was that setting the ACL was more important (early
tests showed many failed ACL set's due to inability to chown). But now we have
privileges in smbd, and we must always fail an ACL set when we can't chown
first. The key that Simo noticed is that the CREATOR_OWNER bits in the ACL
incoming are relative to the *new* owner, not the old one. This is why the old
user owner disappears on ACL set - their access was set via the USER_OBJ in the
creator POSIX ACL and when the ownership changes they lose their access.

Patch is simple - just ensure we do the chown first before evaluating the
incoming ACL re-read the owners. We already have code to do this it just wasn't
rigorously being applied.
Jeremy.
(cherry picked from commit 96b819e04cd71a6c899801ae68031bf55b54ea46)

15 years agoMemory leaks and other fixes found by Coverity
todd stecher [Thu, 22 Jan 2009 18:17:37 +0000 (10:17 -0800)]
Memory leaks and other fixes found by Coverity
(cherry picked from commit ba576efa8f884f3dd37bb5035fbb47ae0305c0b0)

15 years agobuild-docs: cleanup exit of the script
Michael Adam [Wed, 21 Jan 2009 14:10:10 +0000 (15:10 +0100)]
build-docs: cleanup exit of the script

exit in the directory where it was called using pushd/popd.

Michael
(cherry picked from commit b319549f129b1c79afc9bfd4a84f2730b96d69a3)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit b7d6536b323df9c5503b6a225e03a47ae2112e5c)

15 years agos3:docs: clean build/catalog.xml in "make clean"
Michael Adam [Wed, 21 Jan 2009 14:09:46 +0000 (15:09 +0100)]
s3:docs: clean build/catalog.xml in "make clean"

Michael
(cherry picked from commit 5e21fc3506f2ba7b1135b1acad2697dfb86b5df0)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit a33ec84ef7c64bf94526383340fb446e86d919e0)

15 years agos3:docs: clean generated .png images in "make clean"
Michael Adam [Wed, 21 Jan 2009 14:09:12 +0000 (15:09 +0100)]
s3:docs: clean generated .png images in "make clean"

Michael
(cherry picked from commit 9b32e839bec8611c30745607a3a6b124d5b34c01)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 6a9346f0c2f900d95d0ba3ae0bdb22a6e88a7916)

15 years agos3:docs: clarify explanation of the allocator in the idmap_ldap manpage
Michael Adam [Wed, 21 Jan 2009 09:56:34 +0000 (10:56 +0100)]
s3:docs: clarify explanation of the allocator in the idmap_ldap manpage

Michael
(cherry picked from commit 816934faa8bbe53dd299bc5e39f471eafdddefa8)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 0b1036d5d6e06e2fa14dab163d51a902ca63fc0a)

15 years agos3:docs: clarify explanation of the allocator in the idmap_tdb manpage
Michael Adam [Wed, 21 Jan 2009 09:55:19 +0000 (10:55 +0100)]
s3:docs: clarify explanation of the allocator in the idmap_tdb manpage

Michael
(cherry picked from commit 665b5dc70333ca36129a6fe06645bd9faa4f2350)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 83a03a3ced255f0a64935fe788ac3b0ddf669ca5)

15 years agos3:docs: clarify explanation of allocator in the idmap_tdb2 manpage
Michael Adam [Wed, 21 Jan 2009 09:49:48 +0000 (10:49 +0100)]
s3:docs: clarify explanation of allocator in the idmap_tdb2 manpage

Michael
(cherry picked from commit 65b79200e46751278c125ad260d899d10d6466a2)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 73a835335e329f0aaa0b72ebfd538b8c2b813812)

15 years agos3:docs: fix copy and paste error in the idmap_tdb2 manpage
Michael Adam [Wed, 21 Jan 2009 09:38:49 +0000 (10:38 +0100)]
s3:docs: fix copy and paste error in the idmap_tdb2 manpage

Michael
(cherry picked from commit bd252ad665547d2ad012725ccb18720e160d221f)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit ea5be10d0656d4f7edec43a4cb926573050823aa)

15 years agos3:docs: add a manpage for idmap_tdb2
Michael Adam [Tue, 20 Jan 2009 23:56:03 +0000 (00:56 +0100)]
s3:docs: add a manpage for idmap_tdb2

Michael
(cherry picked from commit 84f2b2d731fb7d97c98414196bf96ee94ea88bb3)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c52948a2b019bb1620ffa69605673d88bfa34bb4)

15 years agos3:docs: update the idmap_ldap manpage to reflect current facts.
Michael Adam [Tue, 20 Jan 2009 23:13:29 +0000 (00:13 +0100)]
s3:docs: update the idmap_ldap manpage to reflect current facts.

Michael
(cherry picked from commit 7c5621b6e09d9ae3fe936a86e46d1b0f35906e6d)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 1bbc5f228b8b73a623f7afc5eb79c08757366029)