ira/wip.git
16 years agor23512: Fix conflict in #define for SECDESC_PREFIX. Ensure all
Jeremy Allison [Fri, 15 Jun 2007 23:47:40 +0000 (23:47 +0000)]
r23512: Fix conflict in #define for SECDESC_PREFIX. Ensure all
reg #defines use "REG_" prefix. Michael - please check
gcc warnings on compiles.
Jeremy.
(This used to be commit 7885b68bb5df0ebe290feca0e74b4a20ef59e718)

16 years agor23510: Tidy calls to smb_panic by removing trailing newlines. Print the
James Peach [Fri, 15 Jun 2007 21:58:49 +0000 (21:58 +0000)]
r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
(This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)

16 years agor23509: This activates the global options from the registry in loadparm.
Michael Adam [Fri, 15 Jun 2007 21:38:10 +0000 (21:38 +0000)]
r23509: This activates the global options from the registry in loadparm.
The global options are stored as values in the subkey "global"
of the SMBCONF registry key.

The activation is accomplished in smb.conf though a new special
semantic of the "include" parameter: "include = registry" triggers
the processing of the registry global options exactly at the
position of the include statement. Options read from the registry
take the same precedence as parameters loaded from a file via
include. Need to reload the registry globals is detected by
watching the tdb sequence number.

Registry shares are automatically activated when the registry
globals are processed.

So a "registry only" configuration can be realized by an
smb.conf that looks as follows:

================================
[global]
include = registry
================================

The global options and registry shares can be conveniently
edited with the "net conf" utility.

Caveat:

A possible pitfall consists in using "include = registry"
together with the "lock directory" directive in the registry.
This problem will be addressed in the next time.

Note on the code:

Processing of the registry options is accomplished by a function
process_registry_globals() in loadparm.c The current version is
only an interim solution: It is handcoded instead of using the
infrastructure of reg_api.c. The reason for this is that using
reg_api still has too large linker dependencies, bloating virtually
all targets by PASSDB_OBJ, SMBLDAP_OBJ, GROUPDB_OBJ and LDB stuff.
A version of process_registry_globals that uses reg_api is
included but commented out. The goal is to eventually refactor
and restructure the registry code so that one can use the reg_api
to access only the registry tdb and not link all the dynamic
backends with all their linking implications.
(This used to be commit 24b0cbcb3741dd14b04728448a85cc04a057e7d0)

16 years agor23508: Fix sync_file() to return NTSTATUS and return this
Jeremy Allison [Fri, 15 Jun 2007 19:24:04 +0000 (19:24 +0000)]
r23508: Fix sync_file() to return NTSTATUS and return this
on failure in the write path.
Jeremy.
(This used to be commit cd3f7dbee809fb40194af0e7509142166e02b252)

16 years agor23507: Split one general function normalize_dbkey from reg_db.c into util_reg.c
Michael Adam [Fri, 15 Jun 2007 15:51:45 +0000 (15:51 +0000)]
r23507: Split one general function normalize_dbkey from reg_db.c into util_reg.c
(To be used in other place in subsequent commit.)

Michael
(This used to be commit 6fd71140499e30b8fd0f083301512db7b8c2f236)

16 years agor23504: Use tdb_wrap_open (instead of usual tdb_open) in reg_db.
Michael Adam [Fri, 15 Jun 2007 10:40:36 +0000 (10:40 +0000)]
r23504: Use tdb_wrap_open (instead of usual tdb_open) in reg_db.
This eliminates the need of maintaining reg_db's own
reference counter for the tdb. Maybe as a next step...

Michael
(This used to be commit 31d64767fc8a73be1f6b81e2712d687897f812a0)

16 years agor23502: Restore exit-on-idle. Small refactoring for clarity. Exit if
James Peach [Thu, 14 Jun 2007 18:48:51 +0000 (18:48 +0000)]
r23502:     Restore exit-on-idle.  Small refactoring for clarity. Exit if
    we are idle and we timed out waiting for something to do.
(This used to be commit b4ab1a0cd992cf9e966b8edb9796d1eae53db744)

16 years agor23501: Move notify_rename before rename_internals_fsp and call it from there.
Volker Lendecke [Thu, 14 Jun 2007 15:50:47 +0000 (15:50 +0000)]
r23501: Move notify_rename before rename_internals_fsp and call it from there.
(This used to be commit 8d3828871c561cd05e6461e157db4c0ccddd5f22)

16 years agor23500: Two changes to survive the now activated test for rename_internals_fsp:
Volker Lendecke [Thu, 14 Jun 2007 14:45:37 +0000 (14:45 +0000)]
r23500: Two changes to survive the now activated test for rename_internals_fsp:
With the target being open we have to return NT_STATUS_ACCESS_DENIED and
root_fid != 0 leads to NT_STATUS_INVALID_PARAMETER
(This used to be commit b599e5b1e10bdf825b2ce53de4a6ec35726d00f6)

16 years agor23497: Disable building of libaddns (no defined API) and
Gerald Carter [Thu, 14 Jun 2007 14:35:29 +0000 (14:35 +0000)]
r23497: Disable building of libaddns (no defined API) and
libmsrpc (unmaintained).
(This used to be commit 13d78ace49d0f7c5330c5297ef563284f573239a)

16 years agor23496: Fix logic error in getgrnam_recv() that broke
Gerald Carter [Thu, 14 Jun 2007 14:12:53 +0000 (14:12 +0000)]
r23496: Fix logic error in getgrnam_recv() that broke
getgrnam() for machine and domain local groups.
(This used to be commit 4d4c1eca30ce57b4072e9f8c59fcc49bf3a5c48e)

16 years agor23495: Replace literal occurrences of libsmb/errormap.o by $(ERRORMAP_OBJ).
Michael Adam [Thu, 14 Jun 2007 13:26:31 +0000 (13:26 +0000)]
r23495: Replace literal occurrences of libsmb/errormap.o by $(ERRORMAP_OBJ).
(This used to be commit 2041c35a305e0d6ee015b54fb17fe416dc14a8bc)

16 years agor23494: Synchronize some occurrences of BINARY_PREREQS and bin/.dummy.
Michael Adam [Thu, 14 Jun 2007 13:12:32 +0000 (13:12 +0000)]
r23494: Synchronize some occurrences of BINARY_PREREQS and bin/.dummy.
Further reduce the diff between 3_0 and 3_0_26 by some reformatting
and rearrangements.

Michael
(This used to be commit 02685358d104775e6b8cad156aa70458ab3a55f6)

16 years agor23489: (Re-)Add tdbtorture as a build target to 3_0_26.
Michael Adam [Thu, 14 Jun 2007 12:29:04 +0000 (12:29 +0000)]
r23489: (Re-)Add tdbtorture as a build target to 3_0_26.
Add the tdbtorture test to the test script in 3_0 and 3_0_26.

Michael
(This used to be commit 30d71cf4b8decd6fad0c44a3eb57e29ea7d898a0)

16 years agor23486: Ok, this time with a hopefully successful make test in the right place:
Volker Lendecke [Thu, 14 Jun 2007 12:03:46 +0000 (12:03 +0000)]
r23486: Ok, this time with a hopefully successful make test in the right place:
Remove two local variables
(This used to be commit 575e594e936c3cb197945063309f0b424dcdefc8)

16 years agor23485: This checkin consists mostly of refactorings in preparation of the
Michael Adam [Thu, 14 Jun 2007 11:29:35 +0000 (11:29 +0000)]
r23485: This checkin consists mostly of refactorings in preparation of the
activation of global registry options in loadparm.c, mainly to
extract functionality from net_conf.c to be made availabel elsewhere
and to minimize linker dependencies.

In detail:

* move functions registry_push/pull_value from lib/util_reg.c to new file
  lib/util_reg_api.c

* create a fake user token consisting of builtin administrators sid and
  se_disk_operators privilege by hand instead of using get_root_nt_token()
  to minimize linker deps for bin/net.

  + new function registry_create_admin_token() in new lib/util_reg_smbconf.c
  + move dup_nt_token from auth/token_util.c to new file lib/util_nttoken.c
  + adapt net_conf.c and Makefile.in accordingly.

* split lib/profiles.c into two parts: new file lib/profiles_basic.c
  takes all the low level mask manipulation and format conversion functions
  (se_priv, privset, luid). the privs array is completely hidden from
  profiles.c by adding some access-functions. some mask-functions are not
  static anymore.

  Generally, SID- and LUID-related stuff that has more dependencies
  is kept in lib/profiles.c

* Move initialization of regdb from net_conf.c into a function
  registry_init_regdb() in lib/util_reg_smbconf.c.

Michael
(This used to be commit efd3e2bfb756ac5c4df7984791c67e7ae20a582e)

16 years agor23484: When chasing AD referrals make sure to honor the base returned from the server.
Günther Deschner [Thu, 14 Jun 2007 09:59:07 +0000 (09:59 +0000)]
r23484: When chasing AD referrals make sure to honor the base returned from the server.

Guenther
(This used to be commit 865bdcacae49299c19d7000242832fa41fdfa9d2)

16 years agor23483: Revert 23482, I must have run 'make test' in the wrong subdir.
Volker Lendecke [Thu, 14 Jun 2007 09:51:13 +0000 (09:51 +0000)]
r23483: Revert 23482, I must have run 'make test' in the wrong subdir.
(This used to be commit 1ce0c582bccc90e54a69b1e70973ed7ccb47cbbb)

16 years agor23482: Slightly simplify the rename code: Remove two local variables that are
Volker Lendecke [Thu, 14 Jun 2007 09:45:39 +0000 (09:45 +0000)]
r23482: Slightly simplify the rename code: Remove two local variables that are
not really needed.
(This used to be commit e068e38ef3b364f2c6477f9d8d6ef3b81a6207ca)

16 years agor23480: Fix DEVELOPER_CFLAGS quoting.
James Peach [Thu, 14 Jun 2007 04:00:35 +0000 (04:00 +0000)]
r23480: Fix DEVELOPER_CFLAGS quoting.
(This used to be commit 4cdc7eaac78f04f19f1ed738fd918862bd2f7d4c)

16 years agor23478: Change the handling of the developer CFLAGS so that they are always
James Peach [Thu, 14 Jun 2007 03:38:43 +0000 (03:38 +0000)]
r23478: Change the handling of the developer CFLAGS so that they are always

emited to the Makefile in the DEVELOPER_CFLAGS variable. This makes
it easy to turn developer mode on and off without waiting for
configure to run. The developer flags are only added to CFLAGS for
the --enable-developer and --enable-krb5developer cases.
(This used to be commit 4b392a76eb392375f369c8c64fccd138833dcb52)

16 years agor23477: Build farm fix: Use int rather than MIT's krb5_int32 when setting context...
Gerald Carter [Wed, 13 Jun 2007 21:59:39 +0000 (21:59 +0000)]
r23477: Build farm fix: Use int rather than MIT's krb5_int32 when setting context flags.
(This used to be commit 903145e957cd05b219fdf7d5fc1e35430938a24e)

16 years agor23475: Fix the prototype for sys_broken_setgroups and log *BSD group list
James Peach [Wed, 13 Jun 2007 21:42:31 +0000 (21:42 +0000)]
r23475: Fix the prototype for sys_broken_setgroups and log *BSD group list
truncation a bit more verbosely.
(This used to be commit e3ea997289f9f2613c304c016b42b2d35af48c84)

16 years agor23474: Here's a small patch that disables the libkrb5.so replay cache
Gerald Carter [Wed, 13 Jun 2007 20:49:20 +0000 (20:49 +0000)]
r23474: Here's a small patch that disables the libkrb5.so replay cache
when verifying a ticket from winbindd_pam.c.

I've found during multiple, fast, automated SSH logins (such
as from a cron script) that the replay cache in MIT's krb5
lib will occasionally fail the krb5_rd_req() as a replay attack.

There seems to be a small window during which the MIT krb5
libs could reproduce identical time stamps for ctime and cusec
in the authenticator since Unix systems only give back
milli-seconds rather than the micro-seconds needed by the
authenticator.  Checked against MIT 1.5.1.  Have not
researched how Heimdal does it.

My thinking is that if someone can spoof the KDC and TDS
services we are pretty hopeless anyways.
(This used to be commit cbd33da9f78373e29729325bbab1ae9040712b11)

16 years agor23472: add missing default setting for 'winbind nss info' (merge from 3.0.26)
Gerald Carter [Wed, 13 Jun 2007 20:43:49 +0000 (20:43 +0000)]
r23472: add missing default setting for 'winbind nss info' (merge from  3.0.26)
(This used to be commit 1f80f9d14553650fb9d24f1d4c36e5cf7986ce23)

16 years agor23471: Here's a rough patch for expanding domain group membership
Gerald Carter [Wed, 13 Jun 2007 20:40:54 +0000 (20:40 +0000)]
r23471: Here's a rough patch for expanding domain group membership
in the winbindd_getgrnam() call.  Couple of comments:

* Adds "winbind expand groups" parameter which defines the
  max depth winbindd will expand group members.  The default
  is the current behavior of one level of expansion.
* The entire getrgnam() interface should be async.  I
  haven't done that.
* Refactors the domain users hack in fill_grent_mem() into
  its own function.
(This used to be commit 3d3a8130351753dc5caa2a270d130e2150da6b54)

16 years agor23470: Fix supplementary group list truncation for *BSD. We need to pass
James Peach [Wed, 13 Jun 2007 20:40:50 +0000 (20:40 +0000)]
r23470: Fix supplementary group list truncation for *BSD. We need to pass
the correct group list length and only truncate to NGROUPS_MAX if
it is too long.
(This used to be commit 07f562be7a64a2ded7ec0e6f5910447dc5b8b85f)

16 years agor23469: Fix a comment
Volker Lendecke [Wed, 13 Jun 2007 19:01:41 +0000 (19:01 +0000)]
r23469: Fix a comment
(This used to be commit 47cc9359aa1b4d5fcd9469be0b1378030ac388fc)

16 years agor23468: Open registry.tdb with sequence number.
Michael Adam [Wed, 13 Jun 2007 13:15:16 +0000 (13:15 +0000)]
r23468: Open registry.tdb with sequence number.
Add a function to retrieve the registry db sequence number.

This is in preparation of loadparm integration of registry global
smb.conf options: this will allow to detect changes in order to trigger reload.

Michael
(This used to be commit ebe2ea8f22bfe0855beee087af771c690db443c1)

16 years agor23467: Next little simplification: In rename_internals it's a bit pointless to
Volker Lendecke [Wed, 13 Jun 2007 12:52:36 +0000 (12:52 +0000)]
r23467: Next little simplification: In rename_internals it's a bit pointless to
first ask for existence of a file when we do the open_file_ntcreate in
can_rename later on anyway. That also gets us the right error message in
case the file is not there automatically.
(This used to be commit f3d582cb908f95c1b557bda5d41b5a8aff75b124)

16 years agor23466: Fix RAW-NOTIFY: by using delete on close the notify is triggered deep
Volker Lendecke [Wed, 13 Jun 2007 11:32:46 +0000 (11:32 +0000)]
r23466: Fix RAW-NOTIFY: by using delete on close the notify is triggered deep
inside close_file() already.
(This used to be commit 0b29e3ad0f2b1759eb195fb37f1f8667d87f5670)

16 years agor23465: There was this diff between reg_printing in 3_0 and 3_0_26:
Michael Adam [Wed, 13 Jun 2007 11:04:31 +0000 (11:04 +0000)]
r23465: There was this diff between reg_printing in 3_0 and 3_0_26:
before writing to secdesc_buf->sd,
3_0 checked secdesc_buf->sd while 3_0_26 checked secdesc_buf->sd_size.

This patch makes both revisions check _both_ befor writing.

Jerry / Jeremy : please check if this is correct!

Michael
(This used to be commit dfc42178708144ef0b9273438ee15451078d3f4e)

16 years agor23460: Re-add whitespace to reduce diff between branches.
Michael Adam [Wed, 13 Jun 2007 10:12:33 +0000 (10:12 +0000)]
r23460: Re-add whitespace to reduce diff between branches.
Sorry for the noise...

Michael
(This used to be commit c7d004dec4822c0d8e5c7fd6519850f906c7bb1a)

16 years agor23459: Remove one superfluous cast.
Michael Adam [Wed, 13 Jun 2007 10:07:05 +0000 (10:07 +0000)]
r23459: Remove one superfluous cast.
(This used to be commit beed87550786052891969f6014088c17a5d77157)

16 years agor23458: Cosmetic fix in debug output.
Michael Adam [Wed, 13 Jun 2007 10:06:17 +0000 (10:06 +0000)]
r23458: Cosmetic fix in debug output.
(This used to be commit 03dbdb561a16a6e3dbd99ee29aac598457873002)

16 years agor23457: After Jeremy's ack:
Volker Lendecke [Wed, 13 Jun 2007 09:55:13 +0000 (09:55 +0000)]
r23457: After Jeremy's ack:

The attached patch removes a little race condition for
people with real kernel oplock support, and reduces some
code paths. It changes reply_unlink to open_file_ntcreate,
set_delete_on_close and close_file.

The race condition happens if we break the oplock in
can_delete via open_file_ntcreate, we close the file,
someone else gets a batch oplock and we try to unlink.

It reduces code paths by calling SMB_VFS_UNLINK in 2 fewer
places.
(This used to be commit 0342ce7057045a362134281bcc7030111276dea0)

16 years agor23450: max_params_return is complete fiction when getting a changenotify
Jeremy Allison [Tue, 12 Jun 2007 19:59:38 +0000 (19:59 +0000)]
r23450: max_params_return is complete fiction when getting a changenotify
request. Ignore it. Should fix bug #4689 but more tests and
valgrinding will follow.
Jeremy.
(This used to be commit c23e08cc09b8de860ab9c7ac9d0e7c2502dfccd9)

16 years agor23448: Doh ! Don't call winbind_child_died() *before* the
Jeremy Allison [Tue, 12 Jun 2007 19:53:51 +0000 (19:53 +0000)]
r23448: Doh ! Don't call winbind_child_died() *before* the
kill call as that sets pid = 0 ! :-).
Jeremy.
(This used to be commit bcfce39094ef30a1d1ae4dba5a90738e2678bcbf)

16 years agor23447: Add kill signal to child dead path. After talking
Jeremy Allison [Tue, 12 Jun 2007 19:47:33 +0000 (19:47 +0000)]
r23447: Add kill signal to child dead path. After talking
to Jerry add to 3.0.25b.
Jeremy.
(This used to be commit ade91e78cbe2871d3a8df18fa1f92bc16a7600a8)

16 years agor23446: Restore Jeremy's original formatting, just fix the comment.
Volker Lendecke [Tue, 12 Jun 2007 19:19:35 +0000 (19:19 +0000)]
r23446: Restore Jeremy's original formatting, just fix the comment.
(This used to be commit 5b983957e3a0a05f77bfb8a10a7986c22b81088d)

16 years agor23445: Fix suggested by Volker. Don't call rename_open_files
Jeremy Allison [Tue, 12 Jun 2007 18:14:16 +0000 (18:14 +0000)]
r23445: Fix suggested by Volker. Don't call rename_open_files
if the name wasn't changed.
Jeremy.
(This used to be commit 7a9629365eb4eb2829982fe2b2bfffd840648e6f)

16 years agor23434: Coorect a comment.
Michael Adam [Tue, 12 Jun 2007 12:35:24 +0000 (12:35 +0000)]
r23434: Coorect a comment.
(This used to be commit c9f38fa30e9b784a56f08d0ab4765e9c7a42aa7d)

16 years agor23433: remove superfluous semicolon.
Michael Adam [Tue, 12 Jun 2007 12:01:52 +0000 (12:01 +0000)]
r23433: remove superfluous semicolon.
(This used to be commit b8269f454338c8b20b90451f3866fc193871e9af)

16 years agor23432: Remove superfluous comment.
Michael Adam [Tue, 12 Jun 2007 11:54:25 +0000 (11:54 +0000)]
r23432: Remove superfluous comment.
(A relict from regkey_open_internal days.)

Michael
(This used to be commit 4025cbc2024acf36e96d7236225b439dbd3e4df0)

16 years agor23429: Ooops, sorry.
Volker Lendecke [Tue, 12 Jun 2007 10:18:26 +0000 (10:18 +0000)]
r23429: Ooops, sorry.

Revert an accidential checkin of r23410.

Volker
(This used to be commit 23ecb5439f509f8f1eef6dded74357af5760094f)

16 years agor23426: Correct a comment. The default timeout is not 1min, but 30s. While
Volker Lendecke [Tue, 12 Jun 2007 08:02:32 +0000 (08:02 +0000)]
r23426: Correct a comment. The default timeout is not 1min, but 30s. While
there, do some reformatting.

Jeremy, I think we should also kill the child. It might hang in
something (an fcntl lock for example) that the next child might run into
immediately again.
(This used to be commit 6729a4df4b57f638161ec55f9b1edd0bc8bb947e)

16 years agor23425: Volker noticed this obvious fix for the wins server
Jeremy Allison [Tue, 12 Jun 2007 01:45:40 +0000 (01:45 +0000)]
r23425: Volker noticed this obvious fix for the wins server
code :-). Thanks Volker !
Jeremy.
(This used to be commit e3f33a2a503ada232aa1165e2321822584a026bd)

16 years agor23424: Thanks to Jerry, we finally tracked down the :
Jeremy Allison [Mon, 11 Jun 2007 22:28:27 +0000 (22:28 +0000)]
r23424: Thanks to Jerry, we finally tracked down the :
winbindd: Exceeding 200 client connections, no idle connection found"
bug #3204. This fixes it in Jerry's testing !
Jeremy.
(This used to be commit 0c7ce6a68286fa98258828545fc869aaac19a028)

16 years agor23423: Use the correct structure types in the NT_ACL operations. It's not
James Peach [Mon, 11 Jun 2007 20:56:17 +0000 (20:56 +0000)]
r23423: Use the correct structure types in the NT_ACL operations. It's not
clear to my why the catia module feels it's necessary to implement
these operations, but at least they're now the right type.
(This used to be commit b5be0c7403195d2bd503fb1512cb46e65587adc4)

16 years agor23411: We were missing displayName and that was preventing us
Simo Sorce [Mon, 11 Jun 2007 00:05:48 +0000 (00:05 +0000)]
r23411: We were missing displayName and that was preventing us
from successfully deleting an entry when "account" is
the STRUCTURAL objectclass used for users and machines.
"account" is used each time the user entry is in /etc/passwd
and we have only the samba attributes in ldap, as well
as for rfc2307(bis) standard based directories.
(This used to be commit e6399f1aa1c98d2d6e700245bb95c84f7e173236)

16 years agor23410: Merge the core of the cluster code.
Volker Lendecke [Sun, 10 Jun 2007 17:02:09 +0000 (17:02 +0000)]
r23410: Merge the core of the cluster code.

I'm 100% certain I've forgotten to merge something, but the main code
should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and
messages_ctdbd.c.

There should be no changes to the non-cluster case, it does survive make
test on my laptop.

It survives some very basic tests with ctdbd enables, I did not do the
full test suite for clusters yet.

Phew...

Volker
(This used to be commit 15553d6327a3aecdd2b0b94a3656d04bf4106323)

16 years agor23408: Remove a bogus comment
Volker Lendecke [Sun, 10 Jun 2007 10:18:03 +0000 (10:18 +0000)]
r23408: Remove a bogus comment
(This used to be commit 0442e680eeacb56852e200fdf6f78e4972ecad68)

16 years agor23407: While verifying a bug I found out that for some reason
Simo Sorce [Sat, 9 Jun 2007 22:45:21 +0000 (22:45 +0000)]
r23407: While verifying a bug I found out that for some reason
the code to add a machine was different then the one used
to add a user, the old code led to the machine SID not being
built out correctly allocationg a new RID out of the passdb
but instead by using the old algorithmic method.
This may easily end up in creating duplicated SID when the
RID counter get close to the values built by the algorithmic method.

Simo.
(This used to be commit e077142aa39ad927a16e0d04874857bbc171ce07)

16 years agor23406: Evn if not strictly currently necessary do check for correct
Simo Sorce [Sat, 9 Jun 2007 19:29:35 +0000 (19:29 +0000)]
r23406: Evn if not strictly currently necessary do check for correct
init also in idmap_nss and idmap_passdb for coherency and to
prevent errors in future if we change the init functions to
actually do something and not just return NT_STATUS_OK
(This used to be commit 86f532c1b0cf7961b8331bb212c3ed2084fda3fc)

16 years agor23404: Fix wrong (and missing) action on error condition in ldap reply evaluation...
Simo Sorce [Sat, 9 Jun 2007 18:18:24 +0000 (18:18 +0000)]
r23404: Fix wrong (and missing) action on error condition in ldap reply evaluation loop
Fixes one of the segfaults in bug #4667
(This used to be commit 176e1c0b692b9509a29bbbb2b35ad821dfb0d5aa)

16 years agor23402: Got bitten by a talloc hierarchy. Make sure we alloc
Jeremy Allison [Sat, 9 Jun 2007 00:27:28 +0000 (00:27 +0000)]
r23402: Got bitten by a talloc hierarchy. Make sure we alloc
off the pipe ctx now ->names is part of the containing
struct.
Jeremy.
(This used to be commit 02fd43490212e9ff8f784ce4d33d64566d58fd82)

16 years agor23400: Fix lsa crash bug #4683. The "names" enum struct
Jeremy Allison [Sat, 9 Jun 2007 00:13:07 +0000 (00:13 +0000)]
r23400: Fix lsa crash bug #4683. The "names" enum struct
in a lookup_sidX reply isn't optional - like the
lookup_sidX query it needs to be defined in the
struct.
All this will go away with PIDL (thank goodness....).
Jerry - I think this is a showstopper to be merged
for 3.0.25b.
I'll be watching the build farm to see if anything broke.
Jeremy.
(This used to be commit 9300b92f7a51eb80fdc039d8dad23ea9ce82aa8f)

16 years agor23398: Support membership of >16 groups on Darwin by making sure we opt in to the
James Peach [Sat, 9 Jun 2007 00:10:26 +0000 (00:10 +0000)]
r23398: Support membership of >16 groups on Darwin by making sure we opt in to the
dynamic group resolution mechanism when switching UNIX credentials.
(This used to be commit b5cb21e951550fe836b0ef5febc037af9a7f51ec)

16 years agor23396: Make VFS callbacks static. Mark operations as OPAQUE because they
James Peach [Fri, 8 Jun 2007 23:08:41 +0000 (23:08 +0000)]
r23396: Make VFS callbacks static. Mark operations as OPAQUE because they
do not pass through.
(This used to be commit b9d6eee5d4d0894ded88455675a470cbf04d8f45)

16 years agor23393: Support BSD group semantics by making sure that the effective GID is always
James Peach [Fri, 8 Jun 2007 22:25:55 +0000 (22:25 +0000)]
r23393: Support BSD group semantics by making sure that the effective GID is always
passed as the first GID when calling setgroups(2).
(This used to be commit 6ebaf856c1d27f2fbfa0444a5c6c17c4331d2780)

16 years agor23391: Second part of the patch for Apple.
Jeremy Allison [Fri, 8 Jun 2007 19:58:32 +0000 (19:58 +0000)]
r23391: Second part of the patch for Apple.

Change the sequence :

gain_root();
sys_setgroups(ngroups, groups);
become_id(uid, gid);

to a function call :

set_unix_security_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups)

James - should be safe for you to create a Darwin-specific
version of this function now.

Jeremy.
(This used to be commit 8ee982b3678be41ce8b4f4c1df428dcbf897ccbe)

16 years agor23390: First part of the patch to make Apple's life easier.
Jeremy Allison [Fri, 8 Jun 2007 19:52:18 +0000 (19:52 +0000)]
r23390: First part of the patch to make Apple's life easier.
Doing this in two stages to make it very easy to
review. Context switching must look like :

gain_root();
sys_setgroups(ngroups, groups);
become_id(uid, gid);

Re-arrange order so these three calls are always
seen together.

Next will be to turn these into a function.

Jeremy.
(This used to be commit eb537185ee4a3f460709267c843c9303a9bb61b5)

16 years agor23389: Disabling ACL support on Darwin/Mac OS X for now.
Michael Adam [Fri, 8 Jun 2007 14:37:29 +0000 (14:37 +0000)]
r23389: Disabling ACL support on Darwin/Mac OS X for now.

Current configure check detects posix ACL support
but compile of modules/vfs_posixacl.c fails due
to missing defines in sys/acl.h:
ACL_USER, ACL_USER_OBJ, ACL_GROUP, ACL_GROUP_OBJ, ACL_OTHER,
ACL_MASK, ACL_WRITE, ACL_READ

It has to be investigated, if this can be fixed within
the posixacl vfs module or if we need a darwinacl module.

Michael
(This used to be commit f275991c2fc92cf1e140e4cf8f8bc1a7fbcbbb0c)

16 years agor23387: 1. This unifies the POSIX ACL detection code:
Michael Adam [Fri, 8 Jun 2007 12:32:13 +0000 (12:32 +0000)]
r23387: 1. This unifies the POSIX ACL detection code:
Linux, FreeBSD and other (which?) ACL implementations
are now checked in the same block instead of in three
separate blocks. This was inspired by Timur Bakeyev
in Bug #4543. Since bugzilla is currently unavailable
this patch is probably slightly different from Timurs
original patch. This should finally fix Bug #4543.

2. The default of the --with-acl-support configure
option is changed to "auto" (which is actually the
same as "yes"). So configure tries to detect acl
support by default. This had been discussed with
Metze and others.

Michael
(This used to be commit 234b32c7bc18b3e450329dbee496d9f600a642ee)

16 years agor23380: netr_getdcname returns WERROR not NTSTATUS.
Günther Deschner [Fri, 8 Jun 2007 10:29:46 +0000 (10:29 +0000)]
r23380: netr_getdcname returns WERROR not NTSTATUS.

Guenther
(This used to be commit 5e75ea7f2b568d76c8ced5f43171741532cc97c2)

16 years agor23379: Whitespace cosmetics, to reduce irritating diffs...
Michael Adam [Fri, 8 Jun 2007 10:15:19 +0000 (10:15 +0000)]
r23379: Whitespace cosmetics, to reduce irritating diffs...

Michael
(This used to be commit df30f8d5c2999590aabe1e87f92fbdbafa7052aa)

16 years agor23377: Patch from Bjoern Jacke <bjoern@j3e.de> to deal
Gerald Carter [Thu, 7 Jun 2007 13:35:39 +0000 (13:35 +0000)]
r23377: Patch from Bjoern Jacke <bjoern@j3e.de> to deal
with non-GNU implementations of tr in autogen.sh
(This used to be commit ccc466c56a93906ef5dfa1079796b1a8a44b43c0)

16 years agor23376: More warnings
Volker Lendecke [Thu, 7 Jun 2007 07:53:33 +0000 (07:53 +0000)]
r23376: More warnings
(This used to be commit a8ec53f022ff66053231818d4a60568675079ede)

16 years agor23375: Fix a 64-bit warning
Volker Lendecke [Thu, 7 Jun 2007 07:49:43 +0000 (07:49 +0000)]
r23375: Fix a 64-bit warning
(This used to be commit c592b562fa793c9fb3bd0d84074d4ffaa8f63b64)

16 years agor23372: Remove restriction on string length for rpcclient commands.
Jeremy Allison [Thu, 7 Jun 2007 01:13:43 +0000 (01:13 +0000)]
r23372: Remove restriction on string length for rpcclient commands.
Jeremy.
(This used to be commit a2cf87f58a0a1dbc468a78347880a2f07443b1d8)

16 years agor23371: Fix the misleading comment I added - it really *should*
Jeremy Allison [Thu, 7 Jun 2007 00:14:06 +0000 (00:14 +0000)]
r23371: Fix the misleading comment I added - it really *should*
say "locks chain and returned record", not
"and returns record"
Jeremy.
(This used to be commit bf951e3d7f0310cc624abab11a7fb04c50770425)

16 years agor23370: Traverse in tdb wasn't consistently using the
Jeremy Allison [Thu, 7 Jun 2007 00:00:45 +0000 (00:00 +0000)]
r23370: Traverse in tdb wasn't consistently using the
travlocks.lock_rw for lock read/write types, it
was sometimes using it (tdb_next_lock) and
sometimes explicitly using F_WRLCK instead.
Change this to consistently use travlocks.lock_rw
only.
I'm pretty sure about this fix (else I woudn't
be checking this in :-) but tridge and Volker
please review.
Jeremy.
(This used to be commit d0b64567630ec02eb437aa713847bb23a8be8a60)

16 years agor23368: Make "winbind:rpc only" a full blown parameter. Thanks to Karolin for
Volker Lendecke [Wed, 6 Jun 2007 13:02:24 +0000 (13:02 +0000)]
r23368: Make "winbind:rpc only" a full blown parameter. Thanks to Karolin for
the patch :-)
(This used to be commit 07b71a02aef15b75d281cabeb7140db1bc0bb283)

16 years agor23367: check the "use mmap" option for ldb too
Andrew Tridgell [Wed, 6 Jun 2007 13:02:14 +0000 (13:02 +0000)]
r23367: check the "use mmap" option for ldb too
(This used to be commit 15345bbc73b28d07c069fde33d3d4c1f21f107d3)

16 years agor23363: Activate rep_pread and rep_pwrite in lib/replace/replace.h.
Michael Adam [Wed, 6 Jun 2007 09:27:43 +0000 (09:27 +0000)]
r23363: Activate rep_pread and rep_pwrite in lib/replace/replace.h.
This fixes the build on a SuSE 6.1. :-)
I guess this had been merely forgotten.

But beware: The implementations of rep_pread and rep_pwrite are
not thread safe.

Michael
(This used to be commit 5f5b93149216eb57872e4291336685b96948681e)

16 years agor23362: Respect "use mmap" in tdb_wrap_open(). Tridge, you might want to merge
Volker Lendecke [Wed, 6 Jun 2007 07:46:38 +0000 (07:46 +0000)]
r23362: Respect "use mmap" in tdb_wrap_open(). Tridge, you might want to merge
this in your tree.
(This used to be commit c0f40eb5846f617d9c421136b0e1ea593c8d8458)

16 years agor23359: Fix bug #4537, fix from jens.nissen@gmx.net.
Jeremy Allison [Wed, 6 Jun 2007 00:42:10 +0000 (00:42 +0000)]
r23359: Fix bug #4537, fix from jens.nissen@gmx.net.
Jeremy.
(This used to be commit 6ea7127f8e592f989a6263e360e809dcfdf98ef0)

16 years agor23358: Fix from Justin Maggard <jmaggard@infrant.com> - ensure we don't
Jeremy Allison [Tue, 5 Jun 2007 23:35:39 +0000 (23:35 +0000)]
r23358: Fix from Justin Maggard <jmaggard@infrant.com> - ensure we don't
expire a password if it's explicitly set as ACB_PWNOTREQ.
Jeremy.
(This used to be commit 2ea5a6bd334e31201aa6f93f5c51e42924d36ebd)

16 years agor23357: timespec_current() was returning the wrong ns time
Jeremy Allison [Tue, 5 Jun 2007 19:17:05 +0000 (19:17 +0000)]
r23357: timespec_current() was returning the wrong ns time
(multiplying tv_sec, not tv_usec).
Jeremy.
(This used to be commit bafd3b93f9ce74d7a8e2d6b36735f0977a22882c)

16 years agor23356: We missed to add the 'c' character to the list of valid ones for
Simo Sorce [Tue, 5 Jun 2007 12:58:18 +0000 (12:58 +0000)]
r23356: We missed to add the 'c' character to the list of valid ones for
shell escaping.

I hate this kind of bugs more than how Jeremy hates off by ones :(

Simo.
(This used to be commit 42d846ff870f93b7eaca316f04c12104330bbca8)

16 years agor23355: Fix some more build warnings.
Günther Deschner [Tue, 5 Jun 2007 10:49:05 +0000 (10:49 +0000)]
r23355: Fix some more build warnings.

Guenther
(This used to be commit 23e25bba8fafb31492b517d63f0a00c5ec07d5da)

16 years agor23354: Fix build warning.
Günther Deschner [Tue, 5 Jun 2007 10:23:56 +0000 (10:23 +0000)]
r23354: Fix build warning.

Guenther
(This used to be commit 4ad456e988f0b9b65890b4cf6a4f1b63ef1585b8)

16 years agor23352: Don't generate stamp-h. AFAICT it is never used.
James Peach [Tue, 5 Jun 2007 06:10:09 +0000 (06:10 +0000)]
r23352: Don't generate stamp-h. AFAICT it is never used.
(This used to be commit d47d1a44e74b3cd02cddf1cf2f22460987102b66)

16 years agor23349: Fix from Steve Langasek <vorlon@debian.org> to
Jeremy Allison [Tue, 5 Jun 2007 01:59:37 +0000 (01:59 +0000)]
r23349: Fix from Steve Langasek <vorlon@debian.org> to
allow SIGTERM to cause nmbd to exit on awaiting
an interface to come up. Debian bug #168079
Jeremy.
(This used to be commit 9ee310f3d68426da552f084ebcffef6b8ebbf612)

16 years agor23348: Fix connection reporting on SIGUSR2 (noticed by
Jeremy Allison [Mon, 4 Jun 2007 23:51:19 +0000 (23:51 +0000)]
r23348: Fix connection reporting on SIGUSR2 (noticed by
Herb).
Jeremy.
(This used to be commit dcb617e550c98de8a4bdcb9b1f7f78ba008fc138)

16 years agor23347: Fix Coverity 363. Dead code elimination.
Jeremy Allison [Mon, 4 Jun 2007 23:31:34 +0000 (23:31 +0000)]
r23347: Fix Coverity 363. Dead code elimination.
Jeremy.
(This used to be commit 4524ee2dbcd5c1c66085032de67c6d083f91cb8a)

16 years agor23346: Fix offline caching with XP/Vista. It was an off-by-one
Jeremy Allison [Mon, 4 Jun 2007 22:29:23 +0000 (22:29 +0000)]
r23346: Fix offline caching with XP/Vista. It was an off-by-one
in storing the access mask. I shouldn't have made this
mistake. Damn. Fixes bug #4673.
Jeremy
(This used to be commit 84801d4e83786b9de3d0875a317ca9ed8ff5b3e4)

16 years agor23345: Stop Coverity from getting confused.
Jeremy Allison [Mon, 4 Jun 2007 19:58:11 +0000 (19:58 +0000)]
r23345: Stop Coverity from getting confused.
Jeremy.
(This used to be commit 8e83e4267260201777c753c4e3849d65fd20ae8f)

16 years agor23344: Better error message
Volker Lendecke [Mon, 4 Jun 2007 19:50:30 +0000 (19:50 +0000)]
r23344: Better error message
(This used to be commit 4042d2cdd2797e2f675ddeb0d288327ca55d9f5b)

16 years agor23343: Fix error return
Volker Lendecke [Mon, 4 Jun 2007 19:45:41 +0000 (19:45 +0000)]
r23343: Fix error return
(This used to be commit 0014ee44b87a4a109c897ffec5f9c38eea442571)

16 years agor23342: Stop Coverity from getting confused.
Jeremy Allison [Mon, 4 Jun 2007 19:29:40 +0000 (19:29 +0000)]
r23342: Stop Coverity from getting confused.
Jeremy.
(This used to be commit 34144c63ad0d776c0b01f6bd3ce378921f2d31cd)

16 years agor23341: pdb interfaces should be versioned. As SAMBA_3_0 and SAMBA_3_0_26
Jeremy Allison [Mon, 4 Jun 2007 19:03:33 +0000 (19:03 +0000)]
r23341: pdb interfaces should be versioned. As SAMBA_3_0 and SAMBA_3_0_26
are now identical, use the same version number (16) for both.
Jeremy.
(This used to be commit f2ac311ed408e1f17f468945b34289d4c6b915cc)

16 years agor23340: Fix typo in debug ouput. Found by Karolin Seeger <ks@sernet.de>.
Michael Adam [Mon, 4 Jun 2007 14:48:26 +0000 (14:48 +0000)]
r23340: Fix typo in debug ouput. Found by Karolin Seeger <ks@sernet.de>.
Michael
(This used to be commit 81c7d152b2cb8fafa3d510c3d35fb86bae1e0856)

16 years agor23337: fix a crash bug...I wonder why only HP-UX 11.00 ans 11.11 noticed
Stefan Metzmacher [Mon, 4 Jun 2007 14:25:52 +0000 (14:25 +0000)]
r23337: fix a crash bug...I wonder why only HP-UX 11.00 ans 11.11 noticed
it via a SIGBUS...

I missed to remove the samba3 specifc code path to tdb_open_ex()
when I synced lib/tdb/ with samba4. The explicit cast in on tdb_open_ex()
dropped the compiler warning :-(

metze
(This used to be commit 815d2101715d6646fc15ac9f2853cf727cf7fcd8)

16 years agor23335: as not all source files include replace.h/config.h
Stefan Metzmacher [Mon, 4 Jun 2007 09:57:59 +0000 (09:57 +0000)]
r23335: as not all source files include replace.h/config.h
before unistd.h we need to pass -D_FILE_OFFSET_BITS=64
together with -Dpread=pread64 -Dpwrite=pwrite64

metze
(This used to be commit 1716613cc7ab8dec739adadeadbf18937682cd5c)

16 years agor23330: always include "winbind_client.h" as first header
Stefan Metzmacher [Mon, 4 Jun 2007 08:03:46 +0000 (08:03 +0000)]
r23330: always include "winbind_client.h" as first header
as it brings in "replace.h" this will bring in "config.h"

metze
(This used to be commit d0b7b77fc437288d2e14099209bfd435bd7f1da4)

16 years agor23328: don't typedef ber_tag_t when it's already done by openldap
Stefan Metzmacher [Mon, 4 Jun 2007 08:01:48 +0000 (08:01 +0000)]
r23328: don't typedef ber_tag_t when it's already done by openldap
headers on HP-UX (lber_types.h defines _LBER_TYPES_H).

metze
(This used to be commit bd1b28dd3e47c2f244baba4a239b0d6dca57f2d2)

16 years agor23323: merged ldb changes from 3.0.26
Andrew Tridgell [Mon, 4 Jun 2007 01:51:18 +0000 (01:51 +0000)]
r23323: merged ldb changes from 3.0.26
(This used to be commit 7c9a5c2a3f012a06e9550dc0de7df460c2fd943b)

16 years agor23321: remove unused variable (due to mad merge from Centeris patches)
Gerald Carter [Mon, 4 Jun 2007 01:33:00 +0000 (01:33 +0000)]
r23321: remove unused variable (due to mad merge from Centeris patches)
(This used to be commit 1b68302e344df1e35becd26c1959ab0f94d8b3bc)

16 years agor23317: Fix the build: r23315 was a little overeager in removing the
Michael Adam [Sun, 3 Jun 2007 20:24:25 +0000 (20:24 +0000)]
r23317: Fix the build: r23315 was a little overeager in removing the
INIPARSER_OBJ from the bin/net target altogether. I re-add it
in the guise of @BUILD_INIPARSER@ (to NET_OBJ). This also
eliminates the need to have @BUILD_INIPARSER@ in the deps for
the bin/net target.
Same procedure for the pam_winbindd module.

Michael
(This used to be commit 114a80dd2e1ddc577ae6ab336878f48317ce3e98)