samba.git
14 years agos3: Fix an uninitialized variable read
Volker Lendecke [Sun, 14 Mar 2010 20:18:34 +0000 (21:18 +0100)]
s3: Fix an uninitialized variable read

Found by Laurent Gaffie <laurent.gaffie@gmail.com>

Thanks for that,

Volker

Fix bug #7254 (An uninitialized variable read could cause an smbd crash).

14 years agos3:smbd: make sure we always have a valid talloc stackframe
Stefan Metzmacher [Mon, 15 Mar 2010 13:42:17 +0000 (14:42 +0100)]
s3:smbd: make sure we always have a valid talloc stackframe

metze
(cherry picked from commit 386f15c62bb4d3517de719c750252e06cf3b1fb1)

Last 3 patches address bug #7251 (Segfault in DEBUG(2,("waiting for
connections...)

14 years agotalloc_stack: reset stackframe pointers to NULL
Stefan Metzmacher [Mon, 15 Mar 2010 13:39:11 +0000 (14:39 +0100)]
talloc_stack: reset stackframe pointers to NULL

This makes it easier to debug the code in future.

metze
(cherry picked from commit d23581b4d7a4936002c1d2d748836aead9215120)

14 years agotalloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]
Stefan Metzmacher [Mon, 15 Mar 2010 13:32:52 +0000 (14:32 +0100)]
talloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]

In smbd there's a small gab between TALLOC_FREE(frame); before
we call smbd_parent_loop() where we don't have a valid talloc stackframe.

smbd_parent_loop() calls talloc_stackframe() only within the while(1) loop.
As DEBUG(2,("waiting for connections")) uses talloc_tos() to construct
the time header for the debug message we crash on some systems.

metze
(cherry picked from commit 10ed809a1a31be50ce09142eb99b3a243ae8b940)

14 years agos3-netlogon: Fix bug #7237: _netr_SamLogon segfaults for clients sending NULL domain.
Günther Deschner [Thu, 11 Mar 2010 23:30:52 +0000 (00:30 +0100)]
s3-netlogon: Fix bug #7237: _netr_SamLogon segfaults for clients sending NULL domain.

Thanks to Marc Muehlfeld <muehlfeld@medizinische-genetik.de>.

Guenther

14 years agos3:release-scripts: fix create-tarball to treat vendor patch level correctly
Michael Adam [Mon, 8 Mar 2010 22:37:21 +0000 (23:37 +0100)]
s3:release-scripts: fix create-tarball to treat vendor patch level correctly
(cherry picked from commit b845025daf2da85eb1af6cbfa7878cf59a32f2a6)

14 years agos4-smbtorture: add --option=torture:spoolss_check_size=yes.
Günther Deschner [Fri, 19 Feb 2010 13:25:19 +0000 (14:25 +0100)]
s4-smbtorture: add --option=torture:spoolss_check_size=yes.

This disables the size calculation comparison by default.

Guenther
(cherry picked from commit f2ecec3dcdafd63cd72d13019a998bf99539a9ba)

The last 18 patches address bug #6727 (Printer issues on 3.4.x).

14 years agos4-smbtorture: fix smbtorture after GetPrinterData{Ex} after IDL changes.
Günther Deschner [Thu, 4 Mar 2010 21:40:31 +0000 (22:40 +0100)]
s4-smbtorture: fix smbtorture after GetPrinterData{Ex} after IDL changes.

Guenther

14 years agos4-smbtorture: fix RPC-SPOOLSS-WIN after PrinterData IDL changes.
Günther Deschner [Fri, 5 Mar 2010 19:32:16 +0000 (20:32 +0100)]
s4-smbtorture: fix RPC-SPOOLSS-WIN after PrinterData IDL changes.

Guenther
(cherry picked from commit 58c9070746a3e0725f5d3a3ce6deda8fad0c5974)

14 years agos4-spoolss: fix dcesrv_spoolss_GetPrinterData build.
Günther Deschner [Fri, 5 Mar 2010 15:34:17 +0000 (16:34 +0100)]
s4-spoolss: fix dcesrv_spoolss_GetPrinterData build.

really not my day today...

Guenther
(cherry picked from commit 91ff11d50458a951ab0adc9b37bcb0ef4ee09e15)

14 years agos4-spoolss: fix spoolss_GetPrinterData implementation after IDL change.
Günther Deschner [Thu, 4 Mar 2010 17:21:50 +0000 (18:21 +0100)]
s4-spoolss: fix spoolss_GetPrinterData implementation after IDL change.

Guenther

14 years agos3: re-run make samba3-idl.
Günther Deschner [Fri, 5 Mar 2010 16:17:49 +0000 (17:17 +0100)]
s3: re-run make samba3-idl.

Guenther

14 years agos3-libads: fix get_remote_printer_publishing_data after spoolss_EnumPrinterDataEx...
Günther Deschner [Thu, 4 Mar 2010 16:58:49 +0000 (17:58 +0100)]
s3-libads: fix get_remote_printer_publishing_data after spoolss_EnumPrinterDataEx IDL change.

Guenther
(cherry picked from commit 8e6dd25391d77b69859a3b622a1b116fa8000a40)

14 years agos3-spoolss: fix _spoolss_EnumPrinterDataEx after idl
Günther Deschner [Thu, 4 Mar 2010 15:47:33 +0000 (16:47 +0100)]
s3-spoolss: fix _spoolss_EnumPrinterDataEx after idl

Guenther
(cherry picked from commit 55326549852a3ab1114a8cb1536578ae02183eb8)

14 years agos3-rpcclient: fix rpcclient after spoolss_EnumPrinterDataEx IDL change.
Günther Deschner [Thu, 4 Mar 2010 15:47:10 +0000 (16:47 +0100)]
s3-rpcclient: fix rpcclient after spoolss_EnumPrinterDataEx IDL change.

Guenther
(cherry picked from commit becbb624eb90b84ff20b128de1aee5f5acfc3dbc)

14 years agos3-net: fix net after spoolss_EnumPrinterDataEx IDL change.
Günther Deschner [Thu, 4 Mar 2010 15:46:53 +0000 (16:46 +0100)]
s3-net: fix net after spoolss_EnumPrinterDataEx IDL change.

Guenther
(cherry picked from commit a99ac4f236d9a93d4ca8bd874cbab89b155c644a)

14 years agospoolss: fix spoolss_EnumPrinterDataEx IDL.
Günther Deschner [Thu, 4 Mar 2010 15:40:31 +0000 (16:40 +0100)]
spoolss: fix spoolss_EnumPrinterDataEx IDL.

Guenther
(cherry picked from commit 4df1047e8398a9af4df94c7e245d993d1f60ef5f)

14 years agos3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.
Günther Deschner [Thu, 4 Mar 2010 14:46:28 +0000 (15:46 +0100)]
s3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.

Guenther
(cherry picked from commit 7643afa70e879efc059c75b8309bf89dbb3c459b)

14 years agos3-spoolss: fix _spoolss_GetPrinterDataEx after IDL change.
Günther Deschner [Thu, 4 Mar 2010 14:39:59 +0000 (15:39 +0100)]
s3-spoolss: fix _spoolss_GetPrinterDataEx after IDL change.

Guenther
(cherry picked from commit fbb6d00eed6bca960aa53a5967a2dea426cacfe2)

14 years agospoolss: rollback GetPrinterData[Ex] IDL.
Günther Deschner [Thu, 4 Mar 2010 14:38:18 +0000 (15:38 +0100)]
spoolss: rollback GetPrinterData[Ex] IDL.

Guenther
(cherry picked from commit 0e779b573bf5c27bf08ceefa09a7e2b07691f948)

14 years agos3-rpcclient: fix rpcclient after spoolss_SetPrinterData{Ex} IDL change.
Günther Deschner [Thu, 4 Mar 2010 14:34:49 +0000 (15:34 +0100)]
s3-rpcclient: fix rpcclient after spoolss_SetPrinterData{Ex} IDL change.

Guenther
(cherry picked from commit 4956650369156dfff96ccc827e55697ec642240d)

14 years agos3-net: fix net after spoolss_SetPrinterData{Ex} IDL change.
Günther Deschner [Thu, 4 Mar 2010 14:34:22 +0000 (15:34 +0100)]
s3-net: fix net after spoolss_SetPrinterData{Ex} IDL change.

Guenther
(cherry picked from commit 37ca9288d2631b48a8eb50c01d6c0cc462d8ee31)

14 years agos3-spoolss: fix _spoolss_SetPrinterData{Ex} after IDL change.
Günther Deschner [Thu, 4 Mar 2010 16:00:34 +0000 (17:00 +0100)]
s3-spoolss: fix _spoolss_SetPrinterData{Ex} after IDL change.

Guenther
(cherry picked from commit 9a934832797c3e72859770719e05d19a5eefa14d)

14 years agospoolss: rollback SetPrinterData{Ex} IDL.
Günther Deschner [Wed, 3 Mar 2010 17:22:57 +0000 (18:22 +0100)]
spoolss: rollback SetPrinterData{Ex} IDL.

Guenther
(cherry picked from commit 0528515be44c40603827bb153ff0e2bac7b0f041)

14 years agoFix bug #7234 - Symlink delete fails but incorrectly reports success to client.
Jeremy Allison [Wed, 10 Mar 2010 22:06:18 +0000 (14:06 -0800)]
Fix bug #7234 - Symlink delete fails but incorrectly reports success to client.

Typo called LSTAT instead of STAT in the unlink by pathname path.

Jeremy.
(cherry picked from commit 367ddc3d1b525525a9dae077335e33dc0017b58e)

14 years agos3:build: Fix automatic building of vfs_tsmsm if gpfs and dmapi are present.
Michael Adam [Mon, 8 Mar 2010 21:32:41 +0000 (22:32 +0100)]
s3:build: Fix automatic building of vfs_tsmsm if gpfs and dmapi are present.

Michael
(cherry picked from commit 9113e14b291c10c824d2d8ea5cb28ffc0adcb63b)

Fix bug #7231 (vfs_tsmsm not built automatically).

14 years agos3: Fix a NULL pointer dereference
Volker Lendecke [Tue, 9 Mar 2010 10:14:14 +0000 (11:14 +0100)]
s3: Fix a NULL pointer dereference

Found by Laurent Gaffie <laurent.gaffie@gmail.com>.

Thanks!

Volker
(cherry picked from commit 25452a2268ac7013da28125f3df22085139af12d)

Fix bug #7229 (NULL pointer dereference).

14 years agos3:winbindd: add DEBUG(10,...) for the end of each top level
Stefan Metzmacher [Fri, 5 Mar 2010 10:16:12 +0000 (11:16 +0100)]
s3:winbindd: add DEBUG(10,...) for the end of each top level

That will hopefully make debugging a bit easier (at least for me).

metze
(cherry picked from commit 31293c64a323eb59fd8e81cd44bb33768a43e0c0)

Fix bug #7225 (Make winbindd logs more verbose for troubleshooting).

14 years agovfs_netatalk: Segfault if hide files or veto files has no ".AppleDouble"
SATOH Fumiyasu [Wed, 10 Mar 2010 03:15:44 +0000 (12:15 +0900)]
vfs_netatalk: Segfault if hide files or veto files has no ".AppleDouble"

Fix bug #1206 (netatalk vfs causes segfaults in samba).

14 years agoWHATSNEW: Start release notes for Samba 3.5.2.
Karolin Seeger [Tue, 9 Mar 2010 09:36:06 +0000 (10:36 +0100)]
WHATSNEW: Start release notes for Samba 3.5.2.

Karolin

14 years agoVERSION: Raise version number up to 3.5.2.
Karolin Seeger [Tue, 9 Mar 2010 09:33:30 +0000 (10:33 +0100)]
VERSION: Raise version number up to 3.5.2.

Karolin

14 years agoRevert "Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond...
Karolin Seeger [Mon, 8 Mar 2010 19:34:39 +0000 (20:34 +0100)]
Revert "Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond to a read or write."

This reverts commit a6ae7a552f851a399991262377cc0e062e40ac20.

This fixes bug #7222 (All users have full rigths on all shares) (CVE-2010-0728).
(cherry picked from commit 1c9494c76cc9686c61e0966f38528d3318f3176f)

14 years agoWHATSNEW: Prepare release notes for Samba 3.5.1.
Karolin Seeger [Mon, 8 Mar 2010 19:32:49 +0000 (20:32 +0100)]
WHATSNEW: Prepare release notes for Samba 3.5.1.

Karolin
(cherry picked from commit cd499eaf0418fa0a3034c5ba4709278a302ea980)

14 years agos3: Fix the build of net_afs.c with --fake-kaserver=yes, bug 7216
Volker Lendecke [Sat, 6 Mar 2010 11:57:35 +0000 (12:57 +0100)]
s3: Fix the build of net_afs.c with --fake-kaserver=yes, bug 7216

Thanks to Geza Gemes <geza@kzsdabas.hu> for filing this bug
(cherry picked from commit 5a3633faf12cdec41dc18064d5364a3fd067a22d)

14 years agomount.cifs: don't allow it to be run as setuid root program
Jeff Layton [Tue, 26 Jan 2010 13:36:11 +0000 (08:36 -0500)]
mount.cifs: don't allow it to be run as setuid root program

mount.cifs has been the subject of several "security" fire drills due to
distributions installing it as a setuid root program. This program has
not been properly audited for security and the Samba team highly
recommends that it not be installed as a setuid root program at this
time.

To make that abundantly clear, this patch forcibly disables the ability
for mount.cifs to run as a setuid root program. People are welcome to
trivially patch this out, but they do so at their own peril.

A security audit and redesign of this program is in progress and we hope
that we'll be able to remove this in the near future.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
The last 3 patches address bug #6853 (mount.cifs race that allows user to
replace mountpoint with a symlink).

14 years agomount.cifs: check for invalid characters in device name and mountpoint
Jeff Layton [Tue, 26 Jan 2010 13:36:03 +0000 (08:36 -0500)]
mount.cifs: check for invalid characters in device name and mountpoint

It's apparently possible to corrupt the mtab if you pass embedded
newlines to addmntent. Apparently tabs are also a problem with certain
earlier glibc versions. Backslashes are also a minor issue apparently,
but we can't reasonably filter those.

Make sure that neither the devname or mountpoint contain any problematic
characters before allowing the mount to proceed.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agomount.cifs: take extra care that mountpoint isn't changed during mount
Jeff Layton [Tue, 26 Jan 2010 13:35:35 +0000 (08:35 -0500)]
mount.cifs: take extra care that mountpoint isn't changed during mount

It's possible to trick mount.cifs into mounting onto the wrong directory
by replacing the mountpoint with a symlink to a directory. mount.cifs
attempts to check the validity of the mountpoint, but there's still a
possible race between those checks and the mount(2) syscall.

To guard against this, chdir to the mountpoint very early, and only deal
with it as "." from then on out.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agos3: net_share.c: fix argc handling
Holger Hetterich [Wed, 3 Mar 2010 11:58:15 +0000 (12:58 +0100)]
s3: net_share.c: fix argc handling

The "net share" command was no longer possible because it enters
the net_share function with argc == 0.

Fix bug #7203 (net share doesn't work anymore).

14 years agos3:ads fix dn parsing name was always null
Simo Sorce [Mon, 1 Mar 2010 19:50:50 +0000 (14:50 -0500)]
s3:ads fix dn parsing name was always null

While there also use ldap_exploded_dn instead of ldb_dn_validate()
so we can remove a huge dependency that is hanging there only for one very
minor marginal use.

Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 8492f92843aa17eaf4a3ea9d5a9c6319afc97854)

Fix bug #7204 (net ads join createcomputer=Servers/Unix fails with out of
memory).

14 years agos3:vfs_aixacl2: add missing semicolon
Björn Jacke [Tue, 2 Mar 2010 12:00:19 +0000 (13:00 +0100)]
s3:vfs_aixacl2: add missing semicolon

fixes #7197. Thanks to William Jojo for the correction.
(cherry picked from commit d18840830e3950a91c2adb4866b3c8819b15869b)

14 years agos3:winbindd: never mark external domains as internal!
Stefan Metzmacher [Tue, 23 Feb 2010 07:42:41 +0000 (08:42 +0100)]
s3:winbindd: never mark external domains as internal!

This way we can endup with silently using builtin_passdb_methods
for an ad domain without an inbound trust.

This fixes bug #7170.

metze
(cherry picked from commit f924b7749280b31ece19885de1c3ad1bd71942ac)

14 years agoSecond part of fix for bug #7159 - client rpc_transport doesn't cope with bad server...
Jeremy Allison [Fri, 19 Feb 2010 22:24:17 +0000 (14:24 -0800)]
Second part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns.

If server returns zero on a NP read. Report pipe broken.
Prevents client from looping if it thinks there should be
more data.

Jeremy.
(cherry picked from commit 0055e33dbed0e81548464d01bcf864255bab3159)

14 years agoFirst part of fix for bug #7159 - client rpc_transport doesn't cope with bad server...
Jeremy Allison [Fri, 19 Feb 2010 22:18:51 +0000 (14:18 -0800)]
First part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns.

Ensure that subreq is *always* talloc_free'd in the _done
function, as it has an event timeout attached. If the
read requests look longer than the cli->timeout, then
the timeout fn is called with already freed data.

Jeremy.
(cherry picked from commit ad77ae1d5870e06f8587ecf634e0b6bdcbb950d7)

14 years agoFix one of the valgrind warnings from bug #6814 - Fixes for problems reported by...
Roel van Meer [Fri, 26 Feb 2010 22:54:22 +0000 (14:54 -0800)]
Fix one of the valgrind warnings from bug #6814 - Fixes for problems reported by valgrind

The timeval passed to event_add_to_select_args() must be initialized
as event_add_to_select_args() uses a timeval_min() on this and next_event.

14 years agos3: Fix bug 5198 -- parse chfn(1)-change gecos field
Volker Lendecke [Sat, 6 Feb 2010 12:26:06 +0000 (13:26 +0100)]
s3: Fix bug 5198 -- parse chfn(1)-change gecos field
(cherry picked from commit 2ea2d2a81e0666f478c5daf1469c8447a3096e8e)

14 years agoVERSION: Raise version number up to 3.5.1.
Karolin Seeger [Mon, 1 Mar 2010 14:03:03 +0000 (15:03 +0100)]
VERSION: Raise version number up to 3.5.1.

Karolin

14 years agoWHATSNEW: Update changes since 3.5.0rc3.
Karolin Seeger [Mon, 1 Mar 2010 11:09:45 +0000 (12:09 +0100)]
WHATSNEW: Update changes since 3.5.0rc3.

Karolin

14 years agos3-net: fix net ads dns usage calls.
Günther Deschner [Mon, 8 Feb 2010 10:53:59 +0000 (11:53 +0100)]
s3-net: fix net ads dns usage calls.

Bjoern, please check.

Guenther

Fix bug #7181 (buildwarnings in net_ads.c).

14 years agos3-rpcclient: fix uninitialized variable in wkssvc_enumerateusers.
Günther Deschner [Wed, 17 Feb 2010 14:15:47 +0000 (15:15 +0100)]
s3-rpcclient: fix uninitialized variable in wkssvc_enumerateusers.

Guenther

Fix bug #7182.

14 years agos3: Fix but 7145 -- duplicate sam and unix accounts
Volker Lendecke [Sun, 28 Feb 2010 13:38:14 +0000 (14:38 +0100)]
s3: Fix but 7145 -- duplicate sam and unix accounts

For me this survives the

TESTS=posix_s3 POSIX_SUBTESTS="RPC-SAMR-LARGE-DC LOCAL-NSS-WRAPPER" make test

reproducer. Günther, please check!

Volker
(cherry picked from commit 0e9882a65e91e4ab55dc103c7f6aec4ccd966db0)

14 years agos3:cli_netlogon: keep the the correct negotiate_flags on the cli->dc structure
Stefan Metzmacher [Fri, 19 Feb 2010 22:22:40 +0000 (23:22 +0100)]
s3:cli_netlogon: keep the the correct negotiate_flags on the cli->dc structure

This should fix the rpccli_netlogon_set_trust_password() against DC's
without netr_ServerPasswordSet2 support.

This fixes bug #7160.

metze
(cherry picked from commit 1e9df26ef970df41de54142a78606a15374acbac)

14 years agos3: Avoid calling cli_alloc_mid twice in cli_smb_req_iov_send
Volker Lendecke [Sun, 21 Feb 2010 19:39:36 +0000 (20:39 +0100)]
s3: Avoid calling cli_alloc_mid twice in cli_smb_req_iov_send

I hate macros....
(cherry picked from commit 65914ed8194b141a44516d626e71a1851bccff5f)

Fix bug #7166.

14 years agoWHATSNEW: Prepare release notes for Samba 3.5.0.
Karolin Seeger [Mon, 22 Feb 2010 14:44:34 +0000 (15:44 +0100)]
WHATSNEW: Prepare release notes for Samba 3.5.0.

Karolin

14 years agoVERSION: Raise version number up to 3.5.0.
Karolin Seeger [Mon, 22 Feb 2010 14:40:57 +0000 (15:40 +0100)]
VERSION: Raise version number up to 3.5.0.

Karolin

14 years agoWHATSNEW: Update changes since 3.5.0rc2.
Karolin Seeger [Fri, 19 Feb 2010 12:45:32 +0000 (13:45 +0100)]
WHATSNEW: Update changes since 3.5.0rc2.

Karolin

14 years agolibrpc/ndr: don't overwrite the content in ndr_push_relative_ptr2_end()
Stefan Metzmacher [Fri, 19 Feb 2010 07:11:24 +0000 (08:11 +0100)]
librpc/ndr: don't overwrite the content in ndr_push_relative_ptr2_end()

metze
(cherry picked from commit 76aa37f653fec2d511921768381db7da661750cb)

The last 24 patches address bug #6888 (REGRESSION: printing support for 64 bit
windows clients broken).

14 years agospoolss: use ndr_push_spoolss_PrinterInfo2 hand-marshalled version (moves devmode...
Günther Deschner [Sat, 13 Feb 2010 02:45:25 +0000 (03:45 +0100)]
spoolss: use ndr_push_spoolss_PrinterInfo2 hand-marshalled version (moves devmode relative pointer down to sd).

Guenther
(cherry picked from commit 0a8011aa98ccaa81dc6ba2d30672ef4856fc31d8)

14 years agospoolss: add spoolss_security_descriptor.
Günther Deschner [Tue, 16 Feb 2010 01:48:01 +0000 (02:48 +0100)]
spoolss: add spoolss_security_descriptor.

Guenther
(cherry picked from commit 28817424935e5b6eaf465fe993dedc2b0a0cf177)

14 years agos3: re-run make samba3-idl.
Günther Deschner [Tue, 9 Feb 2010 15:47:32 +0000 (16:47 +0100)]
s3: re-run make samba3-idl.

Guenther

14 years agosecurity: make two bitmaps public.
Günther Deschner [Tue, 16 Feb 2010 09:46:07 +0000 (10:46 +0100)]
security: make two bitmaps public.

Guenther
(cherry picked from commit f10a2d773d141f67319e19b45c40101bb9cb6cf4)

14 years agospoolss: make two bitmaps public.
Günther Deschner [Sat, 13 Feb 2010 03:27:05 +0000 (04:27 +0100)]
spoolss: make two bitmaps public.

Guenther
(cherry picked from commit 8c4ff98ea11ff06e20bea73596e9643d8194a890)

14 years agospoolss: make all security descriptors and devicemodes 4 byte aligned and add missing...
Stefan Metzmacher [Thu, 18 Feb 2010 14:36:08 +0000 (15:36 +0100)]
spoolss: make all security descriptors and devicemodes 4 byte aligned and add missing subcontexts.

Guenther
(cherry picked from commit 8f52957369bf8ce7591d5d9a1436ccb7e384c612)

14 years agospoolss: set NDR_RELATIVE_REVERSE flag for various unions that have relative pointers.
Günther Deschner [Mon, 14 Dec 2009 16:22:39 +0000 (17:22 +0100)]
spoolss: set NDR_RELATIVE_REVERSE flag for various unions that have relative pointers.

Guenther
(cherry picked from commit 6d0a39741dacd81e33b25a91fa28cdf983d10d84)

14 years agondr_spoolss_buf: use LIBNDR_FLAG_NO_NDR_SIZE in NDR_SPOOLSS_SIZE_*
Stefan Metzmacher [Thu, 18 Feb 2010 14:17:42 +0000 (15:17 +0100)]
ndr_spoolss_buf: use LIBNDR_FLAG_NO_NDR_SIZE in NDR_SPOOLSS_SIZE_*

metze
(cherry picked from commit 2059a165ee6f4d231aa4075d8ddea70b8df8944f)

14 years agospoolss: use subcontext in NDR_SPOOLSS_PUSH_ENUM_OUT macro.
Stefan Metzmacher [Wed, 23 Dec 2009 14:52:39 +0000 (15:52 +0100)]
spoolss: use subcontext in NDR_SPOOLSS_PUSH_ENUM_OUT macro.

metze
(cherry picked from commit a4c3aeb79306190b09e284a6a28e3b40fbc5823b)

14 years agolibndr: fix ndr_size_* calculation with relative reverse buffers
Stefan Metzmacher [Thu, 18 Feb 2010 14:13:20 +0000 (15:13 +0100)]
libndr: fix ndr_size_* calculation with relative reverse buffers

metze
(cherry picked from commit 8310f02414efd3b792857ed20c636c4c114e1ba2)

14 years agolibndr: for now align reverse relative pointers to 2 bytes by default.
Stefan Metzmacher [Thu, 18 Feb 2010 12:40:44 +0000 (13:40 +0100)]
libndr: for now align reverse relative pointers to 2 bytes by default.

This is just a hack and we should let the callers use FLAG_ALIGN2
explicit in future.

metze
(cherry picked from commit 4a76d29374769ba4c075b8d5767498848d2e17d6)

14 years agolibndr: implement LIBNDR_RELATIVE_REVERSE handling
Stefan Metzmacher [Wed, 17 Feb 2010 20:24:40 +0000 (21:24 +0100)]
libndr: implement LIBNDR_RELATIVE_REVERSE handling

This is based on Guenther's initial code.

metze
(cherry picked from commit 31c7780c16651b284009874cf3da04587dc36d19)

14 years agolibndr: store a subcontext buffer size in ndr_push_subcontext_start.
Günther Deschner [Mon, 14 Dec 2009 14:33:32 +0000 (15:33 +0100)]
libndr: store a subcontext buffer size in ndr_push_subcontext_start.

Guenther
(cherry picked from commit 05347754ee61f06466d6d9b7f390001992f793ce)

14 years agolibndr: give an error when ndr_push_relative_ptr2_start()/_end() is used with the...
Stefan Metzmacher [Wed, 17 Feb 2010 19:27:08 +0000 (20:27 +0100)]
libndr: give an error when ndr_push_relative_ptr2_start()/_end() is used with the RELATIVE_REVERSE flag

metze
(cherry picked from commit b5f9c44da55abb28222441a7e064a2a25891981f)

14 years agolibndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can...
Günther Deschner [Tue, 9 Feb 2010 17:27:37 +0000 (18:27 +0100)]
libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can be disabled for single structure elements.

Guenther
(cherry picked from commit a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8)

14 years agolibndr: add LIBNDR_FLAG_RELATIVE_REVERSE flag.
Günther Deschner [Mon, 14 Dec 2009 14:09:00 +0000 (15:09 +0100)]
libndr: add LIBNDR_FLAG_RELATIVE_REVERSE flag.

Guenther
(cherry picked from commit ee13a51b0514ec3ac4ca9c532c2b101a08ec9784)

14 years agolibndr: change subcontext buffer allocation to allocate on subcontext_start.
Günther Deschner [Wed, 16 Dec 2009 21:54:02 +0000 (22:54 +0100)]
libndr: change subcontext buffer allocation to allocate on subcontext_start.

Guenther
(cherry picked from commit c9fa97b01774d767acfabaf1eec7a6aad1510440)

14 years agolibrpc/ndr: make ndr_push_relative_ptr2() static
Stefan Metzmacher [Wed, 17 Feb 2010 19:00:36 +0000 (20:00 +0100)]
librpc/ndr: make ndr_push_relative_ptr2() static

metze

14 years agolibrpc/ndr_krb5pac: use ndr_push_relative_ptr2_start()/_end()
Stefan Metzmacher [Wed, 17 Feb 2010 19:00:04 +0000 (20:00 +0100)]
librpc/ndr_krb5pac: use ndr_push_relative_ptr2_start()/_end()

metze
(cherry picked from commit e03591111a1b9c2f05c29a7afac4641f23f455f4)

14 years agolibrpc/ndr_drsblobs: use ndr_push_relative_ptr2_start()/_end()
Stefan Metzmacher [Wed, 17 Feb 2010 18:59:19 +0000 (19:59 +0100)]
librpc/ndr_drsblobs: use ndr_push_relative_ptr2_start()/_end()

metze
(cherry picked from commit b423bd2115e006f9af5d40cf5b651e03739d53a0)

14 years agospoolss: fix relative pointers in ndr_push_spoolss_DriverInfo101.
Günther Deschner [Thu, 11 Feb 2010 17:54:31 +0000 (18:54 +0100)]
spoolss: fix relative pointers in ndr_push_spoolss_DriverInfo101.

Guenther
(cherry picked from commit bfd6edb3e9339d602eb6514ff50c3bb6c671174e)

14 years agos3: re-run make full_idl.
Günther Deschner [Mon, 14 Dec 2009 13:17:05 +0000 (14:17 +0100)]
s3: re-run make full_idl.

Guenther
(cherry picked from commit c869328b1642043480f9600c88bcce9da37959b1)

14 years agopidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Günther Deschner [Mon, 14 Dec 2009 13:09:22 +0000 (14:09 +0100)]
pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.

Guenther
(cherry picked from commit a049d75193b284fe9efb28d303ea46ba407e5a7a)

14 years agolibndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Günther Deschner [Mon, 14 Dec 2009 13:08:34 +0000 (14:08 +0100)]
libndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.

Guenther

14 years agoFix bug #7154 - mangling method = hash can crash storing a name not containing a '.'
Jeremy Allison [Thu, 18 Feb 2010 19:22:44 +0000 (11:22 -0800)]
Fix bug #7154 - mangling method = hash can crash storing a name not containing a '.'

Fix use of uninitialized variable. This can lead to crashes if
mangling = hash processes names with no '.'.

Jeremy.
(cherry picked from commit df13b1303a751962d8f7d5298b39e4a7500fef15)

14 years agoFix bug #7155 - valgrind Conditional jump or move depends on uninitialised value...
Jeremy Allison [Thu, 18 Feb 2010 20:21:10 +0000 (12:21 -0800)]
Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised value(s) error when "mangling method = hash"

The charset array allocated in init_chartest() is allocated
by MALLOC, but only some elements of it being set after allocation. Fix is to
memset to zero after allocation.

Jeremy.
(cherry picked from commit a4e8210ba7d6d471cb9f17754244393b9c1e5930)

14 years agos3-docs: Remove trailing whitespaces and fix a typo.
Karolin Seeger [Thu, 18 Feb 2010 12:10:21 +0000 (13:10 +0100)]
s3-docs: Remove trailing whitespaces and fix a typo.

Karolin
(cherry picked from commit 494819773d61daa32d4ee2a0a15088f3b4abe6e2)

14 years agos3:docs: add some advice for usage of strict allocate
Björn Jacke [Wed, 17 Feb 2010 22:03:32 +0000 (23:03 +0100)]
s3:docs: add some advice for usage of strict allocate
(cherry picked from commit 37115f91aebec9c846e54790c6bcf433ae35888a)

14 years agotsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()
Stefan Metzmacher [Wed, 17 Feb 2010 18:11:11 +0000 (19:11 +0100)]
tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()

metze
(cherry picked from commit c42d9c4ec410e205091784cd97cbceb5572609d8)

14 years agoFix commit d07cd37b993d3c9beded20323174633b806196b5
Jeremy Allison [Wed, 17 Feb 2010 17:24:34 +0000 (09:24 -0800)]
Fix commit d07cd37b993d3c9beded20323174633b806196b5

Which was:

    tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD

Metze, this has to have been wrong - you are throwing away the talloc_realloc
pointer returned. Also no error checking. Please review.

Thank goodness for gcc warnings :-).

Jeremy.
(cherry picked from commit 936828de71023d90aaec6c1dba84052246bbad11)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
14 years agotsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD
Stefan Metzmacher [Wed, 17 Feb 2010 12:53:02 +0000 (13:53 +0100)]
tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD

metze
(cherry picked from commit d07cd37b993d3c9beded20323174633b806196b5)

14 years agotsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets
Stefan Metzmacher [Wed, 17 Feb 2010 08:33:18 +0000 (09:33 +0100)]
tsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets

Some system already have this as default. It's easier
to behave the same way on all systems and handle ipv6
and ipv4 sockets separate.

metze
(cherry picked from commit 1ffcb991a900b78c9175f6b093839fe96b1bd7d9)

14 years agotsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if...
Stefan Metzmacher [Wed, 17 Feb 2010 07:49:28 +0000 (08:49 +0100)]
tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if the local address is any

metze
(cherry picked from commit 8a0949dfc8d2ecf577dfc5ef38496421101b734e)

14 years agotsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connec...
Stefan Metzmacher [Wed, 17 Feb 2010 07:45:58 +0000 (08:45 +0100)]
tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connect_send()

This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX
sockets. Also some platforms require exact values for AF_INET and AF_INET6.

metze
(cherry picked from commit 6637b2f4b06fcee1e8e1b1782dd96e3273f8caac)

14 years agotsocket/bsd: fix do_bind logic for AF_INET
Stefan Metzmacher [Wed, 17 Feb 2010 07:42:22 +0000 (08:42 +0100)]
tsocket/bsd: fix do_bind logic for AF_INET

We want the explicit bind() when we don't use the any address.

metze
(cherry picked from commit 135543b4c300e2fc31ee4165ce630644e1aef455)

14 years agosocket_wrapper: also ignore AF_INET6 in swrap_setsockopt()
Stefan Metzmacher [Wed, 17 Feb 2010 08:43:00 +0000 (09:43 +0100)]
socket_wrapper: also ignore AF_INET6 in swrap_setsockopt()

metze
(cherry picked from commit 0b3e950731fe72a258a631e39ca1304d54663536)

14 years agos3-modules: fix get_acl_blob in the acl_tdb VFS module.
Günther Deschner [Thu, 18 Feb 2010 01:13:07 +0000 (02:13 +0100)]
s3-modules: fix get_acl_blob in the acl_tdb VFS module.

Shuttle-reviewed by jra :)

Guenther
(cherry picked from commit 6cf10cc1020dd7ef483887caebcbd76d28572432)

Fix bug #7148 (vfs_acl_tdb module uses uninitialized variable. Reading blob can
fail.)

14 years agoFix bug #6557 - Do not work VFS full_audit
Jeremy Allison [Wed, 17 Feb 2010 18:11:57 +0000 (10:11 -0800)]
Fix bug #6557 - Do not work VFS full_audit

Re-arrange the operations order so SMB_VFS_CONNECT is done
first as root (to allow modules to correctly initialize themselves).

Reviewed modules to check if they needed CONNECT invoked as
a user (which we previously did) and it turns out any of them
that cared needed root permissions anyway.

Jeremy.

14 years agos3: Fix bug 7139 owner of file not available with kerberos.
Volker Lendecke [Tue, 16 Feb 2010 22:29:48 +0000 (23:29 +0100)]
s3: Fix bug 7139 owner of file not available with kerberos.

To provide the user with the same SID when doing Kerberos logins, attempt to do
a make_server_info_sam instead of a make_server_info_pw.

14 years agoWHATSNEW: Update changes.
Karolin Seeger [Wed, 17 Feb 2010 13:51:03 +0000 (14:51 +0100)]
WHATSNEW: Update changes.

Karolin

14 years agocifs.upcall: allocate a talloc context for smb_krb5_unparse_name
Jeff Layton [Tue, 16 Feb 2010 14:16:42 +0000 (09:16 -0500)]
cifs.upcall: allocate a talloc context for smb_krb5_unparse_name

cifs.upcall calls smb_krb5_unparse_name with a NULL talloc context.
Older versions of this function though will conditionally use
SMB_REALLOC instead of TALLOC_REALLOC when a NULL context is passed
in. To make it more consistent, just spawn a talloc context that
we can pass into this function.

Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=565446
https://bugzilla.samba.org/show_bug.cgi?id=6868

Reported-by: Ludek Finstrle <luf@seznam.cz>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit a8cc2fa09ed43a167f62711bef363a5ac335dc78)

Fix bug #6868 (make bin/cifs.upcall fails).

14 years agos3-docs: Document 'smbclient -C'.
Volker Lendecke [Tue, 16 Feb 2010 10:00:08 +0000 (11:00 +0100)]
s3-docs: Document 'smbclient -C'.
(cherry picked from commit f6c39cec27eea2522c62e6f1ff85efdafde351ac)

14 years agos3/smbd: change locking behavior when "lock spin time = 0".
Steven Danneman [Fri, 12 Feb 2010 23:42:50 +0000 (15:42 -0800)]
s3/smbd: change locking behavior when "lock spin time = 0".

The "lock spin time" parameter mimics the following Windows
setting which by default is 250ms in Windows and 200ms in Samba.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\LockViolationDelay

When a client sends repeated, non-blocking, contending BRL requests
to a Windows server, after the first Windows starts treating these
requests as timed blocking locks with the above timeout.

As an efficiency, I've changed the behavior when this setting is 0,
to skip this logic and treat all requests as non-blocking locks.

This gives the smbd server behavior similar to the 3.0 release with
the do_spin_lock() implementation.

I've also changed the blocking lock parameter in the call from
push_blocking_lock_request() to true as all requests made in this
path are blocking by definition.
(cherry picked from commit cb0ea273696fc9024e6da18eb3e319024f8643f5)

Fix bug #7138 (Backport 'lock spin time" enhancement to 3.5.1).

14 years agoFix error in docs. Should be milliseconds, not microseconds.
Jeremy Allison [Sat, 13 Feb 2010 05:29:58 +0000 (21:29 -0800)]
Fix error in docs. Should be milliseconds, not microseconds.
(cherry picked from commit c7f16abc47a2d291d3da95b4c8e654010e36bc0f)