samba.git
15 years agos3/swat: Fix creation of the first share using SWAT.
Volker Lendecke [Tue, 6 Jan 2009 14:13:43 +0000 (15:13 +0100)]
s3/swat: Fix creation of the first share using SWAT.

This fixes bug #5965.
(cherry picked from commit f76614169f1e0a932cf2895702cfa9e8a5735875)
(cherry picked from commit 148437fcd0896591ebbf6c2808723575d025123f)
(cherry picked from commit 3ee41667d7bb8358c80af24f78dbdd071fa9c765)

15 years agodocs: Improve description of the share commands in man smb.conf.
Karolin Seeger [Tue, 6 Jan 2009 11:26:23 +0000 (12:26 +0100)]
docs: Improve description of the share commands in man smb.conf.

-Correct the parameter names.
-Fix typos.
-Fix related parameters.

This fixes bug #6008.
Thanks to TAKAHASHI Motonobu <monyo@samba.gr.jp> for reporting!

Karolin
(cherry picked from commit 8b7f66c548ed170d2dab0c91ccff4aca00f4b52d)
(cherry picked from commit 6f38786aa878bd1a7fc10069773c19b28437fbbb)
(cherry picked from commit f420b5c2af7d46e88269d9ec89c5dcd37f1f8f46)
(cherry picked from commit 98e2d6614f00f207de42a79d329b63e7966ab8ea)

15 years agodocs: Fix example in man vfs_recycle.
Karolin Seeger [Tue, 6 Jan 2009 09:26:37 +0000 (10:26 +0100)]
docs: Fix example in man vfs_recycle.

This fixes bug #6001.
Thanks to TAKAHASHI Motonobu <monyo@samba.gr.jp> for reporting!

Karolin
(cherry picked from commit 9f44a17c3bf36067d04cec036c3e529798932cd7)
(cherry picked from commit 5e073807f7c4679dd299a2b8f3e2643dc1c82405)
(cherry picked from commit c0877d14cb04956b29ca329897a7b4bface7f363)
(cherry picked from commit 232503ba417f51d93e22a2411b2d446596284e59)

15 years agoexamples: Avoid bashism in perfcount.init.
Karolin Seeger [Mon, 5 Jan 2009 15:33:00 +0000 (16:33 +0100)]
examples: Avoid bashism in perfcount.init.

This fixes bug #6000.
Thanks to the Debian Samba package maintainers for providing the patch!
Remove trailing whitespaces.

Karolin
(cherry picked from commit 2e09746a4db4186c9d648370b9004971bc18e5c9)
(cherry picked from commit 9b17f7907bca32282d6e56fa28ca62ef84bf7afc)
(cherry picked from commit de41f0e9a08b796873bdd319fe784b6c90e28b23)
(cherry picked from commit e5e8a4a6fa866a23377d0a92eff433b59abfcebe)

15 years agoRevert "examples: Avoid bashism in perfcount.init."
Karolin Seeger [Mon, 5 Jan 2009 15:38:25 +0000 (16:38 +0100)]
Revert "examples: Avoid bashism in perfcount.init."

This reverts commit 744c7007b4b798699613e06933f92fdf5261b222.
(cherry picked from commit 26080fd575df450166e13836ea227a6d191e86c4)

15 years agoexamples: Avoid bashism in perfcount.init.
Karolin Seeger [Mon, 5 Jan 2009 13:54:28 +0000 (14:54 +0100)]
examples: Avoid bashism in perfcount.init.

This fixes bug #6000.
Thanks to the Debian Samba package maintainers for providing the patch!
Remove trailing whitespaces.

Karolin
(cherry picked from commit 73875cd344608b591fa884ab99b5f3a10550c149)
(cherry picked from commit e273c07e94ee607bbf05b6fa66cf3cea13fe4502)
(cherry picked from commit a1bf1f1819ab184682327583d05b0258db8856ef)
(cherry picked from commit b4ffffc5c03b69ac2f8e0ed74fd7788549f7e822)
(cherry picked from commit 744c7007b4b798699613e06933f92fdf5261b222)

15 years agodocs: Document the -g option of smbclient.
Karolin Seeger [Mon, 5 Jan 2009 13:39:59 +0000 (14:39 +0100)]
docs: Document the -g option of smbclient.

This fixes bug #6013.
Thanks to the Debian Samba packages maintainers for reporting!

Karolin
(cherry picked from commit 6752d78e946b2c4278e2deba325c76fb7ffbc06a)
(cherry picked from commit e6abdbde9b67801d46c9d331045d155717e8b241)
(cherry picked from commit 8a79b8796f98dd80b6e1f04d7302fb8342f0052d)
(cherry picked from commit 1f979334266706656874fdbe6cce14f17105360b)
(cherry picked from commit 74f5828112581fa230301f43f7685ec208a8e4f6)

15 years agoHappy New Year!
Stefan Metzmacher [Fri, 2 Jan 2009 08:46:17 +0000 (09:46 +0100)]
Happy New Year!

metze
(cherry picked from commit 041435d841b457f493c940e0281cd496b52fb7dc)

15 years agos3/smb.h: Remove unused LDAP_SSL_ON.
Karolin Seeger [Wed, 17 Dec 2008 15:26:43 +0000 (16:26 +0100)]
s3/smb.h: Remove unused LDAP_SSL_ON.

LDAP_SSL_ON is not defined at all.
Ldaps can be used by specifying an ldaps URL using the "passdb backend"
parameter.

Karolin
(cherry picked from commit 0c6cf1f8793edfde924289aafbd174ce4a4fae0c)
(cherry picked from commit 7f36de6906811d4f0428b75c79c72b17b8ccfcef)
(cherry picked from commit a3113657b4427eddcfbb10d71e9e8ade06bbd16f)

15 years agos3/loadparm.c: Change default value for "ldap ssl".
Karolin Seeger [Wed, 17 Dec 2008 14:53:51 +0000 (15:53 +0100)]
s3/loadparm.c: Change default value for "ldap ssl".

LDAP_SSL_ON is not defined at all. That's why the actual default value
was "" for a long time. Set a more sensible default value without chnging the
default behaviour.

-----8<------------------snip--------------8<--------------
user@host:/data/git/samba/v3-0-test/source> git grep LDAP_SSL_ON | cat
include/smb.h:enum ldap_ssl_types {LDAP_SSL_ON, LDAP_SSL_OFF,
LDAP_SSL_START_TLS};
param/loadparm.c:       Globals.ldap_ssl = LDAP_SSL_ON;
----->8------------------snap-------------->8--------------

It's the same in 3.2 and 3.3 series.

Karolin
(cherry picked from commit e6d883e003d4560c55259ae1cfdf7319602f76e3)
(cherry picked from commit 5c686419096362176d80f3d05339b8836d0178a4)
(cherry picked from commit 7a39f3eaf571fd9da6f8e103eeb50c5bcebd18c1)

15 years agodocs: Update section "ldap ssl" in man smb.conf.
Karolin Seeger [Wed, 17 Dec 2008 15:18:38 +0000 (16:18 +0100)]
docs: Update section "ldap ssl" in man smb.conf.

Remove non-existent value "on".
Change default value to "no".
Add hint about ldaps.

Karolin
(cherry picked from commit 580461629bb88ce3b61770e7abfe2c942a121877)
(cherry picked from commit d74356627579fe7b9961844a77c4e6daa978d62b)
(cherry picked from commit 882ac5e5a79646754dfd1669ea6720ab52c9b6ee)
(cherry picked from commit e147c4679f8095738fea6ab2c9fb37fbecc9bb85)

15 years agodocs: Fix some formatting issues in the "ldap ssl" section of man smb.conf.
Karolin Seeger [Wed, 17 Dec 2008 14:42:12 +0000 (15:42 +0100)]
docs: Fix some formatting issues in the "ldap ssl" section of man smb.conf.

Karolin
(cherry picked from commit 6ac36698e975649d26e3f2975c2101129c3ffe97)
(cherry picked from commit 655a1c7b05d56326d6cfffbc8e46e1d64565717a)
(cherry picked from commit 2534619eedc3e9528d589cfee793a55b3cc62bed)
(cherry picked from commit 78ec02e8221aea7633ed63f5fc5084a12c9796d4)

15 years agodocs: Fix TOC of generated HTML docs.
Karolin Seeger [Wed, 17 Dec 2008 08:17:26 +0000 (09:17 +0100)]
docs: Fix TOC of generated HTML docs.

This fixes bug #5968.
Thanks to Christian Perrier <bubulle@debian.org> for reporting!

Karolin
(cherry picked from commit 675b363b712e0b91b9b7d1189a819a36853db539)
(cherry picked from commit 3566615292f9cb2d00b03156e515274751e05969)
(cherry picked from commit 0d6b3df8d9c8b5e777ac6717168a11455b2ad2ce)
(cherry picked from commit 875dfb887dba90807ed5b371334574997be419a8)

15 years agodocs: "acl compatibility" is a global parameter.
Karolin Seeger [Tue, 16 Dec 2008 14:10:29 +0000 (15:10 +0100)]
docs: "acl compatibility" is a global parameter.

This fixes bug #5866.
Thanks to TAKAHASHI Motonobu <monyo@samba.gr.jp> for reporting!

Karolin
(cherry picked from commit 9e64ed018e5aa84d802b01953b481fbb07eb00aa)
(cherry picked from commit 386b0fc4bdc0822ffbc51cfee536bea23df0a755)
(cherry picked from commit 877951eea6e67273748aa9f56a56e41cf2dca00a)
(cherry picked from commit 0a93af41475783ab80644729efb48a80915f7bfc)

15 years agodocs: Fix typo in the idmap_ad manpage.
Karolin Seeger [Tue, 16 Dec 2008 08:04:32 +0000 (09:04 +0100)]
docs: Fix typo in the idmap_ad manpage.

Karolin
(cherry picked from commit b876e1336bed52e0823e0e88381d223bd6aa95e4)
(cherry picked from commit 611ac35a694930693d2f773d15e59be138261a8e)
(cherry picked from commit d54a1e49d5fe567bcda7c4c02f6ace2d03e189e9)
(cherry picked from commit 2550b433e8764df83197ffb9f3a7088bbceeb215)

15 years agodocs: Add hint that "socket address" usually don't need to be set.
Karolin Seeger [Fri, 12 Dec 2008 13:30:01 +0000 (14:30 +0100)]
docs: Add hint that "socket address" usually don't need to be set.

This fixes bug #5950.
Thanks to the Debian Samba package maintainers for reporting!

Karolin
(cherry picked from commit 19beef0dd9354296ae79d32077c58fbacf570c85)
(cherry picked from commit 0d035d36bd3707ccb9f77f0b2730869dc78719d4)
(cherry picked from commit 6be19f94802d545cc43286aa242b0ca2e5b79721)
(cherry picked from commit 879a4fbe99739b67d877caac2d7a2f763c69d41f)
(cherry picked from commit 51a9b237d401151eed43ab917d2dd10d8693a764)

15 years agoSamba3-HOWTO: Fix usage of 'net idmap restore'.
Karolin Seeger [Thu, 11 Dec 2008 17:08:29 +0000 (18:08 +0100)]
Samba3-HOWTO: Fix usage of 'net idmap restore'.

This fixes bug #5883.

Karolin
(cherry picked from commit b4a4e635246b88277b235fa343eda48bd4bb4ce3)
(cherry picked from commit 5744177740120524740db884564142df19358ae7)
(cherry picked from commit 7584fe4e8bcbaf73f509d6981a70ff9dde92db1c)
(cherry picked from commit fda3f00246c3ecb664d2bf387ecd0e28dec16e34)
(cherry picked from commit 90c5d04c5161bd2acb1c16d737b68893f11f3d18)

15 years agoFix bug #5937 - filenames with "*" char hide other files
Jeremy Allison [Thu, 4 Dec 2008 23:35:07 +0000 (15:35 -0800)]
Fix bug #5937 - filenames with "*" char hide other files
Jeremy.
(cherry picked from commit 7917038db0277d16e5284ee261a4913e278e5ac7)

15 years agoFix bug #1254 - write list not working under share-level security
Jeremy Allison [Thu, 4 Dec 2008 19:07:53 +0000 (11:07 -0800)]
Fix bug #1254 - write list not working under share-level security
(mtab.c, fix build).
Jeremy.
(cherry picked from commit 680e4c398c79867f8a7ad40e9c2cd9c401922edd)

15 years agodocs: Add default value for "writeable" to man smb.conf.
Karolin Seeger [Tue, 2 Dec 2008 19:50:02 +0000 (20:50 +0100)]
docs: Add default value for "writeable" to man smb.conf.

Karolin
(cherry picked from commit c09e04ac83365333605b7b1db3d07ccfd451a667)
(cherry picked from commit 70c581586ea02fbff4c5dde0ec002b22d472dfc5)
(cherry picked from commit 1ba197a3054c6d997ceca6f124039d3cabf00289)
(cherry picked from commit 09ccdf6aee15169b0fe9c532ee9143bd0cff9d78)

15 years agoFix circular dependency error with autoconf 2.6.3.
Andreas Schneider [Wed, 29 Oct 2008 13:12:04 +0000 (14:12 +0100)]
Fix circular dependency error with autoconf 2.6.3.

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

15 years agoFix bug #5914 - Build failure: redefinition of struct name_list
Jeremy Allison [Tue, 25 Nov 2008 23:57:18 +0000 (15:57 -0800)]
Fix bug #5914 - Build failure: redefinition of struct name_list
Jeremy.
(cherry picked from commit d326dc7dc08acbb7bf511ca9579cefe591b0ba94)

15 years agoFix bug #5873 - ACL inheritance cannot be broken. This regresses #4308, but that...
Jeremy Allison [Mon, 24 Nov 2008 23:40:50 +0000 (15:40 -0800)]
Fix bug #5873 - ACL inheritance cannot be broken. This regresses #4308, but that will have to
be fixed another way.
Jeremy.
(cherry picked from commit 649572c454328b81714b86d3f99f730bf61625e0)

15 years agolibads/ldap.c: return an error instead of crashing when no realm is given
Stefan Metzmacher [Mon, 24 Nov 2008 14:26:21 +0000 (15:26 +0100)]
libads/ldap.c: return an error instead of crashing when no realm is given

The bug was triggered by "net ads info -S 127.8.7.6" (where 127.8.7.6 doesn't ex
and "disable netbios = yes".

metze

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

15 years agowinbindd: make all winbind rpc-methods static.
Michael Adam [Fri, 21 Nov 2008 23:43:43 +0000 (00:43 +0100)]
winbindd: make all winbind rpc-methods static.

Now that the methods are no longer needed in winbindd_ads,
we can make them static again.

Michael
(cherry picked from commit a2329ec0eea66108f44dae3853e578dbbf835f96)

15 years agowinbindd_ads: use the reconnect methods instead of the rpc methods directly
Michael Adam [Fri, 21 Nov 2008 23:42:54 +0000 (00:42 +0100)]
winbindd_ads: use the reconnect methods instead of the rpc methods directly

Some of the ads methods just point to the rpc methods.
This makes winbindd_ads use the reconnect methods instead of
calling the rpc methods directly in order to prevent
negative cache entries for e.g. name_to_sid, when the dc
has closed the connection without sending a reset.

Michael
(cherry picked from commit 06f19e52489b3253ea4292795e4c73fa94cfd392)

15 years agoFix bug #5909 - MS-DFS does not work on Vista, if link name includes multibyte character.
Yasuma Takeda [Thu, 20 Nov 2008 19:41:47 +0000 (11:41 -0800)]
Fix bug #5909 - MS-DFS does not work on Vista, if link name includes multibyte character.
(cherry picked from commit 92f3ba8e20bd4a5a2afdd13feb5519d723784274)

15 years agoFix bug #5908 - Samba 3.0.32 - internal change notify on share directory fails"
Dina Fine [Tue, 18 Nov 2008 20:43:26 +0000 (12:43 -0800)]
Fix bug #5908 - Samba 3.0.32 - internal change notify on share directory fails"
(cherry picked from commit cc97e2a0d51f52a79982ac265f073d3829c1357a)

15 years agonet: Fix documentation of net rap printq info (bug #5892)
Carsten Dumke [Thu, 13 Nov 2008 18:05:00 +0000 (12:05 -0600)]
net: Fix documentation of net rap printq info (bug #5892)

The man-page (see net(8)) and the usage-info (call "net help rap printq") of
'net rap printq' do contain an option "list" but in net_rap.c
the option is named "info".

Rename the option "list" in the documentation (man-pages + usage) to "info" to
match the code.

Signed-off-by: Kai Blin <kai@samba.org>
(cherry picked from commit 67692e9b8f5ae09702c73c081f3a6937bd6de518)

15 years agoFix memory leak in error path, spotted by Martin Zielinski <mz@seh.de>.
Jeremy Allison [Wed, 12 Nov 2008 22:09:22 +0000 (14:09 -0800)]
Fix memory leak in error path, spotted by Martin Zielinski <mz@seh.de>.
Jeremy.
(cherry picked from commit ba12ab479b3764e0d251d74401dc5fa31a48f83d)

15 years agontlm_auth: Put huge NTLMv2 blobs into extra_data on CRAP auth
Kai Blin [Fri, 7 Nov 2008 08:43:46 +0000 (09:43 +0100)]
ntlm_auth: Put huge NTLMv2 blobs into extra_data on CRAP auth

This fixes bug #5865
(cherry picked from commit 1941f42b04dd20763449ba57e4543aca41ca2155)

15 years agowinbindd: Reformat the WBFLAGS defines to prepare for adding a new flag.
Kai Blin [Fri, 7 Nov 2008 08:40:35 +0000 (09:40 +0100)]
winbindd: Reformat the WBFLAGS defines to prepare for adding a new flag.
(cherry picked from commit 1f3eba80c8df79f31757bc2075f5730cd261806c)

15 years agomount.cifs: use lock/unlock_mtab scheme from util-linux-ng mount prog
Jeff Layton [Thu, 6 Nov 2008 20:20:55 +0000 (15:20 -0500)]
mount.cifs: use lock/unlock_mtab scheme from util-linux-ng mount prog

The util-linux-ng sources have a good, but rather complex scheme for
locking the mtab before updating it. Mount helpers need to follow the
same scheme. Advisory locking only works if everyone is using the same
locking scheme.

Copy the routines we need from util-linux-ng into a separate source file
and then have mount.cifs and umount.cifs link in this object.

The long term goal is to have these routines in a separate helper
library (libmount). Mount helpers can then dynamically link in that lib.
Until that happens, this should serve as a suitable stopgap solution.

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

15 years agoAdd reference to bug #4308 to remind me to add regression test to smbtorture.
Jeremy Allison [Thu, 6 Nov 2008 03:12:10 +0000 (19:12 -0800)]
Add reference to bug #4308 to remind me to add regression test to smbtorture.
Jeremy.
(cherry picked from commit 0de73eeb1a17b6af217babd626b203eca975541f)

15 years agoFix bug triggered by the RAW-SAMBA3OPLOCKLOGOFF test
Volker Lendecke [Mon, 3 Nov 2008 16:14:35 +0000 (17:14 +0100)]
Fix bug triggered by the RAW-SAMBA3OPLOCKLOGOFF test
(cherry picked from commit af33c8b3521564c229091f197341ba33a7d6f162)

15 years agoauth: Fix build warning.
Günther Deschner [Mon, 25 Aug 2008 09:36:56 +0000 (11:36 +0200)]
auth: Fix build warning.

Guenther
(cherry picked from commit 4661ef625a6522d6f859b83e3e3702f01d0b952f)
(cherry picked from commit 60649a74cdf2594bc89c301025f86d23caba91c2)
(cherry picked from commit d0c0fc92cd6c7549e190669aeaa605a0d436cf31)

15 years agoutils/net_ads.c: call saf_join_store() after a the join.
Stefan Metzmacher [Mon, 27 Oct 2008 18:40:23 +0000 (19:40 +0100)]
utils/net_ads.c: call saf_join_store() after a the join.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit feef594d275881466e2c3f59c0ff54609a9cc53b)

15 years agolibads/ldap.c: store the dc name in the saf cache as in all other places
Stefan Metzmacher [Mon, 27 Oct 2008 18:39:30 +0000 (19:39 +0100)]
libads/ldap.c: store the dc name in the saf cache as in all other places

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 543fa85a711337e979c7b631bda5db95d109ef59)

15 years agolibads/ldap.c: if the client belongs to no site at all any dc is the closest
Stefan Metzmacher [Mon, 27 Oct 2008 18:38:15 +0000 (19:38 +0100)]
libads/ldap.c: if the client belongs to no site at all any dc is the closest

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit f86ef9b53a903485deba94febf90dd4e657cc02b)

15 years agolibads/ldap.c: pass the real workgroup name to get_dc_name()
Stefan Metzmacher [Mon, 27 Oct 2008 18:36:25 +0000 (19:36 +0100)]
libads/ldap.c: pass the real workgroup name to get_dc_name()

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit c2d4a84abe1b6cbf68d6e9f1bb1f8974d0b628fc)

15 years agolibsmb/namequery.c: add saf_join_store() function
Stefan Metzmacher [Mon, 27 Oct 2008 18:31:30 +0000 (19:31 +0100)]
libsmb/namequery.c: add saf_join_store() function

saf_join_store() should be called after a successful
domain join, the affinity to the dc used at join time
has a larger ttl, to avoid problems with delayed replication.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 80e74a27c55c01221091e3eec930c2ac4433c22c)

15 years agolibsmb/namequery: fallback to returning all dcs, when none is available in the reques...
Stefan Metzmacher [Mon, 27 Oct 2008 08:40:25 +0000 (09:40 +0100)]
libsmb/namequery: fallback to returning all dcs, when none is available in the requested site

It could happen that all dcs in a site are unavailable
(some sites have only one dc) and then we need to fallback
to get all dcs.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit c127367b1dd622eeceb1f47de0a047c297dda222)

15 years agos3: libads: use get_dc_name() instead of get_sorted_dc_list() in the LDAP case
Stefan Metzmacher [Wed, 22 Oct 2008 09:14:10 +0000 (11:14 +0200)]
s3: libads: use get_dc_name() instead of get_sorted_dc_list() in the LDAP case

We use get_dc_name() for LDAP because it generates the selfwritten
krb5.conf with the correct kdc addresses and sets KRB5_CONFIG.

For CLDAP we need to use get_sorted_dc_list() to avoid recursion.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit d2f7f81f4d61bae9c4be65cbc1bf962b6c24a31f)

15 years agos3: correctly detect if the current dc is the closest one
Stefan Metzmacher [Wed, 22 Oct 2008 08:36:21 +0000 (10:36 +0200)]
s3: correctly detect if the current dc is the closest one

ads->config.tried_closest_dc was never set.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit dfe5b00db35e1e7c7bb3ba36729fc3f97eb48db3)

15 years agowinbind: fix smbd hanging on Solaris when winbindd closes socket.
Michael Adam [Mon, 27 Oct 2008 13:28:44 +0000 (14:28 +0100)]
winbind: fix smbd hanging on Solaris when winbindd closes socket.

On some versions of Solaris, we observed a strange effect of close(2)
on a socket: After the server (here winbindd) called close, the client fd
was not marked as readable for select. And a write call to the fd did
not produce an error EPIPE but just returned as if successful.

So while winbindd had called remove_client(), the corresponding smbd
still thought that it was connected, but failed to retrieve answers
for its queries.

This patch works around the problem by forcing the client fd to
the readable state: Just write one byte into the socket before
closing.

Michael
(cherry picked from commit 559ba0215cada4093efd22f165b608c41913d935)

15 years agoFix the build of pam_winbind.
Andreas Schneider [Fri, 24 Oct 2008 10:01:24 +0000 (12:01 +0200)]
Fix the build of pam_winbind.
(cherry picked from commit 90651d77f1f7fc6d29629d3a0dd566d07c090609)

15 years agoDelete the krb5 ccname variable from the PAM environment if set.
Andreas Schneider [Mon, 20 Oct 2008 15:39:35 +0000 (17:39 +0200)]
Delete the krb5 ccname variable from the PAM environment if set.

If winbind sets the KRB5CCNAME variable it should unset it when
the cache gets destroyed.
(cherry picked from commit 98f3369e08f4d5bc759e93d36f3d67a3c057f40d)

15 years agoCope with bad trans2mkdir requests from System i QNTC IBM SMB client.
Jeremy Allison [Fri, 17 Oct 2008 04:01:56 +0000 (21:01 -0700)]
Cope with bad trans2mkdir requests from System i QNTC IBM SMB client.
If total_data == 4 Windows doesn't care what values
are placed in that field, it just ignores them.
The System i QNTC IBM SMB client puts bad values here,
so ignore them.
Jeremy.
(cherry picked from commit cfdbe8a1f2057ad1a8886ca7445a812219648d19)

15 years agomount.cifs: make return codes match the return codes for /bin/mount (try #3)
Jeff Layton [Thu, 9 Oct 2008 14:51:33 +0000 (10:51 -0400)]
mount.cifs: make return codes match the return codes for /bin/mount (try #3)

The manpage for /bin/mount specifies that the return code should be a
positive integer (actually, it's a bitfield). Clean up the return
codes from mount.cifs to make them match the expected return values
from /bin/mount. This necessary for proper integration with autofs.

This is the third attempt at this patch. The changes here are minor,
just changing some return's from main() into exit() calls for
consistency's sake.

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

15 years agomount.cifs: have uppercase_string return success on NULL pointer
Jeff Layton [Thu, 9 Oct 2008 14:47:45 +0000 (10:47 -0400)]
mount.cifs: have uppercase_string return success on NULL pointer

We currently don't attempt to uppercase the device portion of the mount
string if there isn't a prefixpath. Fix that by making uppercase_string
return success without doing anything on a NULL pointer.

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

15 years agoFix bug #5814 - Winbindd dumping core in a strange manner while doing "rescan_trusted...
Jeremy Allison [Wed, 8 Oct 2008 18:37:43 +0000 (11:37 -0700)]
Fix bug #5814 - Winbindd dumping core in a strange manner while doing "rescan_trusted_domain".
From analysis by hargagan <shargagan@novell.com> :
"The winbindd_child_died() is also getting called from process_loop() in case of
SIGCHLD signal. In this case it doesn't make the timeout_handler to NULL for
the first request. It then initiate a new request using
schedule_async_request() which installs a new timeout handler for the same
request. In such a case, for a badly unresponsive system both the timeout
handler can be called. For the first call the "private_data" will be cleared
and for another call the timeout handler will be detecting the double free. So,
for such a case as well, the winbindd_child_died() should make the
timeout_handler to NULL."
Jeremy.
(cherry picked from commit cfa9d20db78875969ea8065161f8efdf5281d003)

15 years agoFix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.
Jeremy Allison [Wed, 1 Oct 2008 20:23:36 +0000 (13:23 -0700)]
Fix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.
This API is unusual in that if used to remove a non-list head it nulls out
the next and prev pointers. This is what you want for debugging (don't want
an entry removed from the list to be still virtually linked into it) but
means there is no consistent idiom for use as the next and prev pointers
get trashed on removal from the list, meaning you must save them yourself.
You can use it one way when deleting everything via the head pointer, as
this preserves the next pointer, but you *must* use it another way when not
deleting everything via the head pointer. Fix all known uses of this (the main
one is in conn_free_internal() and would not free all the private data entries
for vfs modules. The other changes in web/statuspage.c and winbindd_util.c
are not strictly neccessary, as the head pointer is being used, but I've done
them for consistency. Long term we must revisit this as this API is too hard
to use correctly.
Jeremy.
(cherry picked from commit 45514fc5d85221339a4ee55b9f9f78c917b2fd19)

15 years agoEnsure we emit the notify message before renaming the open files.
Jeremy Allison [Tue, 30 Sep 2008 20:37:54 +0000 (13:37 -0700)]
Ensure we emit the notify message before renaming the open files.
Jeremy.
(cherry picked from commit ffa704347a9cf10de20105e3dd07963f975cbd77)

15 years agoFix for bug #5790 - samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file dispositio...
Jeremy Allison [Sat, 27 Sep 2008 01:41:05 +0000 (18:41 -0700)]
Fix for bug #5790 - samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file disposition call.
This was my fault. I use a singleton cache (positive and negative) to speed up pathname based
qfileinfo/setfileinfo lookups for alternate fsp's open on the same path. I only invalidated the
negative cache on adding a new file fsp, as I incorrectly imagined the new fsp was put at the *end* of
the open files list. DLIST_ADD puts it at the start, meaning any subsequent open wasn't seen once the
cache was set. Doh !
Jeremy.
(cherry picked from commit 3d10c237a9b71d269d7936d58c2f8c0172165cbe)

15 years agoFix winbindd crash in an unusual failure mode. Bug #5737. Based on original patch...
Jeremy Allison [Tue, 23 Sep 2008 23:47:21 +0000 (16:47 -0700)]
Fix winbindd crash in an unusual failure mode. Bug #5737. Based on original patch from shargagan@novell.com
Jeremy.
(cherry picked from commit 2f230176a19788e659522c7ccccb19b289412166)

15 years agofix net_io_q_srv_pwset2.
Günther Deschner [Thu, 18 Sep 2008 12:09:27 +0000 (14:09 +0200)]
fix net_io_q_srv_pwset2.

yes, we all love hand-marshalled rpc...

Guenther
(cherry picked from commit 72b4ca3ec5714d6056654ecb0fdcbd7d954e6984)

15 years agomount.cifs: make local versions of strlcat and strlcpy static
Jeff Layton [Sun, 14 Sep 2008 12:37:58 +0000 (08:37 -0400)]
mount.cifs: make local versions of strlcat and strlcpy static

...to silence -Wmissing-prototypes

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

15 years agocifs.upcall: make most functions static and silence compiler warnings
Jeff Layton [Sun, 14 Sep 2008 12:37:57 +0000 (08:37 -0400)]
cifs.upcall: make most functions static and silence compiler warnings

...to silence -Wmissing-prototypes and some uninit'ed variable
warnings. Thanks to GD for the extra-paranoid compiler flags.

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

15 years agomount.cifs: don't prompt for password on krb5 mounts
Jeff Layton [Fri, 12 Sep 2008 20:58:00 +0000 (16:58 -0400)]
mount.cifs: don't prompt for password on krb5 mounts

krb5 mounts require that the user already have a valid krb5 ticket.
Since we can't currently use the password entered, don't prompt for it.

Also, switch to using strncmp instead of strcmp here.

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

15 years agomount.cifs: fix several problems when mounting subdirectories of shares (try 2)
Jeff Layton [Fri, 12 Sep 2008 20:58:00 +0000 (16:58 -0400)]
mount.cifs: fix several problems when mounting subdirectories of shares (try 2)

This patch is the second patch to attempt to fix up some of the problems
with mounting subdirectories of shares. The earlier patch didn't handle
this correctly when POSIX extensions were enabled. This one does.

This is a bit of a confusing area since the different components of
a service string have different rules:

1) hostname: no '/' (slash) or '\' (backslash) is allowed to be
     embedded within the string

2) sharename: same rules as hostname

3) prefixpath: '\' *is* allowed to be embedded in a path component,
       iff POSIX extensions are enabled. Otherwise, neither
       character is allowed.

The idea here is to allow either character to act as a delimiter when we
know that the character can't be anything but a delimiter (namely
everywhere up to the start of the prefixpath). The patch will convert
any '\' unconditionally to '/' in the UNC portion of the string.

However, inside the prefixpath, we can't make assumptions about what
constitutes a delimiter because POSIX allows for embedded '\'
characters. So there we don't attempt to do any conversion, and pass the
prefixpath to the kernel as is. Once the kernel determines whether POSIX
extensions are enabled, it can then convert the path if needed and it's
able to do so. A patch to handle this has already been committed to the
cifs-2.6 git tree.

This patch also fixes an annoyance. When you mount a subdir of a share,
mount.cifs munges the device string so that you can't tell what the
prefixpath is. So if I mount:

//server/share/p1/p2/p3

..then /proc/mounts and mtab will show only:

//server/share

Finally, it also tries to apply some consistent rules to the uppercasing
of strings.

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

15 years agoIntroduce const DATA_BLOB data_blob_null = { NULL, 0, NULL };
Jeff Layton [Fri, 12 Sep 2008 20:58:00 +0000 (16:58 -0400)]
Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL };

Cherry picked from commit 3d3d61687ef00181f4f04e001d42181d93ac931e

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

15 years agocifs.upcall: bump SPNEGO msg version number and don't reject old versions
Jeff Layton [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
cifs.upcall: bump SPNEGO msg version number and don't reject old versions

When we added the ability for the kernel to send sec=mskrb5 to the
upcall, we subtly broke old cifs.upcall versions that don't understand
it. Bump the spnego message version to 2 to make this clear. Also,
change cifs.upcall to not reject requests with a version that's lower
than the current one, and to send the reply with the same version that
the request sent. The idea is to try and keep cifs.upcall backward
compatible with old kernels.

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

15 years agocifs.upcall: fix build warning
Jeff Layton [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
cifs.upcall: fix build warning

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

15 years agocifs.upcall: handle MSKRB5 OID properly
Jeff Layton [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
cifs.upcall: handle MSKRB5 OID properly

When the kernel sends the upcall a sec=mskrb5 parameter, that means
the the MSKRB5 OID is preferred by the server. This patch fixes the
upcall to use that OID in place of the "normal" krb5 OID when it
gets a sec=mskrb5 parameter.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve French <smfrench@gmail.com>
(cherry picked from commit 340fdd5fed64ec4a8d7fc937956c722d59a73ba8)

15 years agocifs.upcall: negatively instantiate keys on error
Jeff Layton [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
cifs.upcall: negatively instantiate keys on error

When a request-key upcall exits without instantiating a key, the kernel
will negatively instantiate the key with a 60s timeout. Older kernels,
however seem to also link that key into the session keyring. This
behavior can interefere with subsequent mount attempts until the
key times out. The next request_key() call will get this negative key
even if the upcall would have worked the second time.

Fix this by having cifs.upcall negatively instantiate the key itself
with a 1s timeout and don't attach it to the session keyring.

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

15 years agoBuilding cifs.upcall is giving this build warning:
Steve French [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
Building cifs.upcall is giving this build warning:

   client/cifs.upcall.c:205: warning: function declaration isn’t a prototype

This patch fixes this by properly declaring usage() args as void.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@samba.org>
(cherry picked from commit 186eb5b26e29b687e9eab981a0ef673462f68f78)

15 years agocifs.upcall: fix manpage and comments
Steve French [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
cifs.upcall: fix manpage and comments

The "cifs.resolver" key type has been changed to "dns_resolver". Fix
the comments at the top of cifs.upcall and the manpage accordingly.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@samba.org>
---
 docs-xml/manpages-3/cifs.upcall.8.xml |    4 ++--
 source/client/cifs.upcall.c           |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
(cherry picked from commit de0e8337d4fdde8fc3e892710c1f27a697fdcef5)

15 years agocifs.upcall was not recognizing the newer name "dns_resolver" key type
Steve French [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
cifs.upcall was not recognizing the newer name "dns_resolver" key type
(as a synonym for the older "cifs.resolver" name) when resolving host
names to ip addresses for the kernel.

Acked-by: Jeff Layton
(cherry picked from commit da92a35cae09d312f11f77d900132422162c435a)

15 years agocifs.upcall: fix compile warning
Steve French [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
cifs.upcall: fix compile warning

Steve French noticed these warnings when building cifs.upcall:

   Compiling client/cifs.upcall.c
   client/cifs.upcall.c: In function 'usage':
   client/cifs.upcall.c:204: warning: declaration of 'prog' shadows a global declaration
   client/cifs.upcall.c:33: warning: shadowed declaration is here

Change the usage function to not take and arg and have it just use the global
"prog" variable. Fix a typo in the log message generated when an unknown
option is specified. Also getopt() always returns '?' when it sees an unknown
option so there's no point in printing it out.

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

15 years agobuild: fix linking cifs.upcall when nscd_flush_cache() is found.
Michael Adam [Fri, 12 Sep 2008 20:57:59 +0000 (16:57 -0400)]
build: fix linking cifs.upcall when nscd_flush_cache() is found.

Michael
(cherry picked from commit c3d0508619e11f3c70fec3427d6cf1213b98895f)

15 years agocifs.upcall: move default install location to EPREFIX/sbin
Jeff Layton [Fri, 12 Sep 2008 20:57:58 +0000 (16:57 -0400)]
cifs.upcall: move default install location to EPREFIX/sbin

cifs.upcall links to libraries that live under /usr, so installing it
in /sbin doesn't seem appropriate. Move it to EPREFIX/sbin instead
(i.e. /usr/sbin).

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

15 years agocifs.upcall: enable building by default on linux
Jeff Layton [Fri, 12 Sep 2008 20:57:58 +0000 (16:57 -0400)]
cifs.upcall: enable building by default on linux

When building on linux, default to building cifs.upcall. Throw a
warning if ADS support is disabled or keyutils isn't installed.

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

15 years agoThis patchset comprises a number of cleanups for the cifs upcall
Jeremy Allison [Fri, 12 Sep 2008 20:57:58 +0000 (16:57 -0400)]
This patchset comprises a number of cleanups for the cifs upcall
binary. The biggest change is that it renames it from cifs.spnego
to cifs.upcall since the cifs.spnego name really isn't applicable
anymore.

It also fixes a segfault when the program is run without any args
and adds a manpage. Comments and/or suggestions appreciated.

This set should apply cleanly to the 3.3 test branch.

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

15 years agoAdds support for cifs.resolver upcall.
Igor Mammedov [Fri, 12 Sep 2008 20:57:58 +0000 (16:57 -0400)]
Adds support for cifs.resolver upcall.

Here is a patch for userspace cifs.spnego handler that adds support for cifs.resolver
upcall used in DFS code.
Any comments are appreciated.

#############################

Cifs upcall with key type cifs.resolver is used for resolving
server names in handling DFS refferals.

Signed-off-by: Igor Mammedov <niallain@gmail.com>
(cherry picked from commit 64f1f899dc983196692f535e6142acc0c817c0ab)

15 years agoFix warning
Simo Sorce [Fri, 12 Sep 2008 20:57:58 +0000 (16:57 -0400)]
Fix warning
(cherry picked from commit 63aae3f3135741eab8702eb9b261f7cee2fbeca0)

15 years ago* helper source for handling cifs kernel module upcall for kerberos
Igor Mammedov [Fri, 12 Sep 2008 20:57:58 +0000 (16:57 -0400)]
* helper source for handling cifs kernel module upcall for kerberos

authorization
* Added -c option to set service prefix to "cifs" in service principal by
default service prefix "host" is used
* replaced malloc/free/srtncpy with replacements from samba project

Signed-off-by: Igor Mammedov <niallain@gmail.com>
(cherry picked from commit 88989075056fb7b14e3ed33b951d5587227a7be7)

15 years ago* Adds support for cifs.spnego helper into configure and Makefile.in
Igor Mammedov [Fri, 12 Sep 2008 20:57:58 +0000 (16:57 -0400)]
* Adds support for cifs.spnego helper into configure and Makefile.in

* Added checks for spnego prereq keyutils.h and kerberos in configure.in

Signed-off-by: Igor Mammedov <niallain@gmail.com>
(cherry picked from commit 9d2c5aee56d58930d4d982046b7164e12c12db5d)

15 years agoBackport of bugfix for #5751, smbclient: cannot show ACLs on DFS, done by
Jeremy Allison [Fri, 12 Sep 2008 18:16:03 +0000 (11:16 -0700)]
Backport of bugfix for #5751, smbclient: cannot show ACLs on DFS, done by
SATOH Fumiyasu <fumiyas@osstech.co.jp>.
Jeremy.
(cherry picked from commit 5e73ddba11cbf9ea2d6ca63be098720ff0d5a0d1)

15 years agoHere's the fix for bug #5750. Note this bug does *NOT* affect
Jeremy Allison [Thu, 11 Sep 2008 19:16:31 +0000 (12:16 -0700)]
Here's the fix for bug #5750. Note this bug does *NOT* affect
3.2.x (code is different there).
Jeremy.
(cherry picked from commit d3e790fa70d083a53de221907c951580ce2537a4)

15 years agoFix bug #5052 - not work cancel inheritance on share. We were
Jeremy Allison [Wed, 10 Sep 2008 23:23:54 +0000 (16:23 -0700)]
Fix bug #5052 - not work cancel inheritance on share. We were
using the parent security descriptor type and flags instead
of using the passed in SD.
Jeremy.
(cherry picked from commit 78941c166debc8315516d895b2ef77e52417f067)

15 years agoRemove unecessary msync.
Jeremy Allison [Fri, 5 Sep 2008 22:36:59 +0000 (15:36 -0700)]
Remove unecessary msync.
Jeremy.
(cherry picked from commit 2f509fdbed5b0ab3d9ff06bc8101d9851989be19)

15 years agoFix a memleak
Qiao Yang [Fri, 5 Sep 2008 12:17:04 +0000 (14:17 +0200)]
Fix a memleak

request.extra_data is not freed if there is no extra_data in response or when
there is some error happens in processing. This patch will free the buffer
right after processing a request before sending back a response.
(cherry picked from commit 05a80132ea95f40fdc8d4cfa6f90d8ba472a0272)

15 years agoFix bug #5729. Explicitly allow "-valid".
Jeremy Allison [Wed, 3 Sep 2008 20:19:20 +0000 (13:19 -0700)]
Fix bug #5729. Explicitly allow "-valid".
Jeremy
(cherry picked from commit f3d604ab72173c9d51661f3b696b0f25da602226)

15 years agoThe msync manpage reports that msync *must* be called before munmap. Failure to do...
Simo Sorce [Wed, 3 Sep 2008 14:44:09 +0000 (10:44 -0400)]
The msync manpage reports that msync *must* be called before munmap. Failure to do so may result in lost data. Fix an ifdef check, I really think we meant to check HAVE_MMAP here.
(cherry picked from commit 0b39c04fed2720aad07544c65a57b6580ae322a0)

15 years agonet: net should just use machine account creds when changing passwords.
Günther Deschner [Thu, 28 Aug 2008 22:06:09 +0000 (00:06 +0200)]
net: net should just use machine account creds when changing passwords.

Guenther
(cherry picked from commit 09145720b510647e7c24e3062a4a1246cc7bff5b)

15 years agoBackport bugfix for bug #5710.
Günther Deschner [Thu, 28 Aug 2008 22:05:32 +0000 (00:05 +0200)]
Backport bugfix for bug #5710.

In order to successfully update a machine account password we need to use
Netlogon ServerPasswordSet2 when NETLOGON_NEG_PASSWORD_SET2 has been negotiated.

Guenther
(cherry picked from commit 84fbac51ffc5f4a8a4f7b1baf5e9b1af174505f5)

15 years agonetlogon: "re-run make idl" - implement netr_ServerPasswordSet2 client.
Günther Deschner [Thu, 28 Aug 2008 22:02:54 +0000 (00:02 +0200)]
netlogon: "re-run make idl" - implement netr_ServerPasswordSet2 client.

Guenther
(cherry picked from commit a5b913dd31cc3c4d01458e6fcc0a03852a2738a2)

15 years agonetlogon: define NET_SRVPWSET2 call.
Günther Deschner [Thu, 28 Aug 2008 22:01:45 +0000 (00:01 +0200)]
netlogon: define NET_SRVPWSET2 call.

Guenther
(cherry picked from commit 15fe1a3fa07493060a0155bd4f9f0f9bd1588d50)

15 years agobecome root for AIO operations
Andrew Tridgell [Tue, 26 Aug 2008 16:59:54 +0000 (09:59 -0700)]
become root for AIO operations

We need to become root for AIO read and write to allow the AIO thread
to send a completion signal to the parent process when the IO
completes
(cherry picked from commit 91dcce0e4deb87c6d5e491eb9dbb09fd04981d28)

15 years agoEINVAL is also a valid error return, meaning "this filesystem
Andrew Tridgell [Tue, 26 Aug 2008 16:59:20 +0000 (09:59 -0700)]
EINVAL is also a valid error return, meaning "this filesystem
cannot do sendfile for this file"
(cherry picked from commit 5f30f87dcbeaf30713fadeb130193cb86021e87f)

15 years agoAvoid a race condition in glibc between AIO and setresuid().
Andrew Tridgell [Sun, 24 Aug 2008 03:56:59 +0000 (13:56 +1000)]
Avoid a race condition in glibc between AIO and setresuid().

See this test: http://samba.org/~tridge/junkcode/aio_uid.c

The problem is that setresuid() tries to be clever about threads, and
tries to change the euid of any threads that are running. If a AIO read
or write completes while this is going on then the signal from the thread
where the IO completed is lost, as it gets -1/EPERM from rt_sigqueueinfo()

The simplest fix is to try to use setreuid() instead of setresuid(),
as setreuid() doesn't try to be clever. Unfortunately this also means
we must use become_root()/unbecome_root() in the aio code.
(cherry picked from commit 5e3b978c51e741d413b856adafa1b1090ed8dd7b)

15 years agoSet version to 3.0.33-GIT
Gerald (Jerry) Carter [Mon, 25 Aug 2008 22:41:42 +0000 (17:41 -0500)]
Set version to 3.0.33-GIT
(cherry picked from commit 1e1449afba5d37fcfd26e0ca7edde05715bc48f7)

15 years agoFix bug 4516, no IPv6 on Solaris 2.6.
David Leonard [Mon, 25 Aug 2008 22:14:41 +0000 (15:14 -0700)]
Fix bug 4516, no IPv6 on Solaris 2.6.
(cherry picked from commit e05cf6e9337f949d369c915d8eec20dc58aa614e)

15 years agoWHATSNEW: Update WHATSNEW for 3.0.33. samba-3.0.33
Karolin Seeger [Tue, 18 Nov 2008 15:33:23 +0000 (16:33 +0100)]
WHATSNEW: Update WHATSNEW for 3.0.33.

Karolin

15 years agoFix the offset checks in the trans routines
Volker Lendecke [Sat, 8 Nov 2008 16:14:06 +0000 (17:14 +0100)]
Fix the offset checks in the trans routines

This fixes a potential crash bug, a client can make us read memory we
should not read. Luckily I got the disp checks right...

Volker

15 years agoVERSION: Raise version number up to 3.0.33.
Karolin Seeger [Tue, 18 Nov 2008 14:22:47 +0000 (15:22 +0100)]
VERSION: Raise version number up to 3.0.33.

Karolin

15 years agoAdd workaround for docs build and dependency on parameters.all.xml samba-3.0.32
Gerald (Jerry) Carter [Mon, 25 Aug 2008 21:08:28 +0000 (16:08 -0500)]
Add workaround for docs build and dependency on parameters.all.xml

15 years agoUpdating release notes for 3.0.32.
Gerald (Jerry) Carter [Mon, 25 Aug 2008 21:07:08 +0000 (16:07 -0500)]
Updating release notes for 3.0.32.

15 years agoSet version to 3.0.32.
Gerald (Jerry) Carter [Mon, 25 Aug 2008 21:05:12 +0000 (16:05 -0500)]
Set version to 3.0.32.

15 years agoDon't re-initialize a token when we already have one. This fixes the build farm failu...
Jeremy Allison [Fri, 22 Aug 2008 20:54:22 +0000 (13:54 -0700)]
Don't re-initialize a token when we already have one. This fixes the build farm failures when winbindd connects as guest.
This one took a *lot* of tracking down :-).
Jeremy.