14 years agos3:smbd: implement SMB2 Tree Disconnect
Stefan Metzmacher [Fri, 22 May 2009 10:42:24 +0000 (12:42 +0200)]
s3:smbd: implement SMB2 Tree Disconnect


14 years agos3:smbd: implement SMB2 Tree Connect
Stefan Metzmacher [Fri, 15 May 2009 09:50:20 +0000 (11:50 +0200)]
s3:smbd: implement SMB2 Tree Connect

For now this only checks if the share is present or not.


14 years agos3:smbd: SMB2 session ids are 64bit...
Stefan Metzmacher [Fri, 22 May 2009 09:06:54 +0000 (11:06 +0200)]
s3:smbd: SMB2 session ids are 64bit...

We only grand ids up to 0x0000000000FFFFFF,
because that's what our idtree implementation can handle.
But also 16777215 sessions on one tcp connection should be enough:-)


14 years agotsocket: allow empty vectors at the end for tstream_writev()/readv()
Stefan Metzmacher [Fri, 22 May 2009 10:28:17 +0000 (12:28 +0200)]
tsocket: allow empty vectors at the end for tstream_writev()/readv()


14 years agos3:winbind:idmap_ldap: fix a crash bug in idmap_ldap_unixids_to_sids (#6387)
Michael Adam [Fri, 22 May 2009 09:58:00 +0000 (11:58 +0200)]
s3:winbind:idmap_ldap: fix a crash bug in idmap_ldap_unixids_to_sids (#6387)

This fixes a crash bug hit when multiple mappings were found by
the ldap search. This crash was caused by an ldap asssertion
in ldap_next_entry because was set to NULL in each iteration.

The corresponding fix was applied to the idmap_ldap_sids_to_unixids()
by Jerry in 2007 (b066668b74768d9ed547f16bf7b6ba6aea5df20a).

This fixes the crash part of bug #6387.

There is a logic part, too:
The problem currently only occurs when multiple mappings are found
for one given unixid. Now winbindd does not crash any more but
it does not correctly handle this situation. It just returns the
last mapping from the ldap search results.
This needs fixing.


14 years agos3:smbd: implement SMB2 Logoff
Stefan Metzmacher [Fri, 15 May 2009 09:40:19 +0000 (11:40 +0200)]
s3:smbd: implement SMB2 Logoff


14 years agoDon't steal when we know the ptr will be null. Thanks to Simo for
Jeremy Allison [Fri, 22 May 2009 01:48:17 +0000 (18:48 -0700)]
Don't steal when we know the ptr will be null. Thanks to Simo for
pointing this out.

14 years agoRevert the last two commits (fix for #6386). The actual problem
Jeremy Allison [Fri, 22 May 2009 01:37:36 +0000 (18:37 -0700)]
Revert the last two commits (fix for #6386). The actual problem
was a bug in ldb in 3.2 which could return a freed pointer on
ret != LDAP_SUCCESS. The main thing we must ensure is that we
never talloc_steal until we know LDAP_SUCCESS was returned.

14 years agoEnsure all possible uses of indirection through res are checked after
Jeremy Allison [Fri, 22 May 2009 01:00:54 +0000 (18:00 -0700)]
Ensure all possible uses of indirection through res are checked after
an ldb_search.

14 years agoAttempt to fix bug #6386 - Samba Panic triggered by Sophos Control Centre.
Jeremy Allison [Fri, 22 May 2009 00:27:25 +0000 (17:27 -0700)]
Attempt to fix bug #6386 - Samba Panic triggered by Sophos Control Centre.
Don't indirect a potentially null pointer.

14 years agoDetect tight loop in tdb_find()
Jim McDonough [Thu, 21 May 2009 20:26:26 +0000 (16:26 -0400)]
Detect tight loop in tdb_find()

14 years agos3 torture: Fix warning
Tim Prouty [Thu, 21 May 2009 19:17:53 +0000 (12:17 -0700)]
s3 torture: Fix warning

14 years agos3 onefs: Fix invalid argument from the unix_convert smb_filename struct patch
Tim Prouty [Thu, 21 May 2009 19:17:33 +0000 (12:17 -0700)]
s3 onefs: Fix invalid argument from the unix_convert smb_filename struct patch

14 years agos3:smbd: we want to get the next command offset and not set it...
Stefan Metzmacher [Thu, 21 May 2009 14:17:53 +0000 (16:17 +0200)]
s3:smbd: we want to get the next command offset and not set it...

This should also fix the build on some hosts.


14 years agos3-build: fix the build of ntlm_auth. Bo Yang, please check.
Günther Deschner [Thu, 21 May 2009 10:50:20 +0000 (12:50 +0200)]
s3-build: fix the build of ntlm_auth. Bo Yang, please check.


14 years agos4-selftest: adding RPC-SAMR-USERS-PRIVILEGES to knownfail list.
Günther Deschner [Thu, 21 May 2009 10:15:07 +0000 (12:15 +0200)]
s4-selftest: adding RPC-SAMR-USERS-PRIVILEGES to knownfail list.

Samba4 cannot pass this test currently as in Samba4 (unlike Samba3)
the LSA and SAMR account are stored in the same db.
Once you delete a SAMR user the LSA privilege account is deleted
at the same time (which is wrong).


14 years agos3: ignore EPIPE error when winbind finally writes to wb client because client might...
Bo Yang [Thu, 21 May 2009 19:22:52 +0000 (03:22 +0800)]
s3: ignore EPIPE error when winbind finally writes to wb client because client might have already closed the socket

Signed-off-by: Bo Yang <>
14 years agos3: Fix onlinestatus msg to return status of all domain instead of omitting trusted...
Bo Yang [Thu, 21 May 2009 18:12:59 +0000 (02:12 +0800)]
s3: Fix onlinestatus msg to return status of all domain instead of omitting trusted domains

Signed-off-by: Bo Yang <>
14 years agos3: set winbindd request flags in ntlm_auth to make it contact trusted domain when...
Bo Yang [Thu, 21 May 2009 18:03:32 +0000 (02:03 +0800)]
s3: set winbindd request flags in ntlm_auth to make it contact trusted domain when krb5 auth is enabled

Signed-off-by: Bo Yang <>
14 years agos3: Fix request flags in wbinfo when perform krb5 authentication
Bo Yang [Thu, 21 May 2009 17:39:03 +0000 (01:39 +0800)]
s3: Fix request flags in wbinfo when perform krb5 authentication

Signed-off-by: Bo Yang <>
14 years agoMake cli_posix_open() and cli_posix_mkdir() async.
Jeremy Allison [Thu, 21 May 2009 01:31:36 +0000 (18:31 -0700)]
Make cli_posix_open() and cli_posix_mkdir() async.

14 years agos3: Change unix_convert (and its callers) to use struct smb_filename
Tim Prouty [Tue, 7 Apr 2009 20:39:57 +0000 (13:39 -0700)]
s3: Change unix_convert (and its callers) to use struct smb_filename

This is the first of a series of patches that change path based
operations to operate on a struct smb_filename instead of a char *.
This same concept already exists in source4.

My goals for this series of patches are to eventually:

1) Solve the stream vs. posix filename that contains a colon ambiguity
   that currently exists.
2) Make unix_convert the only function that parses the stream name.
3) Clean up the unix_convert API.
4) Change all path based vfs operation to take a struct smb_filename.
5) Make is_ntfs_stream_name() a constant operation that can simply
   check the state of struct smb_filename rather than re-parse the
6) Eliminate the need for split_ntfs_stream_name() to exist.

My strategy is to start from the inside at unix_convert() and work my
way out through the vfs layer, call by call.  This first patch does
just that, by changing unix_convert and all of its callers to operate
on struct smb_filename.  Since this is such a large change, I plan on
pushing the patches in phases, where each phase keeps full
compatibility and passes make test.

The API of unix_convert has been simplified from:

NTSTATUS unix_convert(TALLOC_CTX *ctx,
      connection_struct *conn,
      const char *orig_path,
      bool allow_wcard_last_component,
      char **pp_conv_path,
      char **pp_saved_last_component,
      SMB_STRUCT_STAT *pst)

NTSTATUS unix_convert(TALLOC_CTX *ctx,
      connection_struct *conn,
      const char *orig_path,
      struct smb_filename *smb_fname,
      uint32_t ucf_flags)

Currently the smb_filename struct looks like:

struct smb_filename {
       char *base_name;
       char *stream_name;
       char *original_lcomp;
       SMB_STRUCT_STAT st;

One key point here is the decision to break up the base_name and
stream_name.  I have introduced a helper function called
get_full_smb_filename() that takes an smb_filename struct and
allocates the full_name.  I changed the callers of unix_convert() to
subsequently call get_full_smb_filename() for the time being, but I
plan to eventually eliminate get_full_smb_filename().

14 years agos3:smbd: check the incoming session id for SMB2 requests
Stefan Metzmacher [Wed, 20 May 2009 18:51:10 +0000 (20:51 +0200)]
s3:smbd: check the incoming session id for SMB2 requests


14 years agos3:smbd: implement SMB2 Session Setup with raw NTLMSSP
Stefan Metzmacher [Fri, 15 May 2009 09:20:34 +0000 (11:20 +0200)]
s3:smbd: implement SMB2 Session Setup with raw NTLMSSP


14 years agos3:smbd: for now indicate raw NTLMSSP in the SMB2 Negotiate response
Stefan Metzmacher [Wed, 20 May 2009 17:45:28 +0000 (19:45 +0200)]
s3:smbd: for now indicate raw NTLMSSP in the SMB2 Negotiate response


14 years agos3:smbd: move the callback functions of smbd_smb2_request_reply() closer itself
Stefan Metzmacher [Wed, 20 May 2009 17:48:47 +0000 (19:48 +0200)]
s3:smbd: move the callback functions of smbd_smb2_request_reply() closer itself


14 years agos3:smbd: add smbd_smb2_request_done_ex()
Stefan Metzmacher [Wed, 20 May 2009 17:35:39 +0000 (19:35 +0200)]
s3:smbd: add smbd_smb2_request_done_ex()

Some times we have to return a non-error response
with status != NT_STATUS_OK.


14 years agos3:smbd: fix initialized memory in SMB2 responses
Stefan Metzmacher [Wed, 20 May 2009 17:32:55 +0000 (19:32 +0200)]
s3:smbd: fix initialized memory in SMB2 responses

MESSAGE_ID and SESSION_ID are both 64bit.


14 years agoAdd a security model to LSA. Similar to the SAMR code - using
Jeremy Allison [Wed, 20 May 2009 18:52:11 +0000 (11:52 -0700)]
Add a security model to LSA. Similar to the SAMR code - using
the MS-LSA docs.

14 years agos4:libcli/smb2: fix session setup with raw NTLMSSP
Stefan Metzmacher [Wed, 20 May 2009 17:57:37 +0000 (19:57 +0200)]
s4:libcli/smb2: fix session setup with raw NTLMSSP


14 years agos4:libcli/smb2: use raw ntlmssp if the server didn't provide a sec blob
Stefan Metzmacher [Wed, 20 May 2009 15:17:07 +0000 (17:17 +0200)]
s4:libcli/smb2: use raw ntlmssp if the server didn't provide a sec blob


14 years agos4:libcli/smb2: fill in transport->negotiate.secblob with the correct data
Stefan Metzmacher [Wed, 20 May 2009 17:51:40 +0000 (19:51 +0200)]
s4:libcli/smb2: fill in transport->negotiate.secblob with the correct data


14 years agoUse SMB_VFS_NEXT_CLOSE. This VFS stuff is really opaque to me...
Volker Lendecke [Mon, 18 May 2009 04:18:57 +0000 (06:18 +0200)]
Use SMB_VFS_NEXT_CLOSE. This VFS stuff is really opaque to me...

Thanks Michael to provide some transparency :-)

14 years agos3:smbd: add support for SMB2 Keepalive (SMB2 Echo)
Stefan Metzmacher [Fri, 15 May 2009 10:07:28 +0000 (12:07 +0200)]
s3:smbd: add support for SMB2 Keepalive (SMB2 Echo)


14 years agos3:smbd: allow SMB 2.002 dialect in SMB1 negprot
Stefan Metzmacher [Tue, 19 May 2009 08:47:51 +0000 (10:47 +0200)]
s3:smbd: allow SMB 2.002 dialect in SMB1 negprot

We create a dummy SMB2 Negotiate inbuf and pass the
connection to the SMB2 engine.


14 years agos3:smbd: add support for SMB2 Negotiate
Stefan Metzmacher [Thu, 14 May 2009 13:32:02 +0000 (15:32 +0200)]
s3:smbd: add support for SMB2 Negotiate

This is not complete, but a start that makes the
samba4 smb2 client happy.


14 years agos3:smbd: make negprot_spnego() non static
Stefan Metzmacher [Tue, 19 May 2009 08:46:35 +0000 (10:46 +0200)]
s3:smbd: make negprot_spnego() non static


14 years agos3:smbd: add infrastructure for SMB2 support
Stefan Metzmacher [Thu, 14 May 2009 12:17:28 +0000 (14:17 +0200)]
s3:smbd: add infrastructure for SMB2 support

This is disabled by default and activated by
"max protocol = SMB2".


14 years agos3:param: add PROTOCOL_SMB2
Stefan Metzmacher [Tue, 19 May 2009 08:45:38 +0000 (10:45 +0200)]
s3:param: add PROTOCOL_SMB2


14 years agoSMB2-LOCK: let the test pass against samba4
Stefan Metzmacher [Wed, 20 May 2009 13:23:51 +0000 (15:23 +0200)]
SMB2-LOCK: let the test pass against samba4


14 years agoFix bug disclosed by lock8 torture test
Volker Lendecke [Mon, 18 May 2009 04:02:07 +0000 (06:02 +0200)]
Fix bug disclosed by lock8 torture test

We have to drop the gpfs level share modes, regardless of whether we put
the file into the pending close queue.

14 years agoDemonstrate a bug we have when dealing with real os-level share modes
Volker Lendecke [Wed, 20 May 2009 12:56:04 +0000 (14:56 +0200)]
Demonstrate a bug we have when dealing with real os-level share modes

Another one of those where you stare at logfiles for hours, and when you found
it, it's absolutely obvious what is happening...

14 years agos4: try to fix privileges implementation in order to pass the RPC-SAMR-USERS-PRIVILEG...
Günther Deschner [Wed, 20 May 2009 11:32:25 +0000 (13:32 +0200)]
s4: try to fix privileges implementation in order to pass the RPC-SAMR-USERS-PRIVILEGES test.


14 years agoHave ntvfs_connect() accept union smb_tcon *tcon instead of char* sharename
Sam Liddicott [Thu, 14 May 2009 07:58:50 +0000 (08:58 +0100)]
Have ntvfs_connect() accept union smb_tcon *tcon instead of char* sharename

This change brings ntvfs_connect into compliance with other ntvfs functions
which take an ntvfs module, an ntvfs request and an smb io union.

It now becomes the responsibility of ntvfs modules to examine
tcon->generic.level themselves and derive the share name and any other
directly; e.g.

const char *sharename;

switch (tcon->generic.level) {
sharename = tcon->;
sharename = tcon->;

if (strncmp(sharename, "\\\\", 2) == 0) {
char *p = strchr(sharename+2, '\\');
if (p) {
sharename = p + 1;

service.c smbsrv_tcon_backend() is called before ntvfs_connect and fills in
some of the tcon->..out values.
For the case of RAW_TCON_TCONX, it filles out tcon->tconx.out.tid and

For the case of RAW_TCON_TCON it fills out tcon->tcon.out.tid and

Thus the ntvfs_connect function for vfs modules may override these values
if desired, but are not required to.

ntvfs_connect functions are required to fill in the tcon->tconx.out.*_type
fields, for RAW_TCON_TCONX, perhaps something like:

if (tcon->generic.level == RAW_TCON_TCONX) {
tcon->tconx.out.fs_type = ntvfs->ctx->fs_type;
tcon->tconx.out.dev_type = ntvfs->ctx->dev_type;

Signed-off-by: Sam Liddicott <>
(I fixed the ntvfs_connect() in the smb_server/smb2/
 and the RAW_TCON_SMB2 switch case in the modules)

Signed-off-by: Stefan Metzmacher <>
14 years agos3-selftest: add add and delete group scripts using nss_wrapper.
Günther Deschner [Wed, 20 May 2009 00:12:17 +0000 (02:12 +0200)]
s3-selftest: add add and delete group scripts using nss_wrapper.


14 years agonsswrapper: implement group_del() in
Günther Deschner [Wed, 20 May 2009 00:10:12 +0000 (02:10 +0200)]
nsswrapper: implement group_del() in


14 years agonsswrapper: implement group_add() in
Günther Deschner [Wed, 20 May 2009 00:06:22 +0000 (02:06 +0200)]
nsswrapper: implement group_add() in


14 years agos4:smb_server: initialy read the first 4 bytes only
Sam Liddicott [Tue, 19 May 2009 14:42:39 +0000 (15:42 +0100)]
s4:smb_server: initialy read the first 4 bytes only

Stop packet_recv getting greedy and reading the whole socket
and then dispatching te extra packets in a timer loop

Signed-off-by: Sam Liddicott <>
Signed-off-by: Stefan Metzmacher <>
14 years agos4:libcli/raw: initialy read the first 4 bytes only
Stefan Metzmacher [Tue, 19 May 2009 14:18:38 +0000 (16:18 +0200)]
s4:libcli/raw: initialy read the first 4 bytes only


14 years agoDo not do a merged build without shared libs
Volker Lendecke [Wed, 20 May 2009 06:58:13 +0000 (08:58 +0200)]
Do not do a merged build without shared libs

Jelmer, you might want to take a look at Andrew B's problem with

--enable-developer --disable-shared --disable-shared-libs

14 years agoOnly build the krb5 locator when building shared libs
Volker Lendecke [Wed, 20 May 2009 06:39:45 +0000 (08:39 +0200)]
Only build the krb5 locator when building shared libs

14 years agoSet errno=ENOMEM if tevent_add_fd fails
Volker Lendecke [Tue, 19 May 2009 21:48:41 +0000 (23:48 +0200)]
Set errno=ENOMEM if tevent_add_fd fails

tevent_add_fd does not properly set that. At least in epoll and select this is
the only error condition.

Metze, please check!

14 years agoAdded mapping table for account object in lsa.
Jeremy Allison [Tue, 19 May 2009 21:47:25 +0000 (14:47 -0700)]
Added mapping table for account object in lsa.

14 years agoSimplify the logic of tsocket_bsd_pending
Volker Lendecke [Tue, 19 May 2009 21:31:55 +0000 (23:31 +0200)]
Simplify the logic of tsocket_bsd_pending

Remove two indentation levels by returning early on error.

Metze, please check!

14 years agotevent/python: Makefile was still trying to build some non AC_SUBST python targets
Jelmer Vernooij [Tue, 19 May 2009 21:31:34 +0000 (23:31 +0200)]
tevent/python: Makefile was still trying to build some non AC_SUBST python targets

Signed-Off-By: Jelmer Vernooij <>
14 years agoMake local-wbclient flexible in # of connections and ops
Volker Lendecke [Tue, 19 May 2009 21:07:36 +0000 (23:07 +0200)]
Make local-wbclient flexible in # of connections and ops

14 years agoFix wb_trans_done after conversion to unix calling conventions
Volker Lendecke [Tue, 19 May 2009 21:06:48 +0000 (23:06 +0200)]
Fix wb_trans_done after conversion to unix calling conventions

14 years agoFix an uninitialized variable in wb_context_init
Volker Lendecke [Tue, 19 May 2009 21:05:51 +0000 (23:05 +0200)]
Fix an uninitialized variable in wb_context_init

14 years agoAnother attempt at fixing the static build of vfs_notify_fam
Volker Lendecke [Tue, 19 May 2009 18:45:45 +0000 (20:45 +0200)]
Another attempt at fixing the static build of vfs_notify_fam

14 years agoFix detection of "enum FAMCodes"
Volker Lendecke [Tue, 19 May 2009 18:45:22 +0000 (20:45 +0200)]
Fix detection of "enum FAMCodes"

14 years agos3 onefs: Removing an incorrect TALLOC_FREE
Aravind Srinivasan [Thu, 14 May 2009 15:54:46 +0000 (15:54 +0000)]
s3 onefs: Removing an incorrect TALLOC_FREE

Signed-off-by: Tim Prouty <>
14 years agoUse TDB_VOLATILE instead of tdb_set_max_dead()
Volker Lendecke [Tue, 19 May 2009 12:51:03 +0000 (14:51 +0200)]
Use TDB_VOLATILE instead of tdb_set_max_dead()

14 years agos3/docs: Fix shutdown script example.
Karolin Seeger [Tue, 19 May 2009 11:42:16 +0000 (13:42 +0200)]
s3/docs: Fix shutdown script example.

This fixes bug #5897. Thanks to TAKAHASHI Motonobu
<monyo [at]> for reporting and providing the example!


14 years agos3: Always allocate memory in dptr_ReadDirName
Aravind Srinivasan [Mon, 11 May 2009 22:39:05 +0000 (22:39 +0000)]
s3: Always allocate memory in dptr_ReadDirName

This is a follow up to 69d61453df6019caef4e7960fa78c6a3c51f3d2a to
adjust the API to allow the lower layers allocate memory.  Now the
memory can explicitly be freed rather than relying on talloc_tos().

Signed-off-by: Tim Prouty <>
14 years agos4 torture: Fix typo
Tim Prouty [Tue, 19 May 2009 01:31:46 +0000 (18:31 -0700)]
s4 torture: Fix typo

14 years agos3 sendfile: Fix two bugs in sendfile
Tim Prouty [Tue, 19 May 2009 01:20:18 +0000 (18:20 -0700)]
s3 sendfile: Fix two bugs in sendfile

These were found interally via code inspection.

1) fake_sendfile was incorrectly writing zeros over real data on a
   short read.

2) sendfile_short_send was doing 4 byte writes instead of 1024 byte
   writes due to an incorrect sizeof usage.

Jermey, Vl please check

14 years agos4-smbtorture: Fix build warning in RPC-SAMR tests.
Günther Deschner [Tue, 19 May 2009 00:01:27 +0000 (02:01 +0200)]
s4-smbtorture: Fix build warning in RPC-SAMR tests.


14 years agos3: re-run make samba3-idl.
Günther Deschner [Tue, 19 May 2009 00:00:34 +0000 (02:00 +0200)]
s3: re-run make samba3-idl.


14 years agolsa: add access_masks for accounts, secrets and trusted domains to IDL.
Günther Deschner [Mon, 18 May 2009 23:59:55 +0000 (01:59 +0200)]
lsa: add access_masks for accounts, secrets and trusted domains to IDL.


14 years agoChange access_check_samr_object -> access_check_object.
Jeremy Allison [Mon, 18 May 2009 22:44:03 +0000 (15:44 -0700)]
Change access_check_samr_object -> access_check_object.
Make map_max_allowed_access global. Change lsa_get_generic_sd
to add Everyone:LSA_POLICY_READ|LSA_POLICY_EXECUTE, not just

14 years agos3-lsa: let _lsa_OpenPolicy() just call _lsa_OpenPolicy2().
Günther Deschner [Mon, 18 May 2009 22:16:26 +0000 (00:16 +0200)]
s3-lsa: let _lsa_OpenPolicy() just call _lsa_OpenPolicy2().


14 years agos3-selftest: enable RPC-SAMR-USERS-PRIVILEGES.
Günther Deschner [Mon, 18 May 2009 19:14:42 +0000 (21:14 +0200)]
s3-selftest: enable RPC-SAMR-USERS-PRIVILEGES.


14 years agoFix SAMR server for winbindd access. Ensure we allow
Jeremy Allison [Mon, 18 May 2009 21:26:37 +0000 (14:26 -0700)]
Fix SAMR server for winbindd access. Ensure we allow
MAX_ACCESS to be mapped to what we're giving Everyone.

14 years agos3-lsa: let _lsa_GetSystemAccessAccount() call into _lsa_EnumPrivsAccount().
Günther Deschner [Mon, 18 May 2009 19:05:08 +0000 (21:05 +0200)]
s3-lsa: let _lsa_GetSystemAccessAccount() call into _lsa_EnumPrivsAccount().

Inspired by lsa server from Samba 4.

Just removing a user in SAMR does not remove a user in LSA. If you use
usermanager from windows, the "User Rights" management gui gets unaccessable as
soon as you delete a user that had privileges granted. With this fix, that
no longer existing user would properly appear as an unknown account in the GUI
(as it does while using usermanager with windows domains).

This almost makes Samba3 pass the RPC-SAMR-USERS-PRIVILEGES test.


14 years agos3-lsa: start a very basic implementation of _lsa_DeleteObject().
Günther Deschner [Mon, 18 May 2009 19:00:29 +0000 (21:00 +0200)]
s3-lsa: start a very basic implementation of _lsa_DeleteObject().

Certainly not the full story but this gets us closer to pass the


14 years agos4-smbtorture: add RPC-SAMR-USERS-PRIVILEGES test.
Günther Deschner [Mon, 18 May 2009 17:37:13 +0000 (19:37 +0200)]
s4-smbtorture: add RPC-SAMR-USERS-PRIVILEGES test.

This test demonstrates the independence of the lsa and samr accounts while
remove a samr users that still has privileges granted.


14 years agoMove down the become_root()/unbecome_root() calls into the VFS modules
Volker Lendecke [Mon, 18 May 2009 11:30:16 +0000 (13:30 +0200)]
Move down the become_root()/unbecome_root() calls into the VFS modules

The aio_fork module does not need this, as it does not communicate via signals
but with pipes. Watching a strace log with those become_root() calls in aio.c
is absolutely awful, and it does affect performance.

14 years agoFix bug 5681: Do not limit the number of network interfaces
Volker Lendecke [Mon, 18 May 2009 08:32:27 +0000 (10:32 +0200)]
Fix bug 5681: Do not limit the number of network interfaces

Jeremy as far as I can see there is no real technical reason to limit the
number of interfaces. If you like this patch, can you please merge it to 3.4?
If you don't please tell me :-)



14 years agoIn aio_fork, we have to close all fd's, we might hold a gpfs share mode
Volker Lendecke [Mon, 18 May 2009 07:49:23 +0000 (09:49 +0200)]
In aio_fork, we have to close all fd's, we might hold a gpfs share mode

Keeping such an fd open prohibits another open of that same file.

14 years agoAdd "file_walk_table" to do stuff with all open files
Volker Lendecke [Mon, 18 May 2009 07:46:05 +0000 (09:46 +0200)]
Add "file_walk_table" to do stuff with all open files

14 years agoFix a race condition in vfs_aio_fork with gpfs share modes
Volker Lendecke [Mon, 18 May 2009 07:36:16 +0000 (09:36 +0200)]
Fix a race condition in vfs_aio_fork with gpfs share modes

14 years agoFix broken pipe handling
Volker Lendecke [Mon, 18 May 2009 05:08:34 +0000 (07:08 +0200)]
Fix broken pipe handling

Metze is right: If we have *any* error at the socket level, we just can
not continue.

Also, apply some defensive programming: With this async stuff someone else
might already have closed the socket.

14 years agoFix a type-punned warning
Volker Lendecke [Mon, 18 May 2009 05:08:28 +0000 (07:08 +0200)]
Fix a type-punned warning

14 years agos3: tevent_req_poll() loops forever when pipe is broken
Bo Yang [Mon, 18 May 2009 17:13:36 +0000 (01:13 +0800)]
s3: tevent_req_poll() loops forever when pipe is broken

Signed-off-by: Bo Yang <>
14 years agos3:fix bug #6371, unsuccessful net conf setparm leaves empty share
Michael Adam [Sun, 17 May 2009 20:15:02 +0000 (22:15 +0200)]
s3:fix bug #6371, unsuccessful net conf setparm leaves empty share

Wrap creation of share and setting of parameter into a transaction.


14 years agos3-events: Not only timed, also immediate events generate a timeout return
Volker Lendecke [Sun, 17 May 2009 09:43:54 +0000 (11:43 +0200)]
s3-events: Not only timed, also immediate events generate a timeout return

14 years agoMove smb_create_user() in samsync
Simo Sorce [Sat, 16 May 2009 17:04:06 +0000 (13:04 -0400)]
Move smb_create_user() in samsync

It is not used anywhere else, so make it also static and remove
it from proto.h

14 years agotevent: Define TALLOC_FREE() if it's not defined yet, to allow building
Jelmer Vernooij [Sat, 16 May 2009 18:31:59 +0000 (20:31 +0200)]
tevent: Define TALLOC_FREE() if it's not defined yet, to allow building
with released versions of talloc.

14 years agoFix static linking of vfs_notify_fam
Volker Lendecke [Sat, 16 May 2009 16:20:02 +0000 (18:20 +0200)]
Fix static linking of vfs_notify_fam

14 years agoFix a typo
Volker Lendecke [Sat, 16 May 2009 14:05:37 +0000 (16:05 +0200)]
Fix a typo

14 years agos3-events: If immediate requests are pending, the timeout is 0
Volker Lendecke [Sat, 16 May 2009 13:42:53 +0000 (15:42 +0200)]
s3-events: If immediate requests are pending, the timeout is 0

14 years agoFix the merged build -- thanks jelmer for the hint!
Volker Lendecke [Sat, 16 May 2009 17:03:37 +0000 (19:03 +0200)]
Fix the merged build -- thanks jelmer for the hint!

14 years agotevent: Remove python module.
Jelmer Vernooij [Sat, 16 May 2009 12:56:37 +0000 (14:56 +0200)]
tevent: Remove python module.

This module didn't have any functionality that we actually used yet, and
it was quite small.

Tevent is quite low level and perhaps doesn't make much sense to expose
directly as a Python module. It was also causing build problems when used with a
system-tevent. We can always back later if necessary.

14 years agotevent: Install tevent_internal.h in the standalone build.
Jelmer Vernooij [Sat, 16 May 2009 02:14:21 +0000 (04:14 +0200)]
tevent: Install tevent_internal.h in the standalone build.

This is not ideal, but at least it fixes the build of samba-gtk for now.
I've also added a warning about API guarantees at the top of the header.

14 years agoFix linker flags on non-Linux GNU platforms.
Samuel Thibault [Sat, 16 May 2009 02:05:53 +0000 (04:05 +0200)]
Fix linker flags on non-Linux GNU platforms.

(e.g. Debian GNU/kFreeBSD)

Signed-off-by: Jelmer Vernooij <>
14 years agoUpdate copies of config.guess and config.sub.
Jelmer Vernooij [Sat, 16 May 2009 02:03:12 +0000 (04:03 +0200)]
Update copies of config.guess and config.sub.

14 years agotevent: Don't install headers, since we don't install a shared lib
Jelmer Vernooij [Fri, 15 May 2009 23:54:10 +0000 (01:54 +0200)]
tevent: Don't install headers, since we don't install a shared lib
either (from Samba).

14 years agos3-privileges: add privilege_delete_account().
Günther Deschner [Fri, 15 May 2009 23:22:28 +0000 (01:22 +0200)]
s3-privileges: add privilege_delete_account().


14 years agos3-privileges: remove trailing whitespace from privileges codes.
Günther Deschner [Fri, 15 May 2009 23:21:08 +0000 (01:21 +0200)]
s3-privileges: remove trailing whitespace from privileges codes.


14 years agoOops. Forgot to delete now unused local from the previous patch.
Jeremy Allison [Fri, 15 May 2009 23:16:47 +0000 (16:16 -0700)]
Oops. Forgot to delete now unused local from the previous patch.