8 years agobug in source3/winbindd/winbindd_sids_to_xids.c
Herb Lewis [Fri, 10 Jun 2011 06:17:11 +0000 (23:17 -0700)]
bug in source3/winbindd/winbindd_sids_to_xids.c

I'm having trouble getting my system setup to do submits right now but
I discovered a bug in the subject file that causes winbindd lookup sids
command to assign incorrect unix ids. The change to sid_peek_rid fixes
the case where you call lookup sids with sids s1 s2 s3 which cause them
to be cached. then call with s1 s2 s4 and s4 will get the unix id of s1.

The other change fixes the case where a sid that was not translated
gets a value returned instead of being listed as unmapped.

Could someone review this and push to master and 3.6 for me?

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Fri Jun 10 14:35:21 CEST 2011 on sn-devel-104

8 years agoExport init_stat_ex_from_stat for use in VFS modules.
Richard Sharpe [Fri, 3 Jun 2011 15:27:13 +0000 (08:27 -0700)]
Export init_stat_ex_from_stat for use in VFS modules.

Signed-off-by: Günther Deschner <>
Autobuild-User: Günther Deschner <>
Autobuild-Date: Fri Jun 10 13:23:37 CEST 2011 on sn-devel-104

8 years agos4-samba-tool: added dbcheck commmand
Andrew Tridgell [Fri, 10 Jun 2011 07:17:12 +0000 (17:17 +1000)]
s4-samba-tool: added dbcheck commmand

this will be used as a consistency checker and repair tool for
sam.ldb. This initial checkin just checks for empty attributes and
offers to fix them

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Fri Jun 10 10:31:56 CEST 2011 on sn-devel-104

8 years agowaf-symbols: don't look for symbol lists in GENERATOR targets
Andrew Tridgell [Fri, 10 Jun 2011 02:16:59 +0000 (12:16 +1000)]
waf-symbols: don't look for symbol lists in GENERATOR targets

generated header files are not object files

Pair-Programmed-With: Andrew Bartlett <>

8 years agowaf: fixed 'make bin/XXX' for the remaining binaries
Andrew Tridgell [Fri, 10 Jun 2011 01:32:27 +0000 (11:32 +1000)]
waf: fixed 'make bin/XXX' for the remaining binaries

this fixes 'make bin/smbd' to work correctly with the waf build. It
didn't work before as smbd is actually 'smbd/smbd' internally and we
tried to use the target name 'smbd'. The new approach reads the
symlink to get the right target.

This also speeds up the null build by quite a lot

8 years agos3-param Avoid strupper_m() where possible.
Andrew Bartlett [Thu, 9 Jun 2011 23:37:06 +0000 (09:37 +1000)]
s3-param Avoid strupper_m() where possible.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Fri Jun 10 04:37:54 CEST 2011 on sn-devel-104

8 years agos4-librpc Remove unsued server_id4.idl
Andrew Bartlett [Thu, 9 Jun 2011 23:36:37 +0000 (09:36 +1000)]
s4-librpc Remove unsued server_id4.idl

8 years agos4-drs: added debug lines for missing linked attribute fields
Andrew Tridgell [Fri, 10 Jun 2011 00:11:01 +0000 (10:11 +1000)]
s4-drs: added debug lines for missing linked attribute fields

this improved the logging of bugs related to linked attribute

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Fri Jun 10 03:26:21 CEST 2011 on sn-devel-104

8 years agos4-drs: ensure we add a RMD_ADDTIME when upgrading a linked attribute
Andrew Tridgell [Fri, 10 Jun 2011 00:10:04 +0000 (10:10 +1000)]
s4-drs: ensure we add a RMD_ADDTIME when upgrading a linked attribute

if the link was a w2k style, and we are upgrading it, then set the
RMD_ADDTIME to the current time

8 years agos4-drs: cope with missing RMD_ADDTIME in linked attributes
Andrew Tridgell [Thu, 9 Jun 2011 23:10:09 +0000 (09:10 +1000)]
s4-drs: cope with missing RMD_ADDTIME in linked attributes

upgraded links can be missing the RMD_ADDTIME field

8 years agos3:vfs cleanup unused code in vfs_recycle
Christian Ambach [Thu, 26 May 2011 08:32:53 +0000 (10:32 +0200)]
s3:vfs cleanup unused code in vfs_recycle

connect/disconnect do not more than just logging that they
were called. this seems pretty useless

Autobuild-User: Christian Ambach <>
Autobuild-Date: Thu Jun  9 18:59:58 CEST 2011 on sn-devel-104

8 years agos3:net fix a typo
Christian Ambach [Thu, 9 Jun 2011 13:07:15 +0000 (15:07 +0200)]
s3:net fix a typo

fix a typo in the german message file

Autobuild-User: Christian Ambach <>
Autobuild-Date: Thu Jun  9 17:12:24 CEST 2011 on sn-devel-104

8 years agos3:modules fix some non-empty blank lines
Christian Ambach [Tue, 31 May 2011 19:59:24 +0000 (21:59 +0200)]
s3:modules fix some non-empty blank lines

8 years agos3:rpcclient: remove unused new_workgroup variable
Stefan Metzmacher [Thu, 9 Jun 2011 12:38:33 +0000 (14:38 +0200)]
s3:rpcclient: remove unused new_workgroup variable

new_workgroup was not initialized but used to overwrite the
value of lp_workgroup().


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Thu Jun  9 16:00:28 CEST 2011 on sn-devel-104

8 years agos3:lib/util: use %llu consitently (instead of %d) in interpret_pid() to parse the pid
Stefan Metzmacher [Thu, 9 Jun 2011 12:24:03 +0000 (14:24 +0200)]
s3:lib/util: use %llu consitently (instead of %d) in interpret_pid() to parse the pid


8 years agoserver_id.idl: change unique_id to hyper
Stefan Metzmacher [Thu, 9 Jun 2011 12:22:57 +0000 (14:22 +0200)]
server_id.idl: change unique_id to hyper

This makes it consistent to pid.


8 years agos3-selftest Add test for smbclient --authentication-file
Andrew Bartlett [Thu, 9 Jun 2011 06:20:15 +0000 (16:20 +1000)]
s3-selftest Add test for smbclient --authentication-file

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Thu Jun  9 13:49:59 CEST 2011 on sn-devel-104

8 years agos3-param Remove special case for global_myname(), rename to lp_netbios_name()
Andrew Bartlett [Thu, 9 Jun 2011 05:31:03 +0000 (15:31 +1000)]
s3-param Remove special case for global_myname(), rename to lp_netbios_name()

There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides

Andrew Bartlett

8 years agos3-lib Add myhostname_upper()
Andrew Bartlett [Thu, 9 Jun 2011 05:27:53 +0000 (15:27 +1000)]
s3-lib Add myhostname_upper()

This varient always upper cases the hostname, which is needed for the
netbios name.

Andrew Bartlett

8 years agos3-selftest Add a test for 'message command'
Andrew Bartlett [Thu, 9 Jun 2011 05:22:19 +0000 (15:22 +1000)]
s3-selftest Add a test for 'message command'

This also provides us a way to test that the -n option to smbclient
works, as that becomes part of the filename.

Andrew Bartlett

8 years agoserver_id: Change format to vnn:pid.task_id, pid.task_id or pid
Andrew Bartlett [Thu, 9 Jun 2011 01:18:15 +0000 (11:18 +1000)]
server_id: Change format to vnn:pid.task_id, pid.task_id or pid

This helps ensure the string cannot be ambiguous, while also ensuring
that it remains simple in the non-cluster case.

The asymmetry of reading get_my_vnn() but writing based on
NONCLUSTER_VNN is acceptable because in the non-clustered case, they
are equal, and in the clustered case we will print the full string.

Andrew Bartlett

8 years agos3-param Remove special case for global_scope()
Andrew Bartlett [Wed, 8 Jun 2011 06:27:06 +0000 (16:27 +1000)]
s3-param Remove special case for global_scope()

There is no reason this can't be a normal constant string in the
loadparm system.  (Past reasons were that we didn't have lp_set_cmdline())

Andrew Bartlett

8 years agos3-param Remove special case for lp_workgroup()
Andrew Bartlett [Wed, 8 Jun 2011 05:42:22 +0000 (15:42 +1000)]
s3-param Remove special case for lp_workgroup()

There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides

Andrew Bartlett

8 years agos3-libsmbclient Use workgroup from libsmbclient caller for domain in credentials
Andrew Bartlett [Wed, 8 Jun 2011 05:41:24 +0000 (15:41 +1000)]
s3-libsmbclient Use workgroup from libsmbclient caller for domain in credentials

This previously set the workgroup, which is a different thing, but
would have been the default if no domain was specified).  This more
clearly sets the information from the credentials file into the
matching field in the credentials structure.

Andrew Bartlett

8 years agos3-lib Use domain in credentials file for domain in credentials
Andrew Bartlett [Wed, 8 Jun 2011 05:35:02 +0000 (15:35 +1000)]
s3-lib Use domain in credentials file for domain in credentials

This previously set the workgroup, which is a different thing, but
would have been the default if no domain was specified).  This more
clearly sets the information from the credentials file into the
matching field in the credentials structure.

Andrew Bartlett

8 years agos4-param add const to loadparm_init_s3 s3_fns
Andrew Bartlett [Wed, 8 Jun 2011 05:52:42 +0000 (15:52 +1000)]
s4-param add const to loadparm_init_s3 s3_fns

8 years agolib/util Bring procid_str() into lib/util as server_id_string()
Andrew Bartlett [Wed, 8 Jun 2011 04:05:55 +0000 (14:05 +1000)]
lib/util Bring procid_str() into lib/util as server_id_string()

This is needed for OpenChange, which prints Samba struct server_id
values in debug messages.

Andrew Bartlett

8 years agos3-lib Read and write the full struct server_id (except the unique_id)
Andrew Bartlett [Wed, 8 Jun 2011 02:47:59 +0000 (12:47 +1000)]
s3-lib Read and write the full struct server_id (except the unique_id)

This is in preperation for making this code the common, only reader
and writer of this structure.

Andrew Bartlett

8 years agolibrpc/idr Use the Samba3 notify.idl in common.
Andrew Bartlett [Mon, 2 May 2011 01:10:12 +0000 (11:10 +1000)]
librpc/idr Use the Samba3 notify.idl in common.

The extra fields in the structure that Samba4 does not use should not
bother it.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <>
8 years agoserver_id.idl: Bring server_id.idl in common
Andrew Bartlett [Mon, 2 May 2011 00:55:20 +0000 (10:55 +1000)]
server_id.idl: Bring server_id.idl in common

Andrew Bartlett

Signed-off-by: Andrew Tridgell <>
8 years agos3-server_id change pid to hyper
Andrew Bartlett [Mon, 2 May 2011 00:37:31 +0000 (10:37 +1000)]
s3-server_id change pid to hyper

This matches Samba4's server_id.

Signed-off-by: Andrew Tridgell <>
8 years agos3-server_id Add task_id to server_id to match Samba4
Andrew Bartlett [Mon, 2 May 2011 00:27:36 +0000 (10:27 +1000)]
s3-server_id Add task_id to server_id to match Samba4

This will allow this structure to be shared, and allow us to create a
common messaging system between all Samba processes.  Samba4 uses the
task_id to indicate the different tasks within a single unix process.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <>
8 years agos4-cluster Use task_id instead of id2 to clarify server_id structure
Andrew Bartlett [Sun, 8 May 2011 16:28:17 +0000 (18:28 +0200)]
s4-cluster Use task_id instead of id2 to clarify server_id structure

This seems a clearer and more acceptable name.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <>
8 years agos3-talloc Change TALLOC_MEMDUP() to talloc_memdup()
Andrew Bartlett [Tue, 7 Jun 2011 02:13:26 +0000 (12:13 +1000)]
s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()

Using the standard macro makes it easier to move code into common, as
TALLOC_MEMDUP isn't standard talloc.

8 years agos3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Andrew Bartlett [Tue, 7 Jun 2011 01:58:39 +0000 (11:58 +1000)]
s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()

Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.

8 years agos3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Andrew Bartlett [Tue, 7 Jun 2011 01:44:43 +0000 (11:44 +1000)]
s3-talloc Change TALLOC_ZERO_P() to talloc_zero()

Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.

8 years agos3-talloc Change TALLOC_P() to talloc()
Andrew Bartlett [Tue, 7 Jun 2011 01:38:41 +0000 (11:38 +1000)]
s3-talloc Change TALLOC_P() to talloc()

Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.

8 years agos3-talloc Change TALLOC_ARRAY() to talloc_array()
Andrew Bartlett [Tue, 7 Jun 2011 01:30:12 +0000 (11:30 +1000)]
s3-talloc Change TALLOC_ARRAY() to talloc_array()

Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.

8 years agos3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Andrew Bartlett [Tue, 7 Jun 2011 01:10:15 +0000 (11:10 +1000)]
s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()

Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett

8 years agos3-talloc Remove unused TALLOC zeronull functions and macro definitions
Andrew Bartlett [Tue, 7 Jun 2011 01:03:16 +0000 (11:03 +1000)]
s3-talloc Remove unused TALLOC zeronull functions and macro definitions

These have been under #if 0 for a long time now.

Andrew Bartlett

8 years agos4:rpc_server/dcesrv_samr.c - quiet enum warnings
Matthias Dieter Wallnöfer [Wed, 8 Jun 2011 17:02:37 +0000 (19:02 +0200)]
s4:rpc_server/dcesrv_samr.c - quiet enum warnings

When we are acting in the role of a PDC then please return it as status information.

Reviewed-by: Tridge
Autobuild-User: Matthias Dieter Wallnöfer <>
Autobuild-Date: Thu Jun  9 12:06:36 CEST 2011 on sn-devel-104

8 years agos4:ntvfs subsystem - quiet enum warnings
Matthias Dieter Wallnöfer [Wed, 8 Jun 2011 17:00:18 +0000 (19:00 +0200)]
s4:ntvfs subsystem - quiet enum warnings

Simply return "NT_STATUS_INVALID_LEVEL" for unknown types of requests.

Reviewed-by: Tridge
8 years agos4:libnet/libnet_rpc.c - quiet an enum warning
Matthias Dieter Wallnöfer [Wed, 8 Jun 2011 16:58:45 +0000 (18:58 +0200)]
s4:libnet/libnet_rpc.c - quiet an enum warning

Other enum types have been checked before.

Reviewed-by: Tridge
8 years agos4:winbind/wb_samba3_protocol.c - quiet enum warning
Matthias Dieter Wallnöfer [Wed, 8 Jun 2011 16:57:00 +0000 (18:57 +0200)]
s4:winbind/wb_samba3_protocol.c - quiet enum warning

Don't enumerate all unimplemented types of call which simply leads to

Reviewed-by: Tridge
8 years agos4:schema_convert_to_ol.c - fix memory contexts
Matthias Dieter Wallnöfer [Thu, 9 Jun 2011 07:17:16 +0000 (09:17 +0200)]
s4:schema_convert_to_ol.c - fix memory contexts

- Add more "mem_ctx" free functions on error cases
- Steal the "out" string directly onto the LDB context to be able to free
  the local "mem_ctx"

Reviewed-by: Tridge
8 years agos4:dsdb/schema_convert_to_ol.c - quiet enum warning
Matthias Dieter Wallnöfer [Wed, 8 Jun 2011 16:55:23 +0000 (18:55 +0200)]
s4:dsdb/schema_convert_to_ol.c - quiet enum warning

Introduce a error message when choosing wrong targets.

Reviewed-by: Tridge
8 years agos4:auth/ntlm/auth.c - fix incompatible pointer type warning
Matthias Dieter Wallnöfer [Wed, 8 Jun 2011 07:36:59 +0000 (09:36 +0200)]
s4:auth/ntlm/auth.c - fix incompatible pointer type warning

Reviewed-by: Tridge
8 years agos3:auth/auth_samba4.c - remove unused variable
Matthias Dieter Wallnöfer [Wed, 8 Jun 2011 17:04:48 +0000 (19:04 +0200)]
s3:auth/auth_samba4.c - remove unused variable

Reviewed-by: Tridge
8 years agos3:passdb/pdb_samba4.c - remove unused variable
Matthias Dieter Wallnöfer [Mon, 6 Jun 2011 20:41:18 +0000 (22:41 +0200)]
s3:passdb/pdb_samba4.c - remove unused variable

Reviewed-by: Tridge
8 years agos4:smbd/server.c - quiet "time_t" format string warnings by casts
Matthias Dieter Wallnöfer [Mon, 6 Jun 2011 20:40:20 +0000 (22:40 +0200)]
s4:smbd/server.c - quiet "time_t" format string warnings by casts

Reviewed-by: Tridge
8 years agos3:passdb/pdb_samba4.c - fix a format specifier warning
Matthias Dieter Wallnöfer [Mon, 6 Jun 2011 20:34:00 +0000 (22:34 +0200)]
s3:passdb/pdb_samba4.c - fix a format specifier warning

Reviewed-by: Tridge
8 years agos4:librpc/rpc/dcerpc.c - janitorial: use "void" for functions without arguments
Matthias Dieter Wallnöfer [Mon, 6 Jun 2011 10:50:16 +0000 (12:50 +0200)]
s4:librpc/rpc/dcerpc.c - janitorial: use "void" for functions without arguments

Probably a mistake in commit 907cdb5de7f16a2540299aeba211bf2a5ae6fafe.

Reviewed-by: Tridge
8 years agoldb:ldb_msg.c - move away from "errno"
Matthias Dieter Wallnöfer [Thu, 26 May 2011 07:25:16 +0000 (09:25 +0200)]
ldb:ldb_msg.c - move away from "errno"

Reviewed-by: Tridge
8 years agosamba-tool: added --local option to drs replicate command
Andrew Tridgell [Thu, 9 Jun 2011 05:01:30 +0000 (15:01 +1000)]
samba-tool: added --local option to drs replicate command

this allows replication directly to the local SAM, which means it can
run without the samba daemon running. It also bypasses all usnChanged
checks, which is useful for forcing replication of a set of objects
which are not marked as replication being needed

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Thu Jun  9 08:15:10 CEST 2011 on sn-devel-104

8 years agos4-ipv6: don't default to in provision
Andrew Tridgell [Thu, 9 Jun 2011 05:00:03 +0000 (15:00 +1000)]
s4-ipv6: don't default to in provision

it is better to just leave the IPv4 address out of the zone file

Pair-Programmed-With: Andrew Bartlett <>

8 years agoEnsure when creating a directory, if we make any changes due to inheritance parameter...
Jeremy Allison [Wed, 8 Jun 2011 21:36:12 +0000 (14:36 -0700)]
Ensure when creating a directory, if we make any changes due to inheritance parameters, we update the stat returned.

Autobuild-User: Jeremy Allison <>
Autobuild-Date: Thu Jun  9 00:46:39 CEST 2011 on sn-devel-104

8 years agoPart 4 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
Jeremy Allison [Wed, 8 Jun 2011 21:26:02 +0000 (14:26 -0700)]
Part 4 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with "inherit permissions = yes" and POSIX ACLs

We don't need to check mode bits as well as dev/ino to
ensure we're in the same place.

8 years agos3:selftest: add a few more raw.* tests
Stefan Metzmacher [Mon, 28 Mar 2011 06:23:27 +0000 (08:23 +0200)]
s3:selftest: add a few more raw.* tests


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Wed Jun  8 18:57:01 CEST 2011 on sn-devel-104

8 years agos3:libsmb/cli_np_tstream: s/TSTREAM_CLI_NP_BUF_SIZE/TSTREAM_CLI_NP_MAX_BUF_SIZE
Stefan Metzmacher [Tue, 7 Jun 2011 16:49:55 +0000 (18:49 +0200)]

This isn't the fixed buffer size anymore, as we use dynamic beffer
it's just the maximum size.


8 years agos3:libsmb:cli_np_tstream: use dynamic talloc buffers
Stefan Metzmacher [Tue, 7 Jun 2011 16:45:54 +0000 (18:45 +0200)]
s3:libsmb:cli_np_tstream: use dynamic talloc buffers

Having 8192 bytes on an idle connection is a bit to much,
so we better use dynamic buffers using talloc, which also
avoids a memcpy in the common SMBtrans readv codepath.


8 years agos3-winbind: always use samlogon cache for wbinfo -r, even when caching is
Günther Deschner [Wed, 8 Jun 2011 13:48:12 +0000 (15:48 +0200)]
s3-winbind: always use samlogon cache for wbinfo -r, even when caching is


Autobuild-User: Günther Deschner <>
Autobuild-Date: Wed Jun  8 17:45:56 CEST 2011 on sn-devel-104

8 years agos3-winbindd: make sure we obey the -n switch also for samlogon cache access.
Günther Deschner [Wed, 8 Jun 2011 10:56:10 +0000 (12:56 +0200)]
s3-winbindd: make sure we obey the -n switch also for samlogon cache access.


Autobuild-User: Günther Deschner <>
Autobuild-Date: Wed Jun  8 14:44:31 CEST 2011 on sn-devel-104

8 years agos3-spoolss: fix -Wunused-but-set-variable build warning in _spoolss_EnumPrintProcData...
Günther Deschner [Wed, 8 Jun 2011 10:00:46 +0000 (12:00 +0200)]
s3-spoolss: fix -Wunused-but-set-variable build warning in _spoolss_EnumPrintProcDataTypes().

We were in fact ignoring the error code here.


8 years agotdb: enable VALGRIND to remove valgrind noise.
Rusty Russell [Wed, 8 Jun 2011 07:50:48 +0000 (17:20 +0930)]
tdb: enable VALGRIND to remove valgrind noise.

Andrew Bartlett complained that valgrind needs --partial-loads-ok=yes otherwise
the Jenkins hash makes it complain.

My benchmarking here revealed that at least with modern gcc (4.5) and CPU
(Intel i5 32 bit) there's no measurable performance penalty for the
"correct" code, so rip out the optimized one.

Signed-off-by: Rusty Russell <>
Autobuild-User: Rusty Russell <>
Autobuild-Date: Wed Jun  8 11:05:47 CEST 2011 on sn-devel-104

8 years agos4-ipv6: fill in pdc_ip in DsRGetDCNameEx2
Andrew Tridgell [Wed, 8 Jun 2011 01:49:24 +0000 (11:49 +1000)]
s4-ipv6: fill in pdc_ip in DsRGetDCNameEx2

this may be different from the CLDAP response, as it can be IPv6

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Wed Jun  8 06:07:29 CEST 2011 on sn-devel-104

8 years agos4-wins: ensure we only use IPv4 for WINS owner
Andrew Tridgell [Wed, 8 Jun 2011 00:42:02 +0000 (10:42 +1000)]
s4-wins: ensure we only use IPv4 for WINS owner

8 years agos4-interface: raise the debug level for interface discovery
Andrew Tridgell [Wed, 8 Jun 2011 00:41:38 +0000 (10:41 +1000)]
s4-interface: raise the debug level for interface discovery

8 years agos4-gensec bring GSS_S_CONTEXT_EXPIRED into it's own error handler
Andrew Bartlett [Tue, 7 Jun 2011 22:55:19 +0000 (08:55 +1000)]
s4-gensec bring GSS_S_CONTEXT_EXPIRED into it's own error handler

This allows us to print much more debugging in this critical situation.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Wed Jun  8 04:19:58 CEST 2011 on sn-devel-104

8 years agos4-credentials Don't use expired Kerberos or GSSAPI credentials
Andrew Bartlett [Tue, 7 Jun 2011 22:53:16 +0000 (08:53 +1000)]
s4-credentials Don't use expired Kerberos or GSSAPI credentials

In a long-lived credentials cache situation, we may need to refetch
the ticket after (say) 10 hours.  This code should help that happen,
by checking the lifetime before returning any credentials cache or
GSSAPI credentials.

Andrew Bartlett

8 years agos4-credentials Allow use of file-based credentials caches for debugging.
Andrew Bartlett [Tue, 7 Jun 2011 22:51:56 +0000 (08:51 +1000)]
s4-credentials Allow use of file-based credentials caches for debugging.

This means that we will leave a slew of file based credentials caches
in /tmp, which should give some clues to the administrator or
developer via klist as to what has gone wrong.

Andrew Bartlett

8 years agoPart 3 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
Jeremy Allison [Tue, 7 Jun 2011 23:55:20 +0000 (16:55 -0700)]
Part 3 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with "inherit permissions = yes" and POSIX ACLs

When changing ownership on a new file make sure we
must have a valid stat struct before making the inheritance
calls (as they may look at it), and if we make changes we
must have a valid stat struct after them.

Autobuild-User: Jeremy Allison <>
Autobuild-Date: Wed Jun  8 03:07:04 CEST 2011 on sn-devel-104

8 years agoPart 2 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
Jeremy Allison [Tue, 7 Jun 2011 23:48:14 +0000 (16:48 -0700)]
Part 2 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with "inherit permissions = yes" and POSIX ACLs

When changing ownership on a new file make sure we
also change the returned stat struct to have the correct uid.

8 years agoPart 1 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
Jeremy Allison [Tue, 7 Jun 2011 23:42:02 +0000 (16:42 -0700)]
Part 1 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with "inherit permissions = yes" and POSIX ACLs

When changing ownership on a new directory make sure we
also change the returned stat struct to have the correct uid.

8 years agoFix re-opened bug 8083 - "inherit owner = yes" doesn't interact correctly with vfs_ac...
Jeremy Allison [Tue, 7 Jun 2011 18:54:35 +0000 (11:54 -0700)]
Fix re-opened bug 8083 - "inherit owner = yes" doesn't interact correctly with vfs_acl_xattr or vfs_acl_tdb module.

Fix incorrect interaction when all of

"inherit permissions = yes"
"inherit acls = yes"
"inherit owner = yes"

are set. Found by Björn Jacke. Thanks Björn !

Autobuild-User: Jeremy Allison <>
Autobuild-Date: Tue Jun  7 22:32:18 CEST 2011 on sn-devel-104

8 years agos3:libsmb/cli_np_tstream: use larger buffers to avoid a bug NT4 servers (bug #8195)
Stefan Metzmacher [Tue, 7 Jun 2011 16:27:41 +0000 (18:27 +0200)]
s3:libsmb/cli_np_tstream: use larger buffers to avoid a bug NT4 servers (bug #8195)

NT4 servers return NT_STATUS_PIPE_BUSY if we try a SMBtrans
and the SMBwriteX before hasn't transmited the whole DCERPC fragment.

W2K and above is happy with that.

As a result we try to match the behavior of Windows and older Samba clients,
they use write and read buffers of 4280 bytes instead of 1024 bytes.
On Windows only the SMBtrans based read uses 1024 (while we also use 4280


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Tue Jun  7 20:25:32 CEST 2011 on sn-devel-104

8 years agos3:idmap_autorid: fail initialization if the domain is not "*"
Michael Adam [Tue, 7 Jun 2011 13:53:49 +0000 (15:53 +0200)]
s3:idmap_autorid: fail initialization if the domain is not "*"

autorid can only be used as a backend for the default idmap configuration.

Autobuild-User: Michael Adam <>
Autobuild-Date: Tue Jun  7 19:13:18 CEST 2011 on sn-devel-104

8 years agos3:docs: fix the example in the idmap_autorid manpage to use "idmap config * : rangesize"
Michael Adam [Tue, 7 Jun 2011 13:21:34 +0000 (15:21 +0200)]
s3:docs: fix the example in the idmap_autorid manpage to use "idmap config * : rangesize"

8 years agos3:idmap_autorid: use "idmap config <DOMAIN> : rangesize" instead of "autorid:rangesize"
Michael Adam [Tue, 7 Jun 2011 11:02:04 +0000 (13:02 +0200)]
s3:idmap_autorid: use "idmap config <DOMAIN> : rangesize" instead of "autorid:rangesize"

8 years agos3:idmap_autorid: add a talloc_stackframe() to idmap_autorid_initialize()
Michael Adam [Tue, 7 Jun 2011 13:16:24 +0000 (15:16 +0200)]
s3:idmap_autorid: add a talloc_stackframe() to idmap_autorid_initialize()

8 years agos4-cldap: fixed the CLDAP response for IPv6 clients
Andrew Tridgell [Tue, 7 Jun 2011 05:46:17 +0000 (15:46 +1000)]
s4-cldap: fixed the CLDAP response for IPv6 clients

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Tue Jun  7 08:57:48 CEST 2011 on sn-devel-104

8 years agos4-ipv6: fixed a crash in the IPv6 DNS code
Andrew Tridgell [Tue, 7 Jun 2011 04:10:38 +0000 (14:10 +1000)]
s4-ipv6: fixed a crash in the IPv6 DNS code

8 years agos4-dns: fixed samba_tool -> samba-tool
Andrew Tridgell [Tue, 7 Jun 2011 03:46:24 +0000 (13:46 +1000)]
s4-dns: fixed samba_tool -> samba-tool

8 years agos4-build: install a build link bin/provision
Andrew Tridgell [Tue, 7 Jun 2011 03:15:15 +0000 (13:15 +1000)]
s4-build: install a build link bin/provision

8 years agoselftest: Fix 'make quicktest' on systems without LDAP development support
Andrew Bartlett [Tue, 7 Jun 2011 03:22:58 +0000 (13:22 +1000)]
selftest: Fix 'make quicktest' on systems without LDAP development support

This should ensure that we don't run the Samba3/Samba4 integration
tests on machines without ADS support.

(Some samba3 tests in the full 'make test' may still fail however)

Andrew Bartlett

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Tue Jun  7 07:17:32 CEST 2011 on sn-devel-104

8 years agos4-provision: fixed detection of V4/V6 addresses
Andrew Tridgell [Tue, 7 Jun 2011 02:55:31 +0000 (12:55 +1000)]
s4-provision: fixed detection of V4/V6 addresses

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Tue Jun  7 06:07:24 CEST 2011 on sn-devel-104

8 years agos4-ipv6: fixed iface_list_same_net() for IPv6
Andrew Tridgell [Tue, 7 Jun 2011 02:55:09 +0000 (12:55 +1000)]
s4-ipv6: fixed iface_list_same_net() for IPv6

8 years agos4-ipv6: fixed DNS handling with new IPv6 code
Andrew Tridgell [Tue, 7 Jun 2011 02:35:10 +0000 (12:35 +1000)]
s4-ipv6: fixed DNS handling with new IPv6 code

8 years agos4-dsdb: cope with missing backlinks in rpmd handling
Andrew Tridgell [Tue, 7 Jun 2011 00:44:48 +0000 (10:44 +1000)]
s4-dsdb: cope with missing backlinks in rpmd handling

if backlinks have not propogated correctly in a previous replication
this allows us to recover

8 years agos4-netlogon: force an IPv4 address
Andrew Tridgell [Mon, 6 Jun 2011 05:19:16 +0000 (15:19 +1000)]
s4-netlogon: force an IPv4 address

this interface is currently V4 only, don't try and return a V6 address
in a V4 structure

8 years agos4-ipv6: fix iface_list_best_ip() for IPv6
Andrew Tridgell [Mon, 6 Jun 2011 05:18:12 +0000 (15:18 +1000)]
s4-ipv6: fix iface_list_best_ip() for IPv6

return an interface with the same address family as the target

8 years agos3-docs Add documentation for ncalrpc dir
Andrew Bartlett [Mon, 6 Jun 2011 23:47:26 +0000 (09:47 +1000)]
s3-docs Add documentation for ncalrpc dir

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Tue Jun  7 02:57:33 CEST 2011 on sn-devel-104

8 years agos3-auth Use loadparm_init_s3() to get an lp_ctx for auth_samba4
Andrew Bartlett [Mon, 6 Jun 2011 23:09:16 +0000 (09:09 +1000)]
s3-auth Use loadparm_init_s3() to get an lp_ctx for auth_samba4

This avoids loading the smb.conf twice.

Andrew Bartlett

8 years agos4-auth Move default auth methods back into auth.c
Andrew Bartlett [Mon, 6 Jun 2011 23:07:52 +0000 (09:07 +1000)]
s4-auth Move default auth methods back into auth.c

This changes auth_methods_from_lp to no longer use the parametric
options, and to cope with ROLE_DOMAIN_BDC and ROLE_DOMAIN_PDC.  This
will assist in calling the source4 auth subsystem with a source3
derived lp_ctx.

Andrew Bartlett

8 years agos3: Remove unused variables
Volker Lendecke [Mon, 6 Jun 2011 20:31:33 +0000 (22:31 +0200)]
s3: Remove unused variables

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Tue Jun  7 00:42:51 CEST 2011 on sn-devel-104

8 years agos3-waf: Fix pthreadpool build which needs librt now.
Andreas Schneider [Mon, 6 Jun 2011 20:22:34 +0000 (22:22 +0200)]
s3-waf: Fix pthreadpool build which needs librt now.

Autobuild-User: Andreas Schneider <>
Autobuild-Date: Mon Jun  6 23:31:09 CEST 2011 on sn-devel-104

8 years agoFix bug #8197 - winbind does not properly detect when a DC connection is dead.
Jeremy Allison [Fri, 3 Jun 2011 17:22:44 +0000 (10:22 -0700)]
Fix bug #8197 - winbind does not properly detect when a DC connection is dead.

Only waiting for writability doesn't get fd errors back with poll.
So always begin by selecting for readability, and if we get it then
see if bytes were available to read or it really is an error condition.

If bytes were available, remove the select on read as we know we
will retrieve the error when we've finished writing and start
reading the reply (or the write will timeout or fail).

Metze and Volker please check.

Autobuild-User: Jeremy Allison <>
Autobuild-Date: Mon Jun  6 21:53:16 CEST 2011 on sn-devel-104

8 years agos3: Remove a pointless if-statement
Volker Lendecke [Mon, 6 Jun 2011 15:03:06 +0000 (17:03 +0200)]
s3: Remove a pointless if-statement

We are here only if we have more than one num_pending

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Mon Jun  6 18:21:17 CEST 2011 on sn-devel-104

8 years agos3: Fix two debug messages
Volker Lendecke [Mon, 6 Jun 2011 10:41:26 +0000 (12:41 +0200)]
s3: Fix two debug messages

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Mon Jun  6 14:11:06 CEST 2011 on sn-devel-104

8 years agos4/server: simplify and replace bad portable gettimeofday by time
Björn Jacke [Sun, 5 Jun 2011 19:32:11 +0000 (21:32 +0200)]
s4/server: simplify and replace bad portable gettimeofday by time

Signed-off-by: Stefan Metzmacher <>
Autobuild-User: Björn Jacke <>
Autobuild-Date: Mon Jun  6 12:58:26 CEST 2011 on sn-devel-104

8 years agos3/pthreadpool: replace bad portable gettimeofday by clock_gettime
Björn Jacke [Sun, 5 Jun 2011 19:30:16 +0000 (21:30 +0200)]
s3/pthreadpool: replace bad portable gettimeofday by clock_gettime

Signed-off-by: Stefan Metzmacher <>