tprouty/samba.git
10 years agofind_missing_manpages.pl: Adapt script to changed directory structure. release-3-2-4
Karolin Seeger [Wed, 17 Sep 2008 06:48:19 +0000 (08:48 +0200)]
find_missing_manpages.pl: Adapt script to changed directory structure.

Karolin
(cherry picked from commit b6b7aa023b62ab8994d13cb91d5185204c1500b2)
(cherry picked from commit d553faff4ae9aa1fdc1bb716e901dcede7799f27)

10 years agoEnsure all pointers are initialized. Without this we can crash when looking up a...
Jeremy Allison [Wed, 17 Sep 2008 18:59:18 +0000 (11:59 -0700)]
Ensure all pointers are initialized. Without this we can crash when looking up a non-existant uid.
Jeremy.
(cherry picked from commit a31b006a411266adf49d2eefd1f80bbb091f0c4c)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Wed, 17 Sep 2008 13:32:51 +0000 (15:32 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit 01fa2fa4b38d90573ada3dd4f9d67b1be52fd83b)

10 years agoidmap_ad: Fix a segfault when calling nss_get_info() with a NULL ads structure.
Gerald W. Carter [Mon, 15 Sep 2008 17:38:36 +0000 (12:38 -0500)]
idmap_ad: Fix a segfault when calling nss_get_info() with a NULL ads structure.
(cherry picked from commit 30a660ea41faa3b84afa8819c7673b3fe334e79b)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Tue, 16 Sep 2008 07:54:12 +0000 (09:54 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit bf38373c978c8e1fd4c33d024e9608fe5083c344)

10 years agoman cifs.upcall: Fix typo, wrap lines.
Karolin Seeger [Mon, 15 Sep 2008 14:33:16 +0000 (16:33 +0200)]
man cifs.upcall: Fix typo, wrap lines.

Karolin
(cherry picked from commit c4f361a17f51e4897ac2faafc65ebc8349e19001)
(cherry picked from commit da7a60a82bfecbf5b1a10bdbccf4682fd92b65bb)

10 years agoFix aio on FreeBSD.
Timur [Tue, 16 Sep 2008 01:43:26 +0000 (18:43 -0700)]
Fix aio on FreeBSD.
(cherry picked from commit 144b1bb05a734e15369d6d59636b6849d9405af5)

10 years agoFix display of POSIX ACLs.
Timur [Tue, 16 Sep 2008 01:24:58 +0000 (18:24 -0700)]
Fix display of POSIX ACLs.
(cherry picked from commit faa732c245c9296ff4cd4a56f353c3d5d1b0d202)

10 years agoFix cut and paste error in quota code.
Timur [Tue, 16 Sep 2008 01:19:01 +0000 (18:19 -0700)]
Fix cut and paste error in quota code.
(cherry picked from commit c2a05d4ed34aa8185a7d236e8d7b1493d67a3068)

10 years agoSimple fix for warning:
Steven Danneman [Tue, 16 Sep 2008 00:55:22 +0000 (17:55 -0700)]
Simple fix for warning:

Compiling utils/sharesec.c
utils/sharesec.c: In function `change_share_sec':
utils/sharesec.c:404: warning: 'sd' might be used uninitialized in this function
(cherry picked from commit 931abf7898f574fcf70c239b2ad5c180ff6bb8e8)

10 years agoFix build warning on FreeBSD
Steven Danneman [Mon, 15 Sep 2008 23:28:30 +0000 (16:28 -0700)]
Fix build warning on FreeBSD

Fix for the following build warning:

Compiling torture/cmd_vfs.c
torture/cmd_vfs.c: In function `cmd_open':
torture/cmd_vfs.c:275: warning: unsigned int format, different type arg (arg 3)
torture/cmd_vfs.c: In function `cmd_mknod':
torture/cmd_vfs.c:992: warning: unsigned int format, different type arg (arg 3)

sccanf had mismatched types for mode_t between formating parameter and var args.
(cherry picked from commit d10c386472175ceb312b9bcca07822a6df66a266)

10 years agoFix bug 5761 "open of mangled directory name results in 'is a stream name'"
Jeremy Allison [Mon, 15 Sep 2008 21:13:23 +0000 (14:13 -0700)]
Fix bug 5761 "open of mangled directory name results in 'is a stream name'"
reported by Regan Heath <Regan.Heath@BridgeHeadSoftware.com>.
Jeremy.
(cherry picked from commit 1b839eb9e4a6312e638d1856d1225b170525da7e)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Mon, 15 Sep 2008 09:08:06 +0000 (11:08 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit 7f60557c4ebc8de45b0c1bceda2be8e50d88e3ef)

10 years agomount.cifs: make local versions of strlcat and strlcpy static
Jeff Layton [Sun, 14 Sep 2008 12:37:45 +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 b08f07f84e448e56116b84ba5fa59b211e584822)

10 years agocifs.upcall: make most functions static and silence compiler warnings
Jeff Layton [Sun, 14 Sep 2008 12:37:45 +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 bc5274eb66ebe40aea3ab917a20f2f353172ca93)

10 years agoModify a comment to make things clearer.
Jeremy Allison [Fri, 12 Sep 2008 22:04:11 +0000 (15:04 -0700)]
Modify a comment to make things clearer.
Jeremy.
(cherry picked from commit 46a5c08b101f1c218ecd6397614dde1d13a9077a)

10 years agocifs.upcall: move default install location to EPREFIX/sbin
Jeff Layton [Fri, 12 Sep 2008 17:37:13 +0000 (13:37 -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 fe280993dea71b87b6042d6aded389b10bcd0b56)

10 years agocifs.upcall: enable building by default on linux
Jeff Layton [Fri, 12 Sep 2008 17:37:13 +0000 (13:37 -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 7f1193d3c83b0c19f17c8f70542491222c9644da)

10 years agoUse the given name, not the absolute pathname, when printing out ACL info.
Jeremy Allison [Fri, 12 Sep 2008 00:31:36 +0000 (17:31 -0700)]
Use the given name, not the absolute pathname, when printing out ACL info.
Make this match the non-ACL case.
Jeremy.
(cherry picked from commit 1ca6239b9f67caafed50db5f284df00c5988ba03)

10 years agoFix bug #5751 cannot show ACLs on DFS reported by SATOH Fumiyasu <fumiyas@osstech...
Jeremy Allison [Thu, 11 Sep 2008 23:18:54 +0000 (16:18 -0700)]
Fix bug #5751 cannot show ACLs on DFS reported by SATOH Fumiyasu <fumiyas@osstech.co.jp>.
Fix for smbclient and libsmbclient.
Jeremy.
(cherry picked from commit 71d00ef2888834ebed2a387a111a95bac1d227ad)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Thu, 11 Sep 2008 14:09:32 +0000 (16:09 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit af05317606f12f2c02b09bd1286cefd10bc37476)

10 years agoFix for bug 5571
Simo Sorce [Thu, 11 Sep 2008 13:51:39 +0000 (09:51 -0400)]
Fix for bug 5571
Make sure that usernames are parsed using the correct separator.
Otherwise group memeberships in winbind may be result broken.
(cherry picked from commit a2c313182135fc4f7596a595c5143b7bb71a0bdf)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Thu, 11 Sep 2008 11:48:25 +0000 (13:48 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit b17f9ecc8e8beb40f798dd47f3440811e8d07e81)

10 years agopackaging(RHEL): fix direction of link (.so) of nss libs.
Michael Adam [Wed, 10 Sep 2008 21:31:26 +0000 (23:31 +0200)]
packaging(RHEL): fix direction of link (.so) of nss libs.

libnss_winbindd.so -> libnss_winbindd.so.2
libnss_wins.so -> libnss_wins.so.2

Michael
(cherry picked from commit d63cd755220aba591709917c729e028a913bec5d)

10 years agopackaging(RHEL): workaround all library installations by mv to %{_libarchdir}
Michael Adam [Wed, 10 Sep 2008 11:48:13 +0000 (13:48 +0200)]
packaging(RHEL): workaround all library installations by mv to %{_libarchdir}

This is all that is still necessary in 3.2.3+.
(The eloquent workarounds for libsmbclient and libsmbsharemodes
are removed.)
In 3.3.0, with the separation of libdir and modulesdir, even this
step becomes unnecessary.

Michael
(cherry picked from commit fe8448fe8f7ee0d33631366503163d3b2ee3eded)

10 years agopackaging(RHEL): remove even another manual installation of pam_smbpass.so
Michael Adam [Wed, 10 Sep 2008 11:46:07 +0000 (13:46 +0200)]
packaging(RHEL): remove even another manual installation of pam_smbpass.so

Michael
(cherry picked from commit 08b43cbd04cf8894e91f1182b222f8dd1c90659d)

10 years agopackaging(RHEL): fix installation of pam modules.
Michael Adam [Mon, 8 Sep 2008 13:51:33 +0000 (15:51 +0200)]
packaging(RHEL): fix installation of pam modules.

Michael
(cherry picked from commit e97c52d38424c45b34e5d3b5dc2f4b2b3a1b9b31)

10 years agopackaging(RHEL): fix libdir installation by using _libarch/_libarchdir
Michael Adam [Fri, 29 Aug 2008 14:55:55 +0000 (16:55 +0200)]
packaging(RHEL): fix libdir installation by using _libarch/_libarchdir

Michael
(cherry picked from commit cf13475d4d5cfe968d694d49b8fd0f6020c5a9d8)

10 years agoFix bug #5052 - not work cancel inheritance on share. We were
Jeremy Allison [Wed, 10 Sep 2008 23:21:25 +0000 (16:21 -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 c22bf57329f16a45eb0954b72f8083270f6535e7)

10 years agoWhen requesting UNIX info levels on findfirst/findnext, don't play games with write...
Jeremy Allison [Wed, 10 Sep 2008 21:52:34 +0000 (14:52 -0700)]
When requesting UNIX info levels on findfirst/findnext, don't play games with write time,
just return what the underlying filesystem says. Trying not to confuse UNIX apps any more than necessary.
Jeremy.
(cherry picked from commit 4e06c71a12654d78c9a94fb023e372920bf7618b)

10 years agoFix blocker bug 5745 kerberos authentication with (lib)smbclient is broken.
Jeremy Allison [Wed, 10 Sep 2008 17:16:42 +0000 (10:16 -0700)]
Fix blocker bug 5745 kerberos authentication with (lib)smbclient is broken.
Jeremy.
(cherry picked from commit 738729cad0b88a2f453d61d38e1088003afd0a9e)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Wed, 10 Sep 2008 10:11:05 +0000 (12:11 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit df138f23b920757076917553fa4bbbe413918cf7)

10 years agopackaging(RHEL): remove duplicate installation of pam_smbpass.so
Michael Adam [Fri, 29 Aug 2008 14:44:06 +0000 (16:44 +0200)]
packaging(RHEL): remove duplicate installation of pam_smbpass.so

Michael
(cherry picked from commit cdc24fbb195b1a5460c05fcd20d7ba81ad69ef22)
(cherry picked from commit 5359d8ae840dba48bb6f2163085d22b80108db2c)

10 years agopackaging(RHEL): use ccache if available
Michael Adam [Mon, 8 Sep 2008 15:38:55 +0000 (17:38 +0200)]
packaging(RHEL): use ccache if available

Michael
(cherry picked from commit e8abbfabde3da0844ffb4e2507084c139a70d503)
(cherry picked from commit 998b699f27630d3ea6d781da4f09c1cfd3e24511)

10 years agopackaging(RHEL): add ldbtools binaries and man pages to common package
Michael Adam [Mon, 8 Sep 2008 13:52:27 +0000 (15:52 +0200)]
packaging(RHEL): add ldbtools binaries and man pages to common package

Michael
(cherry picked from commit 206985dfda5a9f62df975629046b00a88ec666f5)
(cherry picked from commit 80d5e3621cac803c007e38e437d07f7dab2379aa)

10 years agopackaging(RHEL): remove leftovers of smbmount from SPEC file.
Michael Adam [Mon, 8 Sep 2008 12:46:31 +0000 (14:46 +0200)]
packaging(RHEL): remove leftovers of smbmount from SPEC file.

Michael
(cherry picked from commit 041875c64daba3d185b1954eb0eb9a21b2f41ee1)
(cherry picked from commit 17351dc1ea2be1d2478d6ae00d63ec8967539ab0)

10 years agopackaging(RHEL): add new libs (talloc, tdb, ...) to the common package
Michael Adam [Fri, 29 Aug 2008 15:45:45 +0000 (17:45 +0200)]
packaging(RHEL): add new libs (talloc, tdb, ...) to the common package

Michael
(cherry picked from commit f23183bbec55faf2d6496e04e73f8dd415a08d1c)
(cherry picked from commit 84810cd8a66503acb447e7c3bd439b76c735366b)

10 years agopackaging(RHEL): remove smbmount related stuff from spec file
Michael Adam [Fri, 29 Aug 2008 14:41:30 +0000 (16:41 +0200)]
packaging(RHEL): remove smbmount related stuff from spec file

Michael
(cherry picked from commit 4420cf6199e3c718a3dea84fe814d6ad6e83c2d8)
(cherry picked from commit fdaef16604064cbd0be75838f9d6359a3d7a8e1b)

10 years agopackaging(RHEL): fix version of GPL (2 --> 3)
Michael Adam [Fri, 29 Aug 2008 13:45:18 +0000 (15:45 +0200)]
packaging(RHEL): fix version of GPL (2 --> 3)

Michael
(cherry picked from commit c015e8e0cf4131f21305451943df13b81f51ea6a)
(cherry picked from commit e243a6a724fc820fa01aa3e16f18212ed6729415)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Wed, 10 Sep 2008 09:15:02 +0000 (11:15 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit eec57823cd6503339f8a54fed7dce0d4d41ab9a5)

10 years agopackaging(RHEL): remove libmsrpc stuff which is no more...
Michael Adam [Fri, 29 Aug 2008 14:48:37 +0000 (16:48 +0200)]
packaging(RHEL): remove libmsrpc stuff which is no more...

Michael
(cherry picked from commit 3eaa33e9df6d58ef93f13a840b38a063649fffbc)
(cherry picked from commit 165691927cdaaafc057de667294dff7a7bc8a991)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Tue, 9 Sep 2008 11:23:28 +0000 (13:23 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit 903868a474d4875807a131dffe74b5090c0dbcea)

10 years agoFix calculation of useable_space for trans2 and nttrans replies
Volker Lendecke [Mon, 8 Sep 2008 20:53:50 +0000 (22:53 +0200)]
Fix calculation of useable_space for trans2 and nttrans replies

When alignment was in place, we pretended to send more data/params according to
the param_offset/param_length and data_offset/data_length parameters than would
actually fit into the SMB according to the NBSS length field.
(cherry picked from commit 2ae870aead5e0ea7e7f9f6f9730f989ae34755b9)

10 years agosmbd: some write time fixes
Stefan Metzmacher [Mon, 8 Sep 2008 13:12:24 +0000 (15:12 +0200)]
smbd: some write time fixes

- only the first non truncating write causes
  the write time update with 2 seconds delay.
  It's not enough to check for an existing update event
  as it will be NULL after the event was triggered.

- SMBwrite truncates always update the write time
  unless the sticky write time is set.

- SMBwrite truncates don't trigger a write time update on close.

metze
(cherry picked from commit 142a9703ae19a467a23ee72429f899dae156df64)

10 years agoWhen setting an NFSv4 ACL, map generic bits
Volker Lendecke [Mon, 8 Sep 2008 14:42:06 +0000 (16:42 +0200)]
When setting an NFSv4 ACL, map generic bits
(cherry picked from commit dbe7a61be2beac50d1665e38ac374cefbbabec00)
(cherry picked from commit c2faa48abce1d656527b89f601e084e3ba70e36d)

10 years agoFix debug message to show correct function name.
Jeremy Allison [Sat, 6 Sep 2008 03:40:02 +0000 (20:40 -0700)]
Fix debug message to show correct function name.
Jeremy.
(cherry picked from commit b2fcb8b6b17302e5ec29914f4e3dde853ffe5283)

10 years agoWrite times code update.
Jeremy Allison [Sat, 6 Sep 2008 02:01:09 +0000 (19:01 -0700)]
Write times code update.

Ok, here's the fix for the write times breakage
with the new tests in S4 smbtorture.

The key is keeping in the share mode struct
the "old_file_time" as the real write time,
set by all the write and allocation calls,
and the "changed_write_time" as the "sticky"
write time - set by the SET_FILE_TIME calls.

We can set them independently (although I
kept the optimization of not setting the
"old_file_time" is a "changed_write_time"
was already set, as we'll never see it.

This allows us to update the write time
immediately on the SMBwrite truncate case,
SET_END_OF_FILE and SET_ALLOCATION_SIZE calls,
whilst still have the 2 second delay on the
"normal" SMBwrite, SMBwriteX calls.

I think in a subsequent patch I'd like to
change the name of these from "old_file_time"
to "write_time" and "changed_write_time" to
"sticky_write_time" to make this clearer.

I think I also fixed a bug in Metze's original
code in that once a write timestamp had been
set from a "normal" SMBwriteX call the fsp->update_write_time_triggered
variable was set and then never reset - thus
meaning the write timestamp would never get
updated again on subsequent SMBwriteX's.

The new code checks the update_write_time_event
event instead, and doesn't update is there's
an event already scheduled.

Metze especially, please check this over for
your understanding.

Jeremy.
(cherry picked from commit f2fb6321b6666a30ca7fa11bc8d395f1a1865bb2)

10 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Mon, 8 Sep 2008 10:42:52 +0000 (12:42 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit 9082c77af4fb9fda6bb0a85810e454302130a71f)

10 years agoRemove unecessary msync.
Jeremy Allison [Fri, 5 Sep 2008 22:35:04 +0000 (15:35 -0700)]
Remove unecessary msync.
Jeremy.
(cherry picked from commit d7eab4b20af47401d281dd672e012d4eb96e5f4a)

10 years agoFix a memleak
Qiao Yang [Fri, 5 Sep 2008 12:08:09 +0000 (14:08 +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 be6f12273f171a3eb1967d2299064e57d737f6a4)
(cherry picked from commit 72865f5e4ff30861d58b928baaf7be3373301f37)

10 years agoDo proper error handling if the socket is closed
Volker Lendecke [Fri, 5 Sep 2008 09:48:36 +0000 (11:48 +0200)]
Do proper error handling if the socket is closed

This is a step in fixing bug 5707.

Thanks to Igor Galić <i.galic@brainsware.org> for reporting!

Volker
(cherry picked from commit 1558a5c1977b1f87600ec487238fa8db009f41fd)

10 years agorun "make idl" after after idl change "Handle arbitrary new PAC types"
Michael Adam [Tue, 26 Aug 2008 15:19:33 +0000 (17:19 +0200)]
run "make idl" after after idl change "Handle arbitrary new PAC types"

Michael
(cherry picked from commit cc54b4d74171d27e7a0b09aff0376804ac7ab69b)

10 years agoHandle arbitrary new PAC types
Andrew Tridgell [Sun, 24 Aug 2008 04:00:58 +0000 (14:00 +1000)]
Handle arbitrary new PAC types

When MS introduces a new PAC type, we should just ignore it, not
generate a parse error. New PAC info structures are supposed to be
backwards compatible with old ones
(cherry picked from commit 2971b926c835412b02c93ad1e30f1471bc0a3612)
(cherry picked from commit 843e9ebbf63f84270f8638a8e79538523b2148a8)

10 years agore-run make idl after Jelmer's "poperly cast array lengths" pidl change.
Michael Adam [Tue, 26 Aug 2008 15:17:14 +0000 (17:17 +0200)]
re-run make idl after Jelmer's "poperly cast array lengths" pidl change.

(f321240fa91fa19c1131f119c42f64897d220682)

Michael
(cherry picked from commit cd3f4ee593e606e48cd104df222f8bda8e370a58)

10 years agofixed an errno handling bug that could lead to an infinite loop
Andrew Tridgell [Sun, 24 Aug 2008 03:53:19 +0000 (13:53 +1000)]
fixed an errno handling bug that could lead to an infinite loop
(cherry picked from commit 5ccdc58ce91ee40ca7171dd040191291aeb7fe02)
(cherry picked from commit 1361caecb355047001f8a351ec2e6f10d7f0e741)

10 years agofixed tsmsm_sendfile(). The logic was totally broken.
Andrew Tridgell [Sat, 23 Aug 2008 01:36:27 +0000 (11:36 +1000)]
fixed tsmsm_sendfile(). The logic was totally broken.
(cherry picked from commit 794e48b809036871287df8416a2c669b7e26f216)
(cherry picked from commit 3ce3f7f58402b98ce386bab1c40988e5ccd40d15)

10 years agoconfigure: fix typo in GNU ld version-script test.
Michael Adam [Fri, 5 Sep 2008 09:39:38 +0000 (11:39 +0200)]
configure: fix typo in GNU ld version-script test.

Michael
(cherry picked from commit 0d9f3dfc4c139938ee57b6cf60c29cf4ce404be7)
(cherry picked from commit 2381ec3b3f6a4798c15f4d3f3aee8caea8f48941)

10 years agoFix winbindd crash bug with trusted domains. Bug #5736
James Ding [Thu, 4 Sep 2008 22:17:18 +0000 (15:17 -0700)]
Fix winbindd crash bug with trusted domains. Bug #5736
(cherry picked from commit 2d84b9a1024f68657f75aa7e0c4091b8c7afd194)

10 years agoget rid of unneeded argument for get_alloc_methods as well
Herb Lewis [Thu, 4 Sep 2008 21:32:09 +0000 (14:32 -0700)]
get rid of unneeded argument for get_alloc_methods as well
(cherry picked from commit 59415cb8b3ce7981dbf576086e13675f343581a4)

10 years agoget rid of unneeded argument for get_methods
Herb Lewis [Thu, 4 Sep 2008 20:58:06 +0000 (13:58 -0700)]
get rid of unneeded argument for get_methods
(cherry picked from commit 2a085d5343ab954e1bd60c11033506dc7c9040e3)

10 years agoCleanup of DC enumeration in get_dcs()
Steven Danneman [Thu, 4 Sep 2008 19:05:13 +0000 (12:05 -0700)]
Cleanup of DC enumeration in get_dcs()

This is a fix for a few small inefficiencies/bugs in the get_dcs() path.

* because the third add_one_dc_unique() loop was outside the ADS check all DCs
  returned from the non-sitename lookup were being tacked onto the dc_name_ip
  list twice.
* add_one_dc_unique() now checks if the given IP address already exists before
  adding it to the list, making the returned list actually unique
* added more thorough doxygen comment headers
(cherry picked from commit edd234e7a22dab105256f90df36d86f168dcea4c)

10 years agokerberos: fix indent of enc type lines in generated krb5.conf files.
Günther Deschner [Thu, 4 Sep 2008 13:11:22 +0000 (15:11 +0200)]
kerberos: fix indent of enc type lines in generated krb5.conf files.

Guenther
(cherry picked from commit 18a26f08b6fab4119a1421a7ca59c32dde8bb8cb)
(cherry picked from commit 8d6220a94667c5906ead5fa80b6afabc82159b53)

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

10 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 bfced01a92ae1a4913c0c9aba27e7b43e06f9032)

10 years agoFix Coverity ID 587
Volker Lendecke [Mon, 1 Sep 2008 11:46:27 +0000 (13:46 +0200)]
Fix Coverity ID 587

The following test program prints "8" on 64-bit :-)

static void print_size(const char lenbuf[4])
{
        printf("sizeof(lenbuf) = %d\n", (int)sizeof(lenbuf));
}
int main(void)
{
        const char lenbuf[4];
        print_size(lenbuf);
        return 0;
}

Jeremy, please check :-)

Volker
(cherry picked from commit 9daea0ccfdda58450be3c9a9a94c016f5900c319)
(cherry picked from commit 11fdeeeb551ac3287b75e114b15bc4f76cf2d337)

10 years agoAdd workaround for docs build and dependency on parameters.all.xml
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
(cherry picked from commit d4f5b5255f9b95050ddd9d67bd3958402be77918)
(cherry picked from commit c8154142d97ccf973feb36d77f932c893fda0af5)
(cherry picked from commit c91e7e9f7f392d5ba850619395eddac34617f1e4)
(cherry picked from commit bdb0a5d5fdbc331e11391f7b6e0aae963cebd3fc)
(cherry picked from commit babe47a0ca130888eb478e2f5ff8d5ec04810938)

10 years agoRelease scripts: Update create-tarball to include docs and other packaging details.
Gerald W. Carter [Tue, 27 May 2008 21:27:21 +0000 (16:27 -0500)]
Release scripts: Update create-tarball to include docs and other packaging details.

I've updated the create-tarball script to support command line options,
docs build (or copy and existing build), and to run the packaging update
scripts.

  $ release-scripts/create-tarball --help
  Usage release-scripts/create-tarball [options]
      --help             Print command usage
      --branch <name>    Specify the branch to to create the archive file from
      --copy-docs <dir>  Copy documentation from <dir> rather than building
      --tag <name>       Tag name for release
      --keyid <email>    The GnuPG key ID used to sign the release tag
(cherry picked from commit 7c96795e5954b6a716beb6f5a30d6c7bb1647717)
(cherry picked from commit 4a5830fb03152cf59f27c762046554eb6df5cb65)

10 years agoAdd simple script to build docs
Gerald (Jerry) Carter [Tue, 27 May 2008 17:00:00 +0000 (12:00 -0500)]
Add simple script to build docs
(cherry picked from commit 0865f4615d3ee91673dd6d02c6537765f34b3129)
(cherry picked from commit 16fe020367f3d63c4ff1391f265bdaa48764900f)

10 years agoDeal with systems that don't initialize birthtime correctly.
Jeremy Allison [Fri, 29 Aug 2008 16:29:35 +0000 (09:29 -0700)]
Deal with systems that don't initialize birthtime correctly.
Pointed out by SATOH Fumiyasu <fumiyas@osstech.jp>.
Jeremy.
(cherry picked from commit 4876e4ffe9f5142bf90dc14b105436eaca35d3f4)

10 years agoClarify usage of "force create mode".
Jeremy Allison [Thu, 28 Aug 2008 23:04:30 +0000 (16:04 -0700)]
Clarify usage of "force create mode".
Jeremy.
(cherry picked from commit 10f036829aca0b6b4cde03893f71effbf4d30a91)

10 years agoAdd st_birthtime and friends for accurate create times on systems that support it...
Jeremy Allison [Thu, 28 Aug 2008 19:09:06 +0000 (12:09 -0700)]
Add st_birthtime and friends for accurate create times on systems that support it (*BSD and MacOSX). This really needs to be in 3.2.x.
Should have done this ages ago, sorry.
Jeremy.
(cherry picked from commit 0cba30073410ba499834ac26dee3f81a75c8de4f)

10 years agowinbindd: fix invalid sid copy (hit when enumerating sibling domains).
Günther Deschner [Thu, 28 Aug 2008 10:29:24 +0000 (12:29 +0200)]
winbindd: fix invalid sid copy (hit when enumerating sibling domains).

Guenther
(cherry picked from commit 5eee7423351ffd05486e33ff8eb905babcbc9422)
(cherry picked from commit 9f0bc4ff17b5a11dc412d0b5bc136476f3209a0c)

10 years agoFix the wcache_invalidate_samlogon calls.
Jeremy Allison [Thu, 28 Aug 2008 00:26:59 +0000 (17:26 -0700)]
Fix the wcache_invalidate_samlogon calls.
Jeremy.
(cherry picked from commit 0a0795fd0310cc44dac0df312325df6d08e38cdb)

10 years agoCorrect the netsamlogon_clear_cached_user function.
Ephi Dror [Thu, 28 Aug 2008 00:26:36 +0000 (17:26 -0700)]
Correct the netsamlogon_clear_cached_user function.
(cherry picked from commit 85dd9c64ca2ffa31d02ee10a3745fd596e80786e)

10 years agoBe explicit about setting perms for the ldb. Helps others who may use this api.
Jeremy Allison [Wed, 27 Aug 2008 18:30:02 +0000 (11:30 -0700)]
Be explicit about setting perms for the ldb. Helps others who may use this api.
Jeremy.
(cherry picked from commit 9f1bb27bf566069dab48eea125c22a5e20849774)

10 years ago mount.cifs: unclear error message with "credentials"
Steve French [Tue, 26 Aug 2008 18:04:44 +0000 (13:04 -0500)]
mount.cifs: unclear error message with "credentials"

Thanks to Christophe Curis for the suggestion
(cherry picked from commit a122df5dc01ed9767c53d77a73aabd44f7c8a7ca)

10 years agobecome root for AIO operations
Andrew Tridgell [Sun, 24 Aug 2008 03:58:05 +0000 (13:58 +1000)]
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 27b1ae601542ebe2e23ab4ff81eb14f8e03a3caf)

10 years agoEINVAL is also a valid error return, meaning "this filesystem
Andrew Tridgell [Tue, 26 Aug 2008 04:06:42 +0000 (14:06 +1000)]
EINVAL is also a valid error return, meaning "this filesystem
cannot do sendfile for this file"
(cherry picked from commit dc04b5adf7569b3501cb95f86d01e00276b41c23)

10 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 319cea52d259e347061658cfbae56ab350b09671)

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

10 years agocifs.upcall: bump SPNEGO msg version number and don't reject old versions
Jeff Layton [Sun, 24 Aug 2008 21:31:49 +0000 (17:31 -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 2744bcbf3f22102911b5a3c4676e7d2f970a86eb)

10 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:50:53 +0000 (13:50 -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.
(cherry picked from commit f845c95dcfa0b1630a0057c62941bb8a72ebdd83)

10 years agowinbindd: Fix crash in cm_connect_sam()
Gerald (Jerry) Carter [Fri, 22 Aug 2008 15:17:04 +0000 (10:17 -0500)]
winbindd: Fix crash in cm_connect_sam()

Fix segv when talking to parent DC (joined to child domain).

The root cause was

(a) storing the parent domain in the cli_state struct caused
    the NTLMSSP pipe bind to fail which made us fallover to
    the schannel code path
(b) the dcinfo pointer in cm_get_schannel_dcinfo() was returning
    NULL even though the function indicated success.
(cherry picked from commit 5ce4a2ae6697970ea37d0078a506615b4b7a9a9c)
(cherry picked from commit 72d138adc200ab36e324721900af1a06d0879318)

10 years agocifs.upcall: fix build warning
Jeff Layton [Fri, 22 Aug 2008 01:41:19 +0000 (21:41 -0400)]
cifs.upcall: fix build warning

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

10 years agoFix Bug #5710 and make machine account password changing work again.
Günther Deschner [Thu, 21 Aug 2008 13:05:35 +0000 (15:05 +0200)]
Fix Bug #5710 and make machine account password changing work again.

When we negotiated NETLOGON_NEG_PASSWORD_SET2 we need to use
NetrServerPasswordSet2 to change the machine password.

Tested with NT4, W2k, W2k3 and W2k8.

Guenther
(cherry picked from commit 8ae7040a5e64f1a1d2088aeca1dab90470455d8a)

10 years agore-run make idl.
Günther Deschner [Thu, 21 Aug 2008 13:02:03 +0000 (15:02 +0200)]
re-run make idl.

Guenther
(cherry picked from commit f24cef9fa7be45212744d39b7c66804e64147afd)
(cherry picked from commit 059979f8e7d7d0459f83184ad5b06a8e6281f558)

10 years agoIDL: fix IDL for netr_ServerPasswordSet2().
Günther Deschner [Thu, 21 Aug 2008 13:01:36 +0000 (15:01 +0200)]
IDL: fix IDL for netr_ServerPasswordSet2().

Guenther
(cherry picked from commit 7b312a0abc6de5a51555ccfbde7f8f78fc11d043)
(cherry picked from commit d9fa27a079dde0ebd9c2d6dc1c1bff3ae570f9e8)

10 years agoFix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid <Douglas_E_Wegsch...
Jeremy Allison [Thu, 21 Aug 2008 17:25:51 +0000 (10:25 -0700)]
Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid <Douglas_E_Wegscheid@whirlpool.com>.
Jeremy.
(cherry picked from commit 02e260ab5254c9691846f7009f685e1b11032f80)

10 years agobuild: fix bug #5590 by not linking in the static libs but the objects.
Michael Adam [Wed, 20 Aug 2008 12:56:18 +0000 (14:56 +0200)]
build: fix bug #5590 by not linking in the static libs but the objects.

Michael
(cherry picked from commit 6ad2090391a92ebe822b2d7b80e180c251dc8e7a)
(cherry picked from commit 24459c7eda080a4fed2d4f2a576c97f878f905f9)

10 years agobuild: fall down to the same place when using an internal lib statically.
Michael Adam [Wed, 20 Aug 2008 12:55:24 +0000 (14:55 +0200)]
build: fall down to the same place when using an internal lib statically.

Michael
(cherry picked from commit 702c0bc04668117e3521d687b9b5a87fd7e0f1b1)
(cherry picked from commit f3ad03d0f909ff862411511d9f63e77047034c01)

10 years agobuild: rename LIBNETAPI_OBJ1 to LIBNETAPI_OBJ0 for consistency.
Michael Adam [Wed, 20 Aug 2008 11:22:13 +0000 (13:22 +0200)]
build: rename LIBNETAPI_OBJ1 to LIBNETAPI_OBJ0 for consistency.

Michael
(cherry picked from commit ead9b9d7167d999d73cf4111f3b321236aac2a15)
(cherry picked from commit 8dd57f31b2ba621654f989e1ed58bd2dd80b7849)

10 years agofix build warning.
Günther Deschner [Wed, 20 Aug 2008 16:40:58 +0000 (18:40 +0200)]
fix build warning.

Guenther
(cherry picked from commit a75055be5ff7ebe3476cfac86c6597a56a843c23)
(cherry picked from commit d0a4b9f69984ca5da0007af91013f1bc78dcbf2b)

10 years agofix another build warning.
Günther Deschner [Wed, 20 Aug 2008 18:24:45 +0000 (20:24 +0200)]
fix another build warning.

Guenther
(cherry picked from commit 43693ce6c678b961fa516bbf502af92f87cd5346)
(cherry picked from commit 2a5ae59f77c05c41c97747dee9bc8c196dfe6b89)

10 years agonss_winbind: When returning NSS_UNAVAIL, squash errno to ENOENT
Gerald (Jerry) Carter [Wed, 20 Aug 2008 18:00:40 +0000 (13:00 -0500)]
nss_winbind: When returning NSS_UNAVAIL, squash errno to ENOENT

According to the GNU libc nss guide, we should always set
errno to ENOENT when returning NSS_UNAVAIL.

http://www.gnu.org/software/libtool/manual/libc/NSS-Modules-Interface.html#NSS-Modules-Interface

At least the MQ Series message queing service that runs
on WebSphere will fail if you return any other errno in this case.
(cherry picked from commit ee26664602445fa7798e2061f6bcbef0756d6528)
(cherry picked from commit 29b39723b82f363d32dc4678d6b71a78485c65ce)

10 years agosmbd: fix the handling of create_options to pass RAW-OPEN
Stefan Metzmacher [Tue, 19 Aug 2008 14:34:50 +0000 (16:34 +0200)]
smbd: fix the handling of create_options to pass RAW-OPEN

Some of the bits generate INVALID_PARAMETER and some bits
are ignored when they come from a client, that's why we need
to use bits from the ignored range for our internal usage.

metze
(cherry picked from commit 7b4c8a4e39f310eb450918fa841b0ea1b4af19f7)
(cherry picked from commit 3366ac2857820d87fb36a1357786a3564d258da5)

10 years agocifs.upcall: handle MSKRB5 OID properly
Jeff Layton [Wed, 20 Aug 2008 01:35:35 +0000 (21:35 -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 3d96409c115b3ad4ef29ff75e40b39a26e316afe)

10 years agoFix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 address
Jeremy Allison [Wed, 20 Aug 2008 00:31:46 +0000 (17:31 -0700)]
Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 address
reported by Ted Percival <ted@midg3t.net>.
Jeremy.
(cherry picked from commit 4ac537d1b78c915fe25c219958312cf22f3cba80)

10 years agobuild: fix linking cifs.upcall when nscd_flush_cache() is found.
Michael Adam [Tue, 19 Aug 2008 11:29:24 +0000 (13:29 +0200)]
build: fix linking cifs.upcall when nscd_flush_cache() is found.

Michael
(cherry picked from commit 661b7fdffda40a9ca7cb36627dbaf91cb4357cd0)
(cherry picked from commit 7401c6a5b74c9c82c02923e6eafa6072a5d5678f)

10 years agoVERSION: Raise version number up tp 3.2.4.
Karolin Seeger [Thu, 28 Aug 2008 14:04:42 +0000 (16:04 +0200)]
VERSION: Raise version number up tp 3.2.4.

Karolin

10 years agoldb: Fix permissions of new ldg files. release-3-2-3
Karolin Seeger [Wed, 27 Aug 2008 11:23:20 +0000 (13:23 +0200)]
ldb: Fix permissions of new ldg files.

This one fixes together with 2eaf4ed62 bug #5715 and CVE-2008-3789.

Thanks to Steve Langasek <vorlon@debian.org> for reporting!

Karolin