obnox/samba-ctdb.git
16 years agomerge build changes from Mathias
Andrew Tridgell [Fri, 9 May 2008 11:35:08 +0000 (21:35 +1000)]
merge build changes from Mathias
(cherry picked from commit 2c08939f3db19eaaf31cb117e3d541d17a36da5e)

16 years agopackaging: remove references to smbmount and friends from samba-ctdb spec file
Michael Adam [Fri, 9 May 2008 23:28:58 +0000 (01:28 +0200)]
packaging: remove references to smbmount and friends from samba-ctdb spec file

Michael

16 years agopackaging: fix GPL version in samba-ctdb specfile.
Michael Adam [Fri, 9 May 2008 23:26:52 +0000 (01:26 +0200)]
packaging: fix GPL version in samba-ctdb specfile.

Michael

16 years agopackaging: rename RHEL4-CTDB --> RHEL-CTDB
Michael Adam [Fri, 9 May 2008 23:23:10 +0000 (01:23 +0200)]
packaging: rename RHEL4-CTDB --> RHEL-CTDB

Michael

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

16 years agoregistry: add removal of secdesc of a key to regdb_store_keys().
Michael Adam [Thu, 8 May 2008 16:08:41 +0000 (18:08 +0200)]
registry: add removal of secdesc of a key to regdb_store_keys().

Michael
(cherry picked from commit a01d8fe5e89ca9620d23198b11e5ae605a97e5a6)

16 years agoregistry: add comments to removing lists in regdb_store_keys().
Michael Adam [Thu, 8 May 2008 16:05:58 +0000 (18:05 +0200)]
registry: add comments to removing lists in regdb_store_keys().

Michael
(cherry picked from commit 3e89217e7edea5d7ec707de065d38b1921ed09af)

16 years agoregistry: change order of deleting value and subkey lists in store_keys().
Michael Adam [Thu, 8 May 2008 15:59:32 +0000 (17:59 +0200)]
registry: change order of deleting value and subkey lists in store_keys().

Next step in the plan to make store_keys safer without transactions.

Michael
(cherry picked from commit f7c8718dead63964481954a86427b8c05d15452c)

16 years agoregistry: adapt comment to first step in regdb_store_keys().
Michael Adam [Thu, 8 May 2008 14:55:14 +0000 (16:55 +0200)]
registry: adapt comment to first step in regdb_store_keys().

Michael
(cherry picked from commit 97592db08a109ffbea8c85b17686fa565c5cf8c9)

16 years agoregistry: adapt comment of last step in regdb_store_keys().
Michael Adam [Thu, 8 May 2008 14:32:51 +0000 (16:32 +0200)]
registry: adapt comment of last step in regdb_store_keys().

adding number (3) ....

Michael
(cherry picked from commit a03a17365d64f7fe83a9f2e866c4f069a1dd1682)

16 years agoregistry: regdb_store_keys: move storing the subkey list down after removing values.
Michael Adam [Thu, 8 May 2008 12:33:02 +0000 (14:33 +0200)]
registry: regdb_store_keys: move storing the subkey list down after removing values.

Michael
(cherry picked from commit 986030cdda828f7f87c5464d1837324b7033e27e)

16 years agoregistry: add comment explaining workflow to make store_keys safe w/o transactions
Michael Adam [Tue, 6 May 2008 08:06:34 +0000 (10:06 +0200)]
registry: add comment explaining workflow to make store_keys safe w/o transactions

/*
 * Make the store operation as safe as possible without transactions:
 *
 * (1) For each subkey removed from ctr compared with old_subkeys:
 *
 *     (a) First delete the value db entry.
 *
 *     (b) Next delete the secdesc db record.
 *
 *     (c) Then delete the subkey list entry.
 *
 * (2) Now write the list of subkeys of the parent key,
 *     deleting removed entries and adding new ones.
 *
 * (3) Finally create the subkey list entries for the added keys.
 *
 * This way if we crash half-way in between deleting the subkeys
 * and storing the parent's list of subkeys, no old data can pop up
 * out of the blue when re-adding keys later on.
 */

The workflow is going to be modified to meet this agendain the next commits.

Michael
(cherry picked from commit 55dd9bdd148fc942e15aacfe9f6b38b1a5c53158)

16 years agoregistry: check for existence of non base key in regdb_store_keys() before proceeding.
Michael Adam [Wed, 7 May 2008 12:01:49 +0000 (14:01 +0200)]
registry: check for existence of non base key in regdb_store_keys() before proceeding.

Michael
(cherry picked from commit 52413c94fcc56c4055de4d35bea8a00646352122)

16 years agoregistry: add a function regdb_key_is_base_key() to check whether is composite.
Michael Adam [Wed, 7 May 2008 22:34:35 +0000 (00:34 +0200)]
registry: add a function regdb_key_is_base_key() to check whether is composite.

This partly duplicates code from regdb_key_exists(). Maybe refactor later.

Michael
(cherry picked from commit c27d03bba842ecf99f23b22dc40fa7df33392fa0)

16 years agoregistry: check for existence of key in regdb_set_secdesc() before proceeding.
Michael Adam [Wed, 7 May 2008 11:50:01 +0000 (13:50 +0200)]
registry: check for existence of key in regdb_set_secdesc() before proceeding.

Michael
(cherry picked from commit 347bab7f4aca7f26a88affea954a514c25735abf)

16 years agoregistry: check for existence of key in regdb_get_secdesc() before proceeding.
Michael Adam [Wed, 7 May 2008 11:48:28 +0000 (13:48 +0200)]
registry: check for existence of key in regdb_get_secdesc() before proceeding.

Michael
(cherry picked from commit 727e5a87c0ed3e0a2b9c2b508b1f81e6a6d26732)

16 years agoregistry: check for existence of key in regdb_store_values() before proceeding.
Michael Adam [Wed, 7 May 2008 11:45:02 +0000 (13:45 +0200)]
registry: check for existence of key in regdb_store_values() before proceeding.

Michael
(cherry picked from commit 8a2c9d965d332ccd290089b92e9cfbba2413067c)

16 years agoregistry: check for existence of key in regdb_fetch_keys() before proceeding.
Michael Adam [Wed, 7 May 2008 11:42:48 +0000 (13:42 +0200)]
registry: check for existence of key in regdb_fetch_keys() before proceeding.

Michael
(cherry picked from commit cf653e101d1b2c38b5e9de35732421a120213170)

16 years agoregistry: check for existence of key in regdb_fetch_values() first.
Michael Adam [Wed, 7 May 2008 11:27:56 +0000 (13:27 +0200)]
registry: check for existence of key in regdb_fetch_values() first.

This uses the new semantics for existence of a key.

Michael
(cherry picked from commit 56a58690d3ab2e01ed28388bd59424d3abc7a0d3)

16 years agoregistry: free talloc context on error path in regdb_fetch_values().
Michael Adam [Wed, 7 May 2008 11:26:13 +0000 (13:26 +0200)]
registry: free talloc context on error path in regdb_fetch_values().

Michael
(cherry picked from commit 978aef3a862065be856b36b38d72d581c3ac0ba1)

16 years agoregistry: Implement new semantics for existence of registry key in tdb.
Michael Adam [Tue, 6 May 2008 08:05:20 +0000 (10:05 +0200)]
registry: Implement new semantics for existence of registry key in tdb.

Existence of a key is defined as follows:
* If the key is a base key (without separator), the key exists
  iff the corresponding entry exist in the registry tdb.
* If the key is not a base key, the key exists, iff it exists
  in the list of subkeys of it's parent keyname's tdb entry.

Michael
(cherry picked from commit 477008367f0ac90624b4b751955cd3235b2c9cc6)

16 years agoregistry: make normalize_reg_path() strip leading and trailing '/' chars.
Michael Adam [Tue, 6 May 2008 20:20:49 +0000 (22:20 +0200)]
registry: make normalize_reg_path() strip leading and trailing '/' chars.

Michael
(cherry picked from commit 04762cfcdba741afa457c96cd2f24e50cf83b15a)

16 years agoregistry: free temporary data in regdb_fetch_key_internal().
Michael Adam [Tue, 6 May 2008 15:15:50 +0000 (17:15 +0200)]
registry: free temporary data in regdb_fetch_key_internal().

Michael
(cherry picked from commit 2b25f480ba13ae125d081bab55ee3cbd3c4f425a)

16 years agoregistry: change order of arguments of regdb_fetch_key_internal()
Michael Adam [Tue, 6 May 2008 15:09:57 +0000 (17:09 +0200)]
registry: change order of arguments of regdb_fetch_key_internal()

list talloc context first.

Michael
(cherry picked from commit 23d7002b22ddcd2c52650463f31b72449aecaaaa)

16 years agoupdated spec files and build script
root [Fri, 9 May 2008 01:24:06 +0000 (11:24 +1000)]
updated spec files and build script

16 years agofixed version in spec file
Andrew Tridgell [Fri, 9 May 2008 01:21:16 +0000 (11:21 +1000)]
fixed version in spec file

16 years agomerge in spec file from Michael
Andrew Tridgell [Fri, 9 May 2008 00:06:03 +0000 (10:06 +1000)]
merge in spec file from Michael

16 years agoregistry: skip writes of existing keys in init_registry_data().
Michael Adam [Tue, 29 Apr 2008 15:41:03 +0000 (17:41 +0200)]
registry: skip writes of existing keys in init_registry_data().

Michael
(cherry picked from commit 37dabf931727f00569725af0e34677d36bb7df99)

16 years agoregistry: save writes in init_registry_data() if data does already exist.
Michael Adam [Tue, 29 Apr 2008 15:37:35 +0000 (17:37 +0200)]
registry: save writes in init_registry_data() if data does already exist.

This is done by first checking if all data (keys and values) exists
(using new regdb_key_exists()) and kompletely skipping all writes if it does.

Michael
(cherry picked from commit 7c5f1583cb43d473544f161aa9c864e1d78944e5)

16 years agoregistry: check for existence of key init_registry_key and possibly save a write.
Michael Adam [Tue, 29 Apr 2008 15:18:26 +0000 (17:18 +0200)]
registry: check for existence of key init_registry_key and possibly save a write.

Michael
(cherry picked from commit 3ab5a2f1b3cf37c380ff3e45a957e62a8017814a)

16 years agoregistry: add function regdb_key_exists() to check for existence of a key.
Michael Adam [Tue, 29 Apr 2008 15:17:02 +0000 (17:17 +0200)]
registry: add function regdb_key_exists() to check for existence of a key.

The existence of the registry key entry (and not the values entry!) is
taken as the criterion for existence.

Michael
(cherry picked from commit 207a0ece45d947608df3f764e6bd9b4525d41011)

16 years agoregistry: use regdb_fetch_key_internal() in regdb_fetch_values().
Michael Adam [Tue, 29 Apr 2008 15:11:09 +0000 (17:11 +0200)]
registry: use regdb_fetch_key_internal() in regdb_fetch_values().

Michael
(cherry picked from commit 3316541ac9f1441294405fdd98f0ffafdec8bc2f)

16 years agoregistry: use regdb_fetch_key_internal() in regdb_fetch_keys().
Michael Adam [Tue, 29 Apr 2008 15:09:10 +0000 (17:09 +0200)]
registry: use regdb_fetch_key_internal() in regdb_fetch_keys().

Michael
(cherry picked from commit 78f924ca05ecef9f586254c00908c1f12272c30c)

16 years agoregistry: add a function for fetching a tdb record for a given keystring
Michael Adam [Tue, 29 Apr 2008 15:04:41 +0000 (17:04 +0200)]
registry: add a function for fetching a tdb record for a given keystring

regdb_fetch_key_internal()

Michael
(cherry picked from commit 97bed9a23608248f1a590c99fe40564d2fbfa3cc)

16 years agoregistry: combine talloc_strdup() and normalize_reg_path() in regdb_fetch_keys().
Michael Adam [Tue, 29 Apr 2008 13:30:45 +0000 (15:30 +0200)]
registry: combine talloc_strdup() and normalize_reg_path() in regdb_fetch_keys().

the talloc_strdup() call is just and extra allocation here.

Michael
(cherry picked from commit 217233349b2d98d2506fcca47858373150e89924)

16 years agoregistry: use normalize_reg_path() in regdb_fetch_keys()
Michael Adam [Tue, 29 Apr 2008 13:28:47 +0000 (15:28 +0200)]
registry: use normalize_reg_path() in regdb_fetch_keys()

instead of handcrafting normalization.

Michael
(cherry picked from commit 1e4d2310d077c4d18470fd76f5ff9c010aadd3f0)

16 years agoregistry: use dbwrap_fetch_bystring() in regdb_fetch_values().
Michael Adam [Tue, 29 Apr 2008 13:17:54 +0000 (15:17 +0200)]
registry: use dbwrap_fetch_bystring() in regdb_fetch_values().

Michael
(cherry picked from commit 569f9844e9d35324cf9a3a3094cd9791918a1441)

16 years agoregistry: use dbwrap_fetch_bystring() in regdb_fetch_keys().
Michael Adam [Tue, 29 Apr 2008 13:16:10 +0000 (15:16 +0200)]
registry: use dbwrap_fetch_bystring() in regdb_fetch_keys().

instead of using regdb->fetch and constructing tdb data
from the registry key string by hand.

Michael
(cherry picked from commit 87a58140f0073dfb5b18fb43655b255aebafbd02)

16 years agoapply patch from v3-0-ctdb to special case root in libnss_winbind
Andrew Tridgell [Mon, 21 Apr 2008 16:41:32 +0000 (18:41 +0200)]
apply patch from v3-0-ctdb to special case root in libnss_winbind

This is needed to ensure the administrator can login to a node even
when ctdbd and winbindd are stuck

16 years agokeep compatibility with v3-0-ctdb name for fileid:mapping option
Andrew Tridgell [Mon, 21 Apr 2008 16:40:45 +0000 (18:40 +0200)]
keep compatibility with v3-0-ctdb name for fileid:mapping option

16 years agoupdate configure.rpm for clustered Samba usage
Andrew Tridgell [Mon, 21 Apr 2008 16:39:56 +0000 (18:39 +0200)]
update configure.rpm for clustered Samba usage

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)

16 years agoFix bug 5398
Volker Lendecke [Sat, 19 Apr 2008 11:08:14 +0000 (13:08 +0200)]
Fix bug 5398

Thanks to Jason Mader for sending the compiler output :-)

Volker
(cherry picked from commit 7a57c2da1a6cc0fcea0b4d949c696219f1822694)

16 years agoFix bug 5399
Volker Lendecke [Sat, 19 Apr 2008 14:54:26 +0000 (16:54 +0200)]
Fix bug 5399

Thanks to Jason Mader!

Volker
(cherry picked from commit 36740f4959194cfaa98b1e37eed08f22edbda1e4)

16 years agoAdd in a nice big comment explaining why SamLogonEx matters.
Andrew Bartlett [Mon, 21 Apr 2008 15:48:31 +0000 (17:48 +0200)]
Add in a nice big comment explaining why SamLogonEx matters.

Andrew Bartlett
(cherry picked from commit 87232351b5e66728f8d602259961909e8c1dfcb6)

16 years agowinbindd_cache: simplify logic in new key length check for UA keys.
Michael Adam [Wed, 23 Apr 2008 12:55:51 +0000 (14:55 +0200)]
winbindd_cache: simplify logic in new key length check for UA keys.

This reduces indentation by combining common code paths,
and wraps long lines.

Holger: sorry, I could not resist. I think it is much easier to
understand what is going on when we only have one check and
determine the max allowed key length in advance.

Michael
(cherry picked from commit e489f3d988feafe35b486b31a9e60c2399e6a6e7)

16 years agowinbindd_cache: recognize and allow longer UA keys
Holger Hetterich [Fri, 11 Apr 2008 12:02:19 +0000 (14:02 +0200)]
winbindd_cache: recognize and allow longer UA keys

UA keys consist of a potientally large number of concatenated SID strings which
can grow much larger than 1024 bytes in complex environments. We catch those keys
and allow them exclusivly to be larger.
(cherry picked from commit fcd35232e111f9b046ae35d939d08c29d0d43438)

16 years agoRemove hard coded sizes.
Jeremy Allison [Fri, 25 Apr 2008 15:29:08 +0000 (08:29 -0700)]
Remove hard coded sizes.
Jeremy.
(cherry picked from commit b9eec6e73fbcd0256d5cc507bb4434976d7133a0)

16 years agoFix bug 5400
Volker Lendecke [Sat, 19 Apr 2008 14:56:44 +0000 (16:56 +0200)]
Fix bug 5400

Thanks to Jason Mader!

Volker
(cherry picked from commit 87d8a63ce4e6dd91ea3193d0a2574520a5857be2)