gd/samba/.git
16 years agoWork around iconv conversion failure from generated smb.conf.5 on Ubuntu 8.04.
Gerald (Jerry) Carter [Wed, 21 May 2008 17:54:43 +0000 (12:54 -0500)]
Work around iconv conversion failure from generated smb.conf.5 on Ubuntu 8.04.

Have no idea why the previous sequence of characters was causing
iconv to choke on my Ubuntu 8.04.  Reword the entry some
for clarity and to advoid this failure.
(cherry picked from commit b0b4bd2466658deacb1de3d58154bcc8d198d675)

16 years agoFix bug #5479, print spool shares require max_xmit to
Jeremy Allison [Wed, 21 May 2008 19:39:08 +0000 (12:39 -0700)]
Fix bug #5479, print spool shares require max_xmit to
be adhered to.
Jeremy.
(cherry picked from commit 03a1b791f1ce41f67bf134024bbc8d116b42ea48)

16 years agonetapi: fix returned name buffer in NetGetJoinInformation_r().
Günther Deschner [Tue, 29 Apr 2008 18:11:02 +0000 (20:11 +0200)]
netapi: fix returned name buffer in NetGetJoinInformation_r().

Guenther
(cherry picked from commit 0e8e05d556a7f84e500cca3fa858f9b4a9522a5f)

16 years agonetdomjoin-gui: before prompting for creds (for receiving joinable ous), find a dc.
Günther Deschner [Fri, 16 May 2008 10:11:43 +0000 (12:11 +0200)]
netdomjoin-gui: before prompting for creds (for receiving joinable ous), find a dc.

Guenther
(cherry picked from commit ae60695a349bccd1128e6c439664b0607627ef23)

16 years agonetdomjoin-gui: before prompting for creds, ask dsgetdcname for a dc.
Günther Deschner [Wed, 7 May 2008 23:07:10 +0000 (01:07 +0200)]
netdomjoin-gui: before prompting for creds, ask dsgetdcname for a dc.

Guenther
(cherry picked from commit 47146effc1c2bca516d4fbccf221b5b0e02737bf)

16 years agonet: Display net rpc trustdom usage from net rpc trustdom
Kai Blin [Wed, 21 May 2008 07:34:02 +0000 (09:34 +0200)]
net: Display net rpc trustdom usage from net rpc trustdom
(cherry picked from commit d923d3acdf2c47e8d1dff0951edabe37ba5078c0)

16 years agoFix typo.
Günther Deschner [Tue, 20 May 2008 15:48:39 +0000 (17:48 +0200)]
Fix typo.

Guenther
(cherry picked from commit d3dd7ea5a77414c0d802668ab5bfbe3487b66926)

16 years agoFix a valgrind error in _samr_LookupNames
Volker Lendecke [Tue, 20 May 2008 15:29:40 +0000 (17:29 +0200)]
Fix a valgrind error in _samr_LookupNames
(cherry picked from commit fb0a25d59ddd28ea1d5af33ec7d9f817fac3fb9d)

16 years agoConvert in_transaction to a bool. Add the same fix Volker
Jeremy Allison [Tue, 20 May 2008 21:18:58 +0000 (14:18 -0700)]
Convert in_transaction to a bool. Add the same fix Volker
used for tdb_traverse() to tdb_traverse_read().
Jeremy.
(cherry picked from commit a0e1d8ac4dd9121312fd66ecb2e2942513df5a4b)

16 years agoFix nesting tdb_traverse in a transaction
Volker Lendecke [Tue, 20 May 2008 19:54:36 +0000 (21:54 +0200)]
Fix nesting tdb_traverse in a transaction

Calling tdb_traverse inside a transaction led to the transaction lock being
held indefinitely. This was caused by the tdb_transaction_lock/unlock inside
tdb_traverse: The transaction code holds the global lock at offset
TRANSACTION_LOCK. The call to tdb_transaction_lock does nothing because the
transaction_lock is already being held. tdb_transaction_unlock inside tdb_wrap
resets tdb->have_transaction_lock but does not release the kernel-level fcntl
lock. transaction_commit later on does not release that fcntl lock either,
because tdb->have_transaction_lock was already reset by tdb_transaction().

This patch does fix that problem for me. An alternative would be to make
tdb->have_transaction_lock a counter that can cope with proper nesting, maybe
in other places as well.

Volker
(cherry picked from commit fd0b60a9e000f969cf99a8d670080cc7a52d97d8)

16 years agoFix bug #5477 - recvfile code was broken.
Jeremy Allison [Tue, 20 May 2008 19:10:01 +0000 (12:10 -0700)]
Fix bug #5477 - recvfile code was broken.
Jeremy.
(cherry picked from commit 47eb2e8fa858d9f12637eb9a10466271335f61aa)

16 years agoFix memcache_flush()
Volker Lendecke [Tue, 20 May 2008 16:35:23 +0000 (18:35 +0200)]
Fix memcache_flush()

I have no idea what I've been smoking when I checked this in :-(

Karolin, this fixes the join bug 3.0.28->3.2.0rc1

Please merge!

Thanks,

Volker
(cherry picked from commit 006e45fba01e05c664359e8104d495609d9555f7)

16 years agoEnable use of Relocations Read-Only, if supported, for enhanced security.
Simo Sorce [Fri, 7 Mar 2008 16:33:26 +0000 (11:33 -0500)]
Enable use of Relocations Read-Only, if supported, for enhanced security.
(cherry picked from commit c20c5f082162ff6c0c2931f456897334aa002e83)

16 years agoEnable winbind child processes to do something with signals,
Jim McDonough [Tue, 13 May 2008 20:57:01 +0000 (16:57 -0400)]
Enable winbind child processes to do something with signals,
in particular closing and reopening logs on SIGHUP.

Conflicts:

source/winbindd/winbindd.c
(cherry picked from commit 36c51951c6bca7d9b56b02cd6469e9c5a1c5147f)

16 years agoMake sure to zero the returned handle in _svcctl_CloseServiceHandle().
Günther Deschner [Thu, 27 Mar 2008 21:55:20 +0000 (22:55 +0100)]
Make sure to zero the returned handle in _svcctl_CloseServiceHandle().

Guenther
(cherry picked from commit 84a079af490cb135dd557091932ea079e1d7ff5b)

16 years agoman pages: Add documentation for new cluster parameters.
Karolin Seeger [Tue, 20 May 2008 09:03:33 +0000 (11:03 +0200)]
man pages: Add documentation for new cluster parameters.

Karolin
(cherry picked from commit 029875d8c9b2f9448f5299faaa3a48e8bccbca53)

16 years agoDeveloper's Guide: Fix typos.
Karolin Seeger [Sun, 4 May 2008 04:48:31 +0000 (06:48 +0200)]
Developer's Guide: Fix typos.

Karolin
(cherry picked from commit e206ffb8562c821735555c9b426d76e49986fefe)

16 years agorpcclient: Add tiny fix for cmd_samr_get_dispinfo_idx().
Günther Deschner [Wed, 23 Apr 2008 08:55:26 +0000 (10:55 +0200)]
rpcclient: Add tiny fix for cmd_samr_get_dispinfo_idx().

Guenther
(cherry picked from commit c15b5d73badafdc93066197aefaaaa72e37a8b99)

16 years agorpcclient: Add getdispinfoidx command.
Günther Deschner [Tue, 22 Apr 2008 21:11:53 +0000 (23:11 +0200)]
rpcclient: Add getdispinfoidx command.

Guenther
(cherry picked from commit 7d8461d080c92a83bd7a8d168fdf1fe98e8bec9a)

16 years agoFix a memleak in construct_printer_info_7()
Volker Lendecke [Tue, 6 May 2008 13:06:12 +0000 (15:06 +0200)]
Fix a memleak in construct_printer_info_7()

Also fix a "ignoring asprintf result" warning
(cherry picked from commit 64d21f39636019d6a17f84efc6fb9e61e67a235e)

16 years agoWHATSNEW: Update changes since 3.2.0pre3.
Karolin Seeger [Tue, 20 May 2008 06:51:15 +0000 (08:51 +0200)]
WHATSNEW: Update changes since 3.2.0pre3.

Karolin
(cherry picked from commit d9db027eae260ca53bfb1c687e0e86c97db94dfb)

16 years agoRestructuring of code to fix #5460. Remove search
Jeremy Allison [Mon, 19 May 2008 20:11:27 +0000 (13:11 -0700)]
Restructuring of code to fix #5460. Remove search
by name code from conn, we were already doing the
same check in the dfs_redirect() function, so move
it into parse_dfs_path() instead.
Jeremy.
(cherry picked from commit f1021e4c8d5ace6356c5b2106153288a6eb89a6b)

16 years agobuild: fix the build w/o ldap.
Günther Deschner [Tue, 6 May 2008 07:48:16 +0000 (09:48 +0200)]
build: fix the build w/o ldap.

Guenther
(cherry picked from commit a159ec5f1f3ec8e9232b8f3230a996a3f9986bc1)

16 years agoFix Bug #5461 and implement a very basic _samr_GetDisplayEnumerationIndex().
Günther Deschner [Fri, 16 May 2008 11:24:15 +0000 (13:24 +0200)]
Fix Bug #5461 and implement a very basic _samr_GetDisplayEnumerationIndex().

Citrix PM cannot use a Samba DC when having more then 900 groups as citrix
insists on calling _samr_GetDisplayEnumerationIndex() after receiving the first
900 groups via _samr_QueryDisplayInfo() to get the continuation index.

Guenther
(cherry picked from commit 1c4adc8dda68eae9839bdff843aadf8c98dd9e87)

16 years agoIDL: rerun make idl.
Günther Deschner [Tue, 22 Apr 2008 21:11:21 +0000 (23:11 +0200)]
IDL: rerun make idl.

Guenther
(cherry picked from commit c92b585cc42ba9f42727512c08c896ee40e5e319)

16 years agoIDL: Fix IDL for samr_GetDisplayEnumerationIndex{2}.
Günther Deschner [Tue, 22 Apr 2008 21:10:35 +0000 (23:10 +0200)]
IDL: Fix IDL for samr_GetDisplayEnumerationIndex{2}.

Guenther
(cherry picked from commit cb0b0fd2684b63257421aba599f9d2111c0438bf)

16 years agoVERSION: Raise version from pre3 to rc1.
Karolin Seeger [Mon, 19 May 2008 09:53:47 +0000 (11:53 +0200)]
VERSION: Raise version from pre3 to rc1.

Karolin
(cherry picked from commit ced04ac5af954d91223421c6c7d34e4fc3fb2947)

16 years agoWHATSNEW: Fix typo.
Karolin Seeger [Mon, 19 May 2008 08:30:15 +0000 (10:30 +0200)]
WHATSNEW: Fix typo.

ctdb socket -> ctdbd socket

Karolin
(cherry picked from commit f45e88b65951a35c9e50966fb158c571df910819)

16 years agoWHATSNEW: Add 'smb encrypt' to the list of new parameters.
Karolin Seeger [Fri, 16 May 2008 12:06:55 +0000 (14:06 +0200)]
WHATSNEW: Add 'smb encrypt' to the list of new parameters.

Karolin
(cherry picked from commit 31be11bbc373297c306b7aed1a7a35883e5e5136)

16 years agoWHATSNEW: Fix typo.
Karolin Seeger [Fri, 16 May 2008 07:29:42 +0000 (09:29 +0200)]
WHATSNEW: Fix typo.

mangle map -> mangled map

Karolin
(cherry picked from commit 5c260c9f66c5f5f558516a4f97bcfcb86059efa3)

16 years agoman pages: Remove man page for 'mangled map'.
Karolin Seeger [Fri, 16 May 2008 07:27:20 +0000 (09:27 +0200)]
man pages: Remove man page for 'mangled map'.

'mangled map' has been removed with dee8beba7a92b8a3f68bbcc59fd0a827f68c7736.

Karolin
(cherry picked from commit d9b4e500675a378daba50d12cd638a245aa78b72)

16 years agoFix client authentication with -P switch in client tools (Bug 5435).
Günther Deschner [Mon, 5 May 2008 14:58:24 +0000 (16:58 +0200)]
Fix client authentication with -P switch in client tools (Bug 5435).

Guenther
(cherry picked from commit d077ef64cd1d9bbaeb936566c2c70da508de829f)

16 years agoWHATSNEW: Remove trailing whitespace.
Karolin Seeger [Thu, 15 May 2008 08:38:33 +0000 (10:38 +0200)]
WHATSNEW: Remove trailing whitespace.

Karolin
(cherry picked from commit e02673dc0f59b1d6b0ff83ba23fcaa1373ca7a6f)

16 years agoWHATSNEW: Update changes since 3.2.0pre3.
Karolin Seeger [Thu, 15 May 2008 08:36:26 +0000 (10:36 +0200)]
WHATSNEW: Update changes since 3.2.0pre3.

Karolin
(cherry picked from commit bbad2b9758cff53679188ff5e4fc47db3cc51d65)

16 years agoFix Bug #5465 (joining with createcomputer=ou1/ou2/ou3).
Günther Deschner [Wed, 14 May 2008 21:50:25 +0000 (23:50 +0200)]
Fix Bug #5465 (joining with createcomputer=ou1/ou2/ou3).

Guenther
(cherry picked from commit f3251ba03a69c2fd0335861177159a32b2bc9477)
(cherry picked from commit 6d445c134d4d78f8261c998a5a83feaafb01bbca)

16 years agoEnsure we don't keep searching for sharename if it's
Jeremy Allison [Wed, 14 May 2008 21:09:02 +0000 (14:09 -0700)]
Ensure we don't keep searching for sharename if it's
not the start of the list.
Jeremy.
(cherry picked from commit 4d30a6bff9ce8e826f0109e99021d6683ec4299f)

16 years agoFix debug message.
Jeremy Allison [Tue, 13 May 2008 22:25:14 +0000 (15:25 -0700)]
Fix debug message.
Jeremy.
(cherry picked from commit 0a68f230cd92b97efed2b3bad19a3bf9a750d401)

16 years agoSecond part of patch for bug #5460. Cope with pathnames
Jeremy Allison [Tue, 13 May 2008 22:02:53 +0000 (15:02 -0700)]
Second part of patch for bug #5460. Cope with pathnames
that don't look like \xxx\yyy, cope with arbitrary length.
Jeremy.
(cherry picked from commit c3328a252430007cd716a406d85fd2a0bbbff607)

16 years agoFix bug #5460. The problem is RHEL5.0 shipped a CIFS client
Jeremy Allison [Tue, 13 May 2008 21:03:21 +0000 (14:03 -0700)]
Fix bug #5460. The problem is RHEL5.0 shipped a CIFS client
that sets the DFS bit on pathnames but doesn't
send DFS paths. This causes lookups to fail as
the smbd/msdfs.c code now just eats the first
two parts of the pathname and uses the rest as
the local path. The previous hostname check
used to protect us from that as we knew that
when the hostname was invalid it was a local
path (and a broken client).
I didn't want to put that check back in, but
came up with another idea - even though the
hostname can be a different one, the sharename
must be valid on this machine. So we can check
for a valid sharename instead.
Jeremy.
(cherry picked from commit 5c6ed7774220dea30c2c8a564648406b4f3eacbf)

16 years agoFix bug #5464. Pointed out by Herb @ Connectathon. In fork_domain_child() we call :
Jeremy Allison [Wed, 14 May 2008 21:11:26 +0000 (14:11 -0700)]
Fix bug #5464. Pointed out by Herb @ Connectathon. In fork_domain_child() we call :

CatchChild();

*before* we fork the domain child. This call establishes a signal handler that
eats SIGCLD signals and doesn't call sys_select_signal() as the main daemon
SIGCLD handler should do. This causes the parent to ignore dead children and
time out, instead of calling winbind_child_died() on receipt of the signal. The
correct fix is to move the CatchChild call into the child code after the fork.

Jeremy.
(cherry picked from commit 6da910cc1c6baccbb143f0b2d347e31e9f84c35b)

16 years agoWHATSNEW: Update changes since 3.2.0pre3.
Karolin Seeger [Wed, 14 May 2008 12:34:14 +0000 (14:34 +0200)]
WHATSNEW: Update changes since 3.2.0pre3.

Karolin
(cherry picked from commit c74663d23037067248820ad2d06eaf5125fc855a)

16 years ago_netr_LogonSamLogon: fix lm session key length.
Günther Deschner [Tue, 29 Apr 2008 18:13:22 +0000 (20:13 +0200)]
_netr_LogonSamLogon: fix lm session key length.

Thanks Volker for pointing this out.

Guenther
(cherry picked from commit 7ccca9a004c7a4794781cbd7c703c53a0481bd51)

16 years agoFix signing problem in the client with transs requests
Volker Lendecke [Tue, 13 May 2008 14:23:19 +0000 (16:23 +0200)]
Fix signing problem in the client with transs requests

This is a different fix than Jeremy put into 3-0-test with 040db1ce85 and other
branches with different hashes. Jeremy, I think your fix led to bug 5436, so I
reverted your fix. This fixes the original problem I found with the transs
requests for large rpc queries in a different way. Please check!

Thanks,

Volker
(cherry picked from commit 6200e8886b29469cb1dbbe441e4f642fb28b83f2)

16 years agoRevert "Fix signing bug found by Volker. That one was *subtle*."
Volker Lendecke [Tue, 13 May 2008 14:56:06 +0000 (16:56 +0200)]
Revert "Fix signing bug found by Volker. That one was *subtle*."

This reverts commit 816aea6c1a426eb2450061b847729e22bdac33a0.
(cherry picked from commit 67f90361a07841972a01a4faf575da25ebbbb29c)

16 years agoman pages: Correct version string.
Karolin Seeger [Tue, 13 May 2008 08:18:37 +0000 (10:18 +0200)]
man pages: Correct version string.

As Samba 3.2 will be out soon, man pages should be correct for both versions,
Samba 3.0 and 3.2.

Karolin
(cherry picked from commit 9c59c1895d8d3621f38b67ecf88109c81130c886)

16 years agoFix replacement getpass. If we ^C at the prompt echo was left off.
Jeremy Allison [Fri, 9 May 2008 21:54:06 +0000 (14:54 -0700)]
Fix replacement getpass. If we ^C at the prompt echo was left off.
Fix bug #5456. Karolin please pull for 3.2-stable.
Jeremy.
(cherry picked from commit 726d9d168d5b4bca86b478c34204eacb97907443)

16 years agonet ads: Upper case he realm name when calling kinit() using machine creds.
coffeedude [Mon, 12 May 2008 22:33:01 +0000 (17:33 -0500)]
net ads: Upper case he realm name when calling kinit() using machine creds.

Needed fix for the DNS Update option as part of "net ads join"
(cherry picked from commit aebae0b71b427838fdc6344d69d6dea87a5dd58b)
(cherry picked from commit 437a59598d886b316fd58ca88ed40f5fb325c47f)

16 years agoloadparm: Fix activation of registry globals in lp_load_*.
Michael Adam [Fri, 9 May 2008 22:13:11 +0000 (00:13 +0200)]
loadparm: Fix activation of registry globals in lp_load_*.

This completes bba04a8fba6fd5cf62578733cfdabea590e8ff51:
The reverted logic has to be put into the callers
lp_load() and lp_load_initial_only() of lp_load_ex(), too.
Silly bug.

Michael
(cherry picked from commit 8bab6d651f1cd0efe5aa1e7808b3f043602a3dfa)

16 years agoWHATSNEW: Update changes since 3.2.0pre3.
Karolin Seeger [Fri, 9 May 2008 09:59:55 +0000 (11:59 +0200)]
WHATSNEW: Update changes since 3.2.0pre3.

Karolin
(cherry picked from commit 6680d11fdc3bde96a98de88278529308303be7d8)

16 years agoWHATSNEW: Cleanup.
Karolin Seeger [Fri, 9 May 2008 08:46:16 +0000 (10:46 +0200)]
WHATSNEW: Cleanup.

I don't know why this line got lost...

16 years agoFix bug #5452 - smbclient put always creates zero length
Jeremy Allison [Fri, 9 May 2008 05:07:27 +0000 (22:07 -0700)]
Fix bug #5452 - smbclient put always creates zero length
files. Thanks to Kai Engert <kengert@redhat.com> for
reporting.
Karolin - this is a showstopper and must be pulled
into 3.2-stable. Thanks !
Jeremy.
(cherry picked from commit f7982f573dd2d339fea50c1811a42816c7721279)

16 years agoWinbind: Prevent cycle in children list when reaping dead child processes.
Gerald W. Carter [Wed, 30 Apr 2008 15:09:43 +0000 (10:09 -0500)]
Winbind: Prevent cycle in children list when reaping dead child processes.

Thanks to Glenn Curtis and Kyle Stemen @ Likewise.  Their explanation is:

    In winbindd_dual.c, there is a list of children processes that
    is maintained using macros DTLIST_ADD and DTLIST_REMOVE. In the
    case when a scheduled_async_request fails, the particular child
    was located in the list, and its attributes were cleared out
    and it was reused for a subsequent async request. The bug was that
    the new request would queue the same node into the doubly-linked
    list and would result in list->next pointing to the same node as
    list itself. This would set up an infinite loop in the processing of
    the for loop when the list of children was referenced.

    Solution was to fully remove the child node from the list, such that
    it could be inserted without risk of being inserted twice.

Note that the child is re-added to the list in fork_domain_child() again.
(cherry picked from commit b379b5b5d8a6daccc69aaf2be6d9a6e276e7dd78)
(cherry picked from commit 5a270bc99f52483f168d662d843672d05be74473)

16 years agoRemove redundant parameter fd from SMB_VFS_CLOSE().
Michael Adam [Fri, 11 Jan 2008 13:19:28 +0000 (14:19 +0100)]
Remove redundant parameter fd from SMB_VFS_CLOSE().

Now all those redundant fd's have vanished from the VFS API.

Michael
(cherry picked from commit 14294535512a7f191c5008e622b6708e417854ae)

16 years agoSlight reformatting of fd_close_posix(), while I'm at it.
Michael Adam [Fri, 11 Jan 2008 12:41:46 +0000 (13:41 +0100)]
Slight reformatting of fd_close_posix(), while I'm at it.

Wrap lines and remove trailing space.

Michael
(cherry picked from commit 74ed53a115b2063d4d5c8572af8f1302bc658882)

16 years agoChange fd_close_posix() to return int instead of NTSTATUS.
Michael Adam [Fri, 11 Jan 2008 12:28:28 +0000 (13:28 +0100)]
Change fd_close_posix() to return int instead of NTSTATUS.

The errno is handed up through the VFS layer to the callers.

Michael
(cherry picked from commit d928e6648d61cf2d3c1b77db440efb835b729a84)

16 years agoDon't modify the fsp in fd_close_posix() anymore.
Michael Adam [Fri, 11 Jan 2008 12:03:16 +0000 (13:03 +0100)]
Don't modify the fsp in fd_close_posix() anymore.

Now that it is inside the vfs layer, this function should
not alter the fsp (i.e. set fsp->fh->fd = -1) anymore.
That belongs above the vfs layer.

Michael
(cherry picked from commit df264bf3e00d7d77afcf55e54d2669b9ffa9af4a)

16 years agoMove the posix pending close functionality down into the VFS layer.
Michael Adam [Fri, 11 Jan 2008 11:18:33 +0000 (12:18 +0100)]
Move the posix pending close functionality down into the VFS layer.

This hides the pending close fds from the outside. Call order
of SMB_VFS_CLOSE is reversed. Originally, it was:

fd_close -> fd_close_posix -> SMB_VFS_CLOSE -> close

And now it is:

fd_close -> SMB_VFS_CLOSE -> fd_close_posix -> close

This is in preparation of removing the fd parameter
from the SMB_VFS_CLOSE function. But it is also the right
place for the pending close calls anyways.

Michael
(cherry picked from commit 3cf56b124a2886c6260455bba4bf77d08e9a4f77)

16 years agoNext round fixing bug 5420, build on IRIX
Volker Lendecke [Sun, 27 Apr 2008 10:16:23 +0000 (12:16 +0200)]
Next round fixing bug 5420, build on IRIX

The IRIX make does not like lines with only whitespace. With LIBNETAPI_LIBS
evaluating to nothing this happens there.
(cherry picked from commit 2883e554f45ca01dbfc205baa0b4149d2f2a01e8)

16 years agopam_winbind: Fix Bug #5430 (patch from fumiyas@osstech.co.jp).
Günther Deschner [Wed, 30 Apr 2008 16:23:26 +0000 (18:23 +0200)]
pam_winbind: Fix Bug #5430 (patch from fumiyas@osstech.co.jp).

Guenther
(cherry picked from commit 5b65df6245c1458ca21cc602df11c49aa97a25c5)
(cherry picked from commit 06f33d3725e0d82568c4a3278f59892e3e57a8ee)

16 years agoBUG 5107: Fix handling of large DNS replies on AIX and Solaris.
Gerald W. Carter [Wed, 30 Apr 2008 14:57:15 +0000 (09:57 -0500)]
BUG 5107: Fix handling of large DNS replies on AIX and Solaris.

On AIX, Solaris, and possibly some older glibc systems (e.g. SLES8)
truncated replies never give back a resp_len > buflen
which ends up causing DNS resolve failures on large tcp DNS replies.

Also add more debug lines about processing the DNS reply.
(cherry picked from commit 5ed9b92097460cd8180db806a08213e97cfb8daa)
(cherry picked from commit 5dff914f9ebcda63b9e3c78d6d0bb5a3212c6690)

16 years agoBUG 5429: Clarify log msgs re: failure to create BUILTIN\{Administrators,Users}
Gerald W. Carter [Wed, 30 Apr 2008 14:43:00 +0000 (09:43 -0500)]
BUG 5429: Clarify log msgs re: failure to create BUILTIN\{Administrators,Users}

Raise the debug msgs from Lvl 0 in the create_builtin_XX() functions
to prevent unnecessary panic from people reading the logs.
(cherry picked from commit 2983b9dc790e0f90ec1e6add131438c6bfd361b4)
(cherry picked from commit c28e21c63eca87a266078b65d65b436badc4e349)

16 years agoFix bug found by Igor Mammedov <niallain@gmail.com> where we are
Jeremy Allison [Mon, 28 Apr 2008 22:06:14 +0000 (15:06 -0700)]
Fix bug found by Igor Mammedov <niallain@gmail.com> where we are
not returning a directory value for a QPATHINFO on a msdfs link
with a non-dfs path. Windows does this.
Jeremy.
(cherry picked from commit 1b2f189e1f78a52a4d1e224bb5d20d77bb192d56)

16 years agoCleanup size_t return values in convert_string_allocate
Tim Prouty [Mon, 3 Mar 2008 21:32:54 +0000 (13:32 -0800)]
Cleanup size_t return values in convert_string_allocate

This patch is the first iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(cherry picked from commit 59124382d2894a1b194b48dd82bc5f956959eb48)

16 years agowins: fix null pointer crash in nss_wins module.
Günther Deschner [Tue, 6 May 2008 15:02:31 +0000 (17:02 +0200)]
wins: fix null pointer crash in nss_wins module.

Guenther
(cherry picked from commit 5bf47ebf0fb9f7d94ed36bce6bcaa31b508009bd)
(cherry picked from commit d4984ac18a907773134cc906c689655338d3949e)

16 years agonetapi: add -f switch for DsGetDCName() example and be more verbose on output.
Günther Deschner [Tue, 6 May 2008 15:09:44 +0000 (17:09 +0200)]
netapi: add -f switch for DsGetDCName() example and be more verbose on output.

Guenther
(cherry picked from commit 3feaa9829cc5bdeb7a5401c3c24b3811816396ce)
(cherry picked from commit 65d3822182a4a4d1c2970a40e708844ddc319e3d)

16 years agoFix bug #5095, "Manage Documents privilege is not functional".
Jeremy Allison [Tue, 6 May 2008 16:23:00 +0000 (09:23 -0700)]
Fix bug #5095, "Manage Documents privilege is not functional".
Should map the created sd to printer jobs, not printer.
Confirmed fix by the reporter. Karolin please pull for 3.2-stable.
Jeremy.
(cherry picked from commit f620182ac41eaf659cf53842df1089ce1f823654)

16 years agoFix a panic in the [ug]id2sid valgrind bug fix
Volker Lendecke [Tue, 6 May 2008 11:53:45 +0000 (13:53 +0200)]
Fix a panic in the [ug]id2sid valgrind bug fix

Always, always run "make test" before pushing stuff :-)
(cherry picked from commit 7fa2f4f9b2a17eb5a3ba787cc90b22afbe6c3c5c)

16 years agoFix a valgrind bug in the new [ug]id2sid cache
Volker Lendecke [Sat, 3 May 2008 00:41:10 +0000 (02:41 +0200)]
Fix a valgrind bug in the new [ug]id2sid cache

When we're given a SID, it is not always padded with zeros. Only look at the
initialized parts in the SID.
(cherry picked from commit 90c37a7c2cdac3de0b75f889d63f5fe1b87a48e3)

16 years agofix some extrasemi compile warnings
Björn Jacke [Wed, 9 Apr 2008 16:20:07 +0000 (18:20 +0200)]
fix some extrasemi compile warnings

(cherry picked from parts of cbdb79b7a1044945e515a294f487e4c1a9c91be5)

16 years agoFix a "nested extern declaration" warning
Volker Lendecke [Thu, 6 Mar 2008 11:44:41 +0000 (12:44 +0100)]
Fix a "nested extern declaration" warning
(cherry picked from commit e473e6d50c56f52ef5e4853e4ca3b3548af06f51)

16 years agoMake use of ZERO_STRUCT instead of memset in namequery.c
Volker Lendecke [Sat, 29 Mar 2008 16:20:15 +0000 (17:20 +0100)]
Make use of ZERO_STRUCT instead of memset in namequery.c
(cherry picked from commit 4f1d49615e1407b9c3ad5eeb50a248b8fee50e23)

16 years agodocs: fix indentation in expand-smbxonfdoc.
Michael Adam [Fri, 25 Apr 2008 12:01:57 +0000 (14:01 +0200)]
docs: fix indentation in expand-smbxonfdoc.

Michael
(cherry picked from commit 79f53a06820b226cbfbc939ae9a6d255e4a4a2d1)

16 years agoconfigure: fix a comment typo
Michael Adam [Mon, 21 Apr 2008 13:53:04 +0000 (15:53 +0200)]
configure: fix a comment typo

Michael
(cherry picked from commit af2a1f15e6d45139ba62e334a3529d407430e6bd)

16 years agoFix Coverity ID 565
Volker Lendecke [Wed, 5 Mar 2008 16:20:01 +0000 (17:20 +0100)]
Fix Coverity ID 565

This would crash safely
(cherry picked from commit 0f14357c86aee9a76ffbb45ea6419f4cc4106d62)

16 years agosrv_winreg: add a debug message to _winreg_CreateKey().
Michael Adam [Fri, 28 Mar 2008 14:39:52 +0000 (15:39 +0100)]
srv_winreg: add a debug message to _winreg_CreateKey().

Michael
(cherry picked from commit 971f6749ed23523f6eafe5136f6d4c920c20aec4)

16 years agosmbspool: Fix the smbspool build.
James Peach [Mon, 21 Apr 2008 18:19:22 +0000 (11:19 -0700)]
smbspool: Fix the smbspool build.
(cherry picked from commit a51cb3c1a9549d74c1e5cf05bc43b955af1a25b7)

16 years agosmbspool: minor formatting cleanups.
James Peach [Mon, 21 Apr 2008 17:57:09 +0000 (10:57 -0700)]
smbspool: minor formatting cleanups.
(cherry picked from commit 831a09ae25e98eacc0b0be5390d3ac3aa671a8a5)

16 years agosmbspool: Run indent to approximate conding standards.
James Peach [Mon, 21 Apr 2008 17:10:29 +0000 (10:10 -0700)]
smbspool: Run indent to approximate conding standards.
(cherry picked from commit 4244be792eeb69e883a1ece013b62fe6941086f2)

16 years agosmbspool: add my copyright.
James Peach [Mon, 21 Apr 2008 16:29:07 +0000 (09:29 -0700)]
smbspool: add my copyright.
(cherry picked from commit b294b2055a422e1af59e3b6843b84750b6786d99)

16 years agosmbspool: Fix CUPS authentication protocol support.
Mike Sweet [Mon, 21 Apr 2008 16:19:51 +0000 (09:19 -0700)]
smbspool: Fix CUPS authentication protocol support.

There were a couple of places where we weren't checking for
authentication correctly. This chance fixes those places and properly
supports Kerberos where available.
(cherry picked from commit 8eff35bc4acc13807c895af43b52db79ee195cb5)

16 years agosmbspool: fix Kerberos support for CUPS 1.3.
Mike Sweet [Mon, 21 Apr 2008 16:16:01 +0000 (09:16 -0700)]
smbspool: fix Kerberos support for CUPS 1.3.

To summarize the changes, the patches remove the old (probably non-
working) Kerberos support code which is unnecessary with CUPS 1.3
and adds some checks on the NT status we get back to see whether
the connection error is related to authentication.  If so, we send
the ATTR: message to tell CUPS we need a username and password and
return exit code 2 so cupsd will do the right thing.

AUTH_USERNAME, AUTH_PASSWORD, and KRB5CCNAME are set and supported
by CUPS 1.3.  The new exit code is supported by CUPS 1.2.x and 1.3,
and it treated as a general failure in CUPS 1.1.  The ATTR: message
is only supported by CUPS 1.3, while CUPS 1.2 will assume the
"username,password" value we are setting.

The current code only uses the AUTH_* env vars if they are set.
If not, we fall back to the previous behavior.

I really can't tell whether the Kerberos code that was in there
would work at all. It did not work for Mac OS X which is why
I dropped it.
(cherry picked from commit 8c12c5cea01d9b801fe80c2a87b8139c488a62a5)

16 years agoFix an uninitialized variable warning
Volker Lendecke [Thu, 20 Mar 2008 15:15:38 +0000 (16:15 +0100)]
Fix an uninitialized variable warning
(cherry picked from commit 4cc09ec40609484c973361a0cc0f05bfaef1738e)

16 years agoinit_srv_share_info_ctr: Add debug messages.
Michael Adam [Wed, 12 Mar 2008 01:10:35 +0000 (02:10 +0100)]
init_srv_share_info_ctr: Add debug messages.

Michael
(cherry picked from commit 8b2cc36ffcb3bccb760ec7cb0a22558eab56070d)

16 years agoStrip whitespace in ntsvcs rpc server.
Günther Deschner [Wed, 26 Mar 2008 10:45:28 +0000 (11:45 +0100)]
Strip whitespace in ntsvcs rpc server.

Guenther
(cherry picked from commit 0c7af8bc136f45484eab3c36b761046f88653b93)

16 years agoloadparm: reformat - fix whitespace/tab
Michael Adam [Sun, 20 Apr 2008 22:20:35 +0000 (00:20 +0200)]
loadparm: reformat - fix whitespace/tab

Michael
(cherry picked from commit 3acc0d84dc8f29b67ddaa1124224a93cb43b07ad)

16 years agoFix typo.
Günther Deschner [Wed, 26 Mar 2008 21:25:51 +0000 (22:25 +0100)]
Fix typo.

Guenther
(cherry picked from commit ffe77dc8b0476b7a5d81d63c3cf67f81033df12e)

16 years agosamlogoncache: Use data_blob_const in netsamlogon_cache_get.
Günther Deschner [Mon, 21 Apr 2008 08:25:28 +0000 (10:25 +0200)]
samlogoncache: Use data_blob_const in netsamlogon_cache_get.

Guenther
(cherry picked from commit f27a20f25c9b2038621a6394821bbedbf17daa73)

16 years agoRemove two pointless else branches
Volker Lendecke [Sun, 30 Mar 2008 20:08:17 +0000 (22:08 +0200)]
Remove two pointless else branches
(cherry picked from commit ed343114cd0844a7fd14b45f95c0f43a6d172a42)

16 years agoMissing HAVE_UPDWTMPX check before using updwtmpx().
Eric Cronin [Mon, 24 Mar 2008 19:33:04 +0000 (12:33 -0700)]
Missing HAVE_UPDWTMPX check before using updwtmpx().

In 10.5 Mac OS X added enough utmpx support to make it past the
first two preprocessor checks around line 390 of src/smbd/utmp.c
and on to the utmpx block which uses updwtmpx().  Unfortunately,
as ./configure correctly surmised, 10.5 doesn't have that.

https://bugzilla.samba.org/show_bug.cgi?id=5184
(cherry picked from commit f19d1e3d93d0d9dfe80372c6c5635f1047f9aa88)

16 years agoThe first of Martin Zielinski <mz@seh.de> Vista printing patches.
Jeremy Allison [Thu, 24 Apr 2008 21:04:47 +0000 (14:04 -0700)]
The first of Martin Zielinski <mz@seh.de> Vista printing patches.
Jerry will test and should get into 3.2 final (and the next 3.0.x
release).
Jeremy.
(cherry picked from commit 3fc1ab210b8772ee9f867499c0b1a7bb4bcdd285)

16 years agorpc_parse: fix "assignment discards qualifier" warning by using CONST_DISCARD.
Michael Adam [Sun, 20 Apr 2008 20:06:37 +0000 (22:06 +0200)]
rpc_parse: fix "assignment discards qualifier" warning by using CONST_DISCARD.

Michael
(cherry picked from commit 0de001a5446545b928eb88e1916b4fe674017424)

16 years agoFix an uninitialized variable
Volker Lendecke [Sat, 19 Apr 2008 15:04:46 +0000 (17:04 +0200)]
Fix an uninitialized variable
(cherry picked from commit 825f78d9f12b5b3e835bd91961e00402cab0bf60)

16 years agovfs_cacheprime: fix C++ warning - make implicit cast explicit
Michael Adam [Sun, 20 Apr 2008 19:49:01 +0000 (21:49 +0200)]
vfs_cacheprime: fix C++ warning - make implicit cast explicit

Michael
(cherry picked from commit 04d671b8c9bd5bf811e6dbd6981f1874eb49740c)

16 years agoerrors: add WERR_INVALID_DOMAINNAME.
Günther Deschner [Thu, 24 Apr 2008 20:19:23 +0000 (22:19 +0200)]
errors: add WERR_INVALID_DOMAINNAME.

Guenther
(cherry picked from commit b11a5e70d38239fb50ba4606656e2168cc398a12)

16 years agoUse more error-prone form of testing dm_destroy_session() return code after discussin...
Alexander Bokovoy [Mon, 14 Apr 2008 09:56:36 +0000 (13:56 +0400)]
Use more error-prone form of testing dm_destroy_session() return code after discussing with Tridge
(cherry picked from commit 4abdbad52e456764bca1b17ead04edee1e2a2a64)

16 years agoFix from Martin Zielinski <mz@seh.de>. Don't delete files when
Jeremy Allison [Thu, 24 Apr 2008 22:02:23 +0000 (15:02 -0700)]
Fix from Martin Zielinski <mz@seh.de>. Don't delete files when
they're in use by other drivers.
Jeremy.
(cherry picked from commit 205c352caeb32693a02fcfaeb3f18515719ac373)

16 years agoincrease log level for this failed setsockopt call. EINVAL is a normal error on Solar...
Björn Jacke [Mon, 7 Apr 2008 09:22:14 +0000 (11:22 +0200)]
increase log level for this failed setsockopt call. EINVAL is a normal error on Solaris when we do this on an already resetted connection.
(cherry picked from commit 42bc4ff7fd6bfc92bde015ae8f3a9fb62d443cd5)

16 years agoFix a memleak -- Coverity ID 222
Volker Lendecke [Wed, 5 Mar 2008 15:28:43 +0000 (16:28 +0100)]
Fix a memleak -- Coverity ID 222
(cherry picked from commit a40781bafa3a8f0c7737164bca6cf74b0a452e72)
(cherry picked from commit 86cabcad74ac06d888f2a352a2bef3abea1ed85c)

16 years agoFix some "ignoring asprintf result" warnings
Volker Lendecke [Wed, 2 Apr 2008 13:54:49 +0000 (15:54 +0200)]
Fix some "ignoring asprintf result" warnings
(cherry picked from commit 155d62ddfd3584d44a493c2aa1ea7f096bcff432)

16 years agoFill in WHATSNEW.txt for pre3.
Günther Deschner [Sat, 12 Apr 2008 16:26:37 +0000 (18:26 +0200)]
Fill in WHATSNEW.txt for pre3.

Guenther
(cherry picked from commit bf638d97d7668292ef9abf890eebc402645b8327)