13 years agor23556: Fix for error path from Atsushi Nakabayashi <>.
Jeremy Allison [Wed, 20 Jun 2007 23:24:18 +0000 (23:24 +0000)]
r23556: Fix for error path from Atsushi Nakabayashi <>.

13 years agor23555: Fix some uninitialiazed variable uses.
Jeremy Allison [Wed, 20 Jun 2007 18:05:48 +0000 (18:05 +0000)]
r23555: Fix some uninitialiazed variable uses.

13 years agor23554: Fix bug #4711 by makeing cli_connect return an NTSTATUS.
Jeremy Allison [Wed, 20 Jun 2007 17:38:42 +0000 (17:38 +0000)]
r23554: Fix bug #4711 by makeing cli_connect return an NTSTATUS.
Long overdue fix....

13 years agor23553: Also ignore "lock directory" in registry global options.
Michael Adam [Wed, 20 Jun 2007 10:08:31 +0000 (10:08 +0000)]
r23553: Also ignore "lock directory" in registry global options.


13 years agor23552: Use proper comparison function an fix logic.
Michael Adam [Wed, 20 Jun 2007 08:47:13 +0000 (08:47 +0000)]
r23552: Use proper comparison function an fix logic.


13 years agor23550: Add more UNIX error -> NT status mappings.
Jeremy Allison [Wed, 20 Jun 2007 01:26:18 +0000 (01:26 +0000)]
r23550: Add more UNIX error -> NT status mappings.

13 years agor23549: Make "net conf setparm" always use registry data type "sz".
Michael Adam [Tue, 19 Jun 2007 21:40:27 +0000 (21:40 +0000)]
r23549: Make "net conf setparm" always use registry data type "sz".
This simplifies the usage of this command from
"net conf setparm <section> <param> <type> <value>"
"net conf setparm <section> <param> <value>".


13 years agor23548: Fix comments.
Michael Adam [Tue, 19 Jun 2007 21:08:46 +0000 (21:08 +0000)]
r23548: Fix comments.


13 years agor23547: Ignore parameter "include" in regsitry globals.
Michael Adam [Tue, 19 Jun 2007 21:06:31 +0000 (21:06 +0000)]
r23547: Ignore parameter "include" in regsitry globals.


13 years agor23543: Adjust comments.
Michael Adam [Tue, 19 Jun 2007 11:11:01 +0000 (11:11 +0000)]
r23543: Adjust comments.

13 years agor23541: Linking the LSA pipe module only once is probably enough.
James Peach [Mon, 18 Jun 2007 16:10:00 +0000 (16:10 +0000)]
r23541: Linking the LSA pipe module only once is probably enough.

13 years agor23539: Remove code duplication and unify behaviour of winbind_nss_*.h files
Kai Blin [Mon, 18 Jun 2007 13:59:09 +0000 (13:59 +0000)]
r23539: Remove code duplication and unify behaviour of winbind_nss_*.h files

13 years agor23538: Fix for wild-card rename: We can't return directly on error, we need to
Volker Lendecke [Mon, 18 Jun 2007 12:22:42 +0000 (12:22 +0000)]
r23538: Fix for wild-card rename: We can't return directly on error, we need to

13 years agor23537: Revert the inbuf/outbuf part of r23528: This caused the Solaris CC make test
Volker Lendecke [Mon, 18 Jun 2007 09:25:31 +0000 (09:25 +0000)]
r23537: Revert the inbuf/outbuf part of r23528: This caused the Solaris CC make test
to break. The Solaris CC put the static char InBuffer[TOTAL_BUFFER_SIZE] on an
odd address, the malloc'ed one is always aligned. The problem showed up in
pull_ucs2, ucs2_align uses the address of InBuffer as an indication whether to
bump up the src of the string by one. Unfortunately in the trans calls the
data portion is malloced and thus has different alignment guarantees than a
static variable. This one is bigger....


13 years agor23536: Fix a typo. James: Please check!
Michael Adam [Sun, 17 Jun 2007 23:13:32 +0000 (23:13 +0000)]
r23536: Fix a typo. James: Please check!


13 years agor23530: Fix bugs #4678 and #4697 which had the same root cause.
Jeremy Allison [Sun, 17 Jun 2007 19:23:32 +0000 (19:23 +0000)]
r23530: Fix bugs #4678 and #4697 which had the same root cause.
In make_server_info_pw() we assign a user SID in our
authoritative SAM, even though this may be from a
pure "Unix User" that doesn't exist in the SAM.
This causes lookups on "[in]valid users" to fail as they
will lookup this name as a "Unix User" SID to check against
the user token. Fix this by adding the "Unix User"\unix_username
SID to the sid array. The correct fix should probably be
changing the server_info->sam_account user SID to be a
S-1-22 Unix SID, but this might break old configs where
plaintext passwords were used with no SAM backend.

13 years agor23528: Two changes to make the valgrind massif (heap profiler) output readable:
Volker Lendecke [Sun, 17 Jun 2007 05:19:30 +0000 (05:19 +0000)]
r23528: Two changes to make the valgrind massif (heap profiler) output readable:

Remove the allocated inbuf/output. In async I/O we copy the buffers
explicitly now, so NewInBuffer is called exactly once. This does not
reduce memory footprint, but removes one of the larger chunks that
clobber the rest of the massif output

In getgroups_unix_user on Linux 2.6 we allocated 64k groups x 4 bytes
per group x 2 (once in the routine itself and once in libc) = 512k just
to throw it away directly again. This reduces it do a more typical limit
of 32 groups per user. We certainly cope with overflow fine if 32 is not
enough. Not 100% sure about this one, a DEVELOPER only thing?

13 years agor23527: Use existing escaping function pointed by James
Simo Sorce [Sat, 16 Jun 2007 22:52:51 +0000 (22:52 +0000)]
r23527: Use existing escaping function pointed by James

13 years agor23525: I believe this patch is ok, got no reply of it being not ok.
Simo Sorce [Sat, 16 Jun 2007 18:59:02 +0000 (18:59 +0000)]
r23525: I believe this patch is ok, got no reply of it being not ok.
This closes #4624 for me.

13 years agor23524: Fix bug 2319.
Simo Sorce [Sat, 16 Jun 2007 18:54:13 +0000 (18:54 +0000)]
r23524: Fix bug 2319.
Got report this is all ok form a tester. Close a loong
standing bug preventing people to freely use any character
in their password when printing via cups were involved.

13 years agor23523: Gaa -- had renamed "name" to "path" and apparently not compiled after
Volker Lendecke [Sat, 16 Jun 2007 18:19:42 +0000 (18:19 +0000)]
r23523: Gaa -- had renamed "name" to "path" and apparently not compiled after


13 years agor23522: Save us a kilobyte stack space in a hot code path: I can't see a reason
Volker Lendecke [Sat, 16 Jun 2007 18:07:44 +0000 (18:07 +0000)]
r23522: Save us a kilobyte stack space in a hot code path: I can't see a reason
why check_path_syntax should not be able to run in-line. The destination
pointer either walks side by side with the source pointer or is
decremented. So as far as I can see s>=d is true throughout the whole

Jeremy, I'm checking this only into 3_0 for now. Please review and ack
or directly merge this to 3_0_26.



13 years agor23518: Remove the silly assumption that string_replace requires a pstring.
Volker Lendecke [Sat, 16 Jun 2007 11:48:11 +0000 (11:48 +0000)]
r23518: Remove the silly assumption that string_replace requires a pstring.

Jeremy, I am always very confused about the different length arguments
in convert_string and friends. Can you take a look at the change in
string_replace and verify it's ok? Thanks!

While at it, remove the pstring limit for strhasupper and strhaslower.

13 years agor23517: After Jeremy has given is ack on irc:
Volker Lendecke [Sat, 16 Jun 2007 10:02:51 +0000 (10:02 +0000)]
r23517: After Jeremy has given is ack on irc:

Change rename_internals to open the file/directory and then call
rename_internals_fsp. Two reasons: Remove code duplication and remove a
race condition. The race condition was due to the fact that in
can_rename the share mode check closed the file and then after that did
the rename.

13 years agor23516: Fix bug found & fixed by Doug Rudoff (
Jeremy Allison [Sat, 16 Jun 2007 01:04:22 +0000 (01:04 +0000)]
r23516: Fix bug found & fixed by Doug Rudoff (
- when cleaning up invalid locks make sure we mark the lck
struct as modified so it'll get saved back correctly (that
was the original intent).

13 years agor23515: Ensure status isn't used uninitialized.
Jeremy Allison [Sat, 16 Jun 2007 00:54:58 +0000 (00:54 +0000)]
r23515: Ensure status isn't used uninitialized.

13 years agor23514: Remove unused function ads_get_dn_from_extended_dn().
Jeremy Allison [Sat, 16 Jun 2007 00:39:52 +0000 (00:39 +0000)]
r23514: Remove unused function ads_get_dn_from_extended_dn().

13 years agor23513: Fix one more use of VALUE_PREFIX.
Jeremy Allison [Fri, 15 Jun 2007 23:52:01 +0000 (23:52 +0000)]
r23513: Fix one more use of VALUE_PREFIX.

13 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.

13 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.

13 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:

include = registry

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


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.

13 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.

13 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.)


13 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...


13 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.

13 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.

13 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

13 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).

13 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.

13 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).

13 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.


13 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.


13 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

13 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

* 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 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.


13 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.


13 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.

13 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.

13 years agor23480: Fix DEVELOPER_CFLAGS quoting.
James Peach [Thu, 14 Jun 2007 04:00:35 +0000 (04:00 +0000)]
r23480: Fix DEVELOPER_CFLAGS quoting.

13 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.

13 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.

13 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.

13 years agor23474: Here's a small patch that disables the replay cache
Gerald Carter [Wed, 13 Jun 2007 20:49:20 +0000 (20:49 +0000)]
r23474: Here's a small patch that disables the 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.

13 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)

13 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.

13 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.

13 years agor23469: Fix a comment
Volker Lendecke [Wed, 13 Jun 2007 19:01:41 +0000 (19:01 +0000)]
r23469: Fix a comment

13 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.


13 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.

13 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.

13 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!


13 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...


13 years agor23459: Remove one superfluous cast.
Michael Adam [Wed, 13 Jun 2007 10:07:05 +0000 (10:07 +0000)]
r23459: Remove one superfluous cast.

13 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.

13 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

13 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.

13 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 ! :-).

13 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.

13 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.

13 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.

13 years agor23434: Coorect a comment.
Michael Adam [Tue, 12 Jun 2007 12:35:24 +0000 (12:35 +0000)]
r23434: Coorect a comment.

13 years agor23433: remove superfluous semicolon.
Michael Adam [Tue, 12 Jun 2007 12:01:52 +0000 (12:01 +0000)]
r23433: remove superfluous semicolon.

13 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.)


13 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.


13 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.

13 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 !

13 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 !

13 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.

13 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.

13 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

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.



13 years agor23408: Remove a bogus comment
Volker Lendecke [Sun, 10 Jun 2007 10:18:03 +0000 (10:18 +0000)]
r23408: Remove a bogus comment

13 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.


13 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

13 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

13 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

13 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
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.

13 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.

13 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.

13 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).

13 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 :

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.


13 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 :

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.


13 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:

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


13 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.


13 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.


13 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...


13 years agor23377: Patch from Bjoern Jacke <> to deal
Gerald Carter [Thu, 7 Jun 2007 13:35:39 +0000 (13:35 +0000)]
r23377: Patch from Bjoern Jacke <> to deal
with non-GNU implementations of tr in

13 years agor23376: More warnings
Volker Lendecke [Thu, 7 Jun 2007 07:53:33 +0000 (07:53 +0000)]
r23376: More warnings

13 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

13 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.

13 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"

13 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
I'm pretty sure about this fix (else I woudn't
be checking this in :-) but tridge and Volker
please review.