Jeremy Allison [Fri, 16 Jan 2009 20:25:35 +0000 (12:25 -0800)]
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Jeremy Allison [Fri, 16 Jan 2009 19:55:01 +0000 (11:55 -0800)]
"First thing, kill all the language lawyers" :-). Ensure possible insane compilers
can't kill us later.
Jeremy.
Gerald (Jerry) Carter [Fri, 16 Jan 2009 18:06:49 +0000 (12:06 -0600)]
ads_connect: Return immediately on a failed GC connection.
ads_connect_gc() feeds an explicit server to ads_connect(). However, if the
resulting connection fails, the latter function was attempting to find a DC
on its own and continuing the connection. This resulting in GC searches being
sent over a connection using port 389 which would fail when using the base
search suffix outside of the domain naming context.
The fix is to fail immediately in ads_connect() since the GC lookup ordering
is handled already in ads_connect_gc().
Jelmer Vernooij [Fri, 16 Jan 2009 16:37:40 +0000 (17:37 +0100)]
loadparm: Make sure various state variables get initialized even when we
couldn't load a default smb.conf file.
Jelmer Vernooij [Fri, 16 Jan 2009 14:51:46 +0000 (15:51 +0100)]
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Jelmer Vernooij [Fri, 16 Jan 2009 14:50:58 +0000 (15:50 +0100)]
Add copyright headers.
Jelmer Vernooij [Fri, 16 Jan 2009 14:50:03 +0000 (15:50 +0100)]
s4/NEWS: Remove mention of no longer existing js parameter.
Stefan Metzmacher [Wed, 14 Jan 2009 11:09:46 +0000 (12:09 +0100)]
s3:cluster: fix ctdb ipv6 support
We need to use CTDB_CONTROL_TCP_CLIENT instead of CTDB_CONTROL_TCP_ADD.
CTDB_CONTROL_TCP_CLIENT has support for 2 modes in newer ctdb versions:
- with struct ctdb_control_tcp it only supports ipv4.
- with struct ctdb_control_tcp_addr it supports ipv4 and ipv6.
You need new header files which defines struct ctdb_control_tcp_addr,
but at runtime it should be fine to work against older
ctdb versions (<= 1.0.68).
metze
Stefan Metzmacher [Wed, 14 Jan 2009 10:52:01 +0000 (11:52 +0100)]
s3:docs: vfs_fileid manpage
metze
Stefan Metzmacher [Wed, 14 Jan 2009 12:59:09 +0000 (13:59 +0100)]
s3:vfs_fileid: readd "fileid:algorithm" as option.
"fileid:mapping" is still supported as fallback.
metze
Jelmer Vernooij [Fri, 16 Jan 2009 14:05:15 +0000 (15:05 +0100)]
Find default smb.conf path correctly, when it was not specified on the
command-line.
Volker Lendecke [Fri, 16 Jan 2009 10:26:05 +0000 (11:26 +0100)]
remove the old chain_reply code
Volker Lendecke [Fri, 21 Nov 2008 22:17:31 +0000 (23:17 +0100)]
Correctly calculate the offset for read&x
Volker Lendecke [Mon, 10 Nov 2008 09:01:26 +0000 (10:01 +0100)]
Add a new implementation of chain_reply
This the global variable "orig_inbuf" in the old chain_reply code. This global
variable was one of the reasons why we had the silly restriction to not allow
async requests within a request chain.
Günther Deschner [Fri, 16 Jan 2009 01:59:05 +0000 (02:59 +0100)]
s3-eventlog: fix _eventlog_CloseEventLog.
Guenther
Kai Blin [Fri, 16 Jan 2009 06:32:30 +0000 (07:32 +0100)]
s4-winbind: Remove a "knownfail" entry for the now implemented LIST_GROUPS
Tim Prouty [Fri, 16 Jan 2009 05:59:20 +0000 (21:59 -0800)]
s3: Remove an incorrect const
Michael Adam [Thu, 15 Jan 2009 23:50:45 +0000 (00:50 +0100)]
s3: put the gpo cache dir under cache_dir instead of lock_dir
Michael
Michael Adam [Thu, 15 Jan 2009 23:48:29 +0000 (00:48 +0100)]
s3: put printing/ under cache_dir, not lock_dir
Michael
Michael Adam [Thu, 15 Jan 2009 23:44:55 +0000 (00:44 +0100)]
s3: put netsamlogon_cache.tdb into cache_dir instead of lock_dir
Michael
Michael Adam [Thu, 15 Jan 2009 23:40:48 +0000 (00:40 +0100)]
s3:put the browse list into cache_dir, not lock_dir.
Michael
Michael Adam [Thu, 15 Jan 2009 23:31:17 +0000 (00:31 +0100)]
s3:winbindd: put winbindd_cache.tdb into cache_dir, not lock_dir.
Michael
Michael Adam [Thu, 15 Jan 2009 23:30:36 +0000 (00:30 +0100)]
s3:passdb: put login_cache.tdb into cache_dir, not lock_dir.
Michael
Michael Adam [Thu, 15 Jan 2009 23:17:51 +0000 (00:17 +0100)]
s3:libads: use lock_path for creating paths to local krb5.conf files
instead of manually doing an asprintf with lp_lockdir()
Michael
squash
Michael Adam [Thu, 15 Jan 2009 23:10:29 +0000 (00:10 +0100)]
s3:libads: give create_local_private_krb5_conf_for_domain() a common exit point
Michael
Michael Adam [Thu, 15 Jan 2009 22:43:00 +0000 (23:43 +0100)]
s3:vfs_xattr_tdb: don't leak state_path() to talloc_tos in xattr_tdb_init().
Michael
Michael Adam [Thu, 15 Jan 2009 22:34:00 +0000 (23:34 +0100)]
s3:nmbd: don't leak state_path() to talloc_tos() in wins_write_database()
Michael
Michael Adam [Thu, 15 Jan 2009 22:31:17 +0000 (23:31 +0100)]
s3:vfs_acl_tdb: don't leak state_path() to talloc_tos() in acl_tdb_init()
Michael
Jeremy Allison [Thu, 15 Jan 2009 23:55:17 +0000 (15:55 -0800)]
Fix bug #6040 - Missing <th> header in Status page.
Based on a patch from pkg-samba-maint@lists.alioth.debian.org.
Jeremy.
Jeremy Allison [Thu, 15 Jan 2009 23:52:41 +0000 (15:52 -0800)]
Allow reinit_after_fork to be called safely from within swat and other binaries that don't have
an event context or a msg context. Fixes crash bug in swat.
Jeremy.
Günther Deschner [Thu, 15 Jan 2009 23:25:57 +0000 (00:25 +0100)]
winreg: fix winreg_EnumValue callers.
Guenther
Günther Deschner [Thu, 15 Jan 2009 22:24:52 +0000 (23:24 +0100)]
s3: re-run make samba3-idl.
Guenther
Günther Deschner [Thu, 15 Jan 2009 22:23:08 +0000 (23:23 +0100)]
winreg: fix winreg_EnumValue by re-adding winreg_ValNameBuf from 3.3/3.2.
This fixes viewing samba registry with windows tools like regedit and eventviewer.
Michael, Jelmer, please check.
Guenther
Günther Deschner [Thu, 15 Jan 2009 23:25:31 +0000 (00:25 +0100)]
lib: add strlen_m_term_null from s3.
Guenther
Günther Deschner [Thu, 15 Jan 2009 14:33:20 +0000 (15:33 +0100)]
s3-util: for convenience, provide format comments in tdb_unpack().
Guenther
Günther Deschner [Thu, 15 Jan 2009 19:01:30 +0000 (20:01 +0100)]
s3-eventlog: remove whitespace.
Guenther
Günther Deschner [Wed, 14 Jan 2009 17:09:25 +0000 (18:09 +0100)]
s3-eventlog: some minor code cleanup in eventlog server.
Guenther
Günther Deschner [Wed, 14 Jan 2009 15:59:42 +0000 (16:59 +0100)]
s4-smbtorture: fix RPC-EVENTLOG test.
Guenther
Simo Sorce [Thu, 15 Jan 2009 23:05:45 +0000 (18:05 -0500)]
Fix LDB_MODULESDIR for ldb standalone builds
Tim Prouty [Thu, 15 Jan 2009 18:59:49 +0000 (10:59 -0800)]
librpc: Re-run make idl_full
Tim Prouty [Thu, 15 Jan 2009 18:57:00 +0000 (10:57 -0800)]
librpc: Change a uint16 to use the max property instead of range
This fixes a "comparison is always false due to limited range of data
type" warning
Tim Prouty [Thu, 15 Jan 2009 18:51:57 +0000 (10:51 -0800)]
pidl: Add max property to be used instead of range for unsigned types.
Compilers complain about ranges starting at 0 for unsigned types,
since an unsigned type is never less than 0. The max property
implicitly makes 0 the lower bound when used with unsigned types.
Stefan Metzmacher [Thu, 15 Jan 2009 12:46:38 +0000 (13:46 +0100)]
packaging(RHEL-CTDB): export CC - really use ccache...
metze
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Thu, 15 Jan 2009 21:27:52 +0000 (22:27 +0100)]
s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:
* When building a new package with a new Samba version
* building in a git branch after calling mkversion.sh
after a new commit (i.e. virtually always)
This patch improves the situation in the following way:
* remove inlude "version.h" from includes.h
* Use samba_version_string() instead of SAMBA_VERSION_STRING
in files that use no other macro from version.h instead of
SAMBA_VERSION_STRING.
* explicitly include "version.h" in those files that use more
macros from "version.h" than just SAMBA_VERSION_STRING.
Michael
Jelmer Vernooij [Thu, 15 Jan 2009 20:22:34 +0000 (21:22 +0100)]
Use AS_HELP_STRING() in a couple more places.
Jelmer Vernooij [Wed, 26 Nov 2008 18:06:10 +0000 (19:06 +0100)]
Fix indentation for some configure options.
Jelmer Vernooij [Thu, 15 Jan 2009 20:16:31 +0000 (21:16 +0100)]
python/param: Cope with lp configfile being NULL.
Jeremy Allison [Thu, 15 Jan 2009 18:29:34 +0000 (10:29 -0800)]
Fix bug #6040 - Calling Samba print server with an aliased DNS-name fails.
Jeremy.
Kai Blin [Thu, 15 Jan 2009 09:14:55 +0000 (10:14 +0100)]
s4-winbind: Add support for the WINBINDD_LIST_GROUPS command.
Kai Blin [Wed, 14 Jan 2009 12:49:14 +0000 (13:49 +0100)]
s4 torture: Add another wbinfo test and fix a typo in another one
Jeremy Allison [Thu, 15 Jan 2009 00:08:19 +0000 (16:08 -0800)]
Remove smbclient globals that bled into clidfs.c. Now we only have
the connections list and authentication structures to worry about.
Jeremy
Jeremy Allison [Wed, 14 Jan 2009 22:33:46 +0000 (14:33 -0800)]
Fix build of netapi.
Jeremy.
Jeremy Allison [Wed, 14 Jan 2009 22:26:56 +0000 (14:26 -0800)]
Remove another global from clidfs that is only used in client.c.
Jeremy.
Jeremy Allison [Wed, 14 Jan 2009 21:17:38 +0000 (13:17 -0800)]
Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.
Jeremy.
Bo Yang [Wed, 14 Jan 2009 19:47:45 +0000 (11:47 -0800)]
Fix bug in get_dc_name_via_netlogon(), null pointer refrence.
Jeremy Allison [Wed, 14 Jan 2009 19:12:52 +0000 (11:12 -0800)]
Clean up comments a little.
Jeremy.
Bo Yang [Wed, 14 Jan 2009 06:26:40 +0000 (14:26 +0800)]
Don't send message to any other child in child process.
Signed-off-by: Bo Yang <boyang@novell.com>
Volker Lendecke [Wed, 14 Jan 2009 15:51:43 +0000 (16:51 +0100)]
Make rpc_read look like a real read call
It doesn't really need to know about prs_structs
Volker Lendecke [Wed, 14 Jan 2009 15:43:37 +0000 (16:43 +0100)]
Make rpc_read() match the control flow normally used in Samba
Replace do { .. } while () with a while () { .. }
Volker Lendecke [Wed, 14 Jan 2009 15:06:10 +0000 (16:06 +0100)]
Simplify rpc_read a bit
rpc_read always reads the whole bytes it was asked to read. So it is not really
necessary for it to update the current_pdu_offset, for clarity this can better
be done in the caller.
Volker Lendecke [Wed, 14 Jan 2009 11:58:38 +0000 (12:58 +0100)]
Remove an unnecessary size check
rpc_read is only ever called with at most fraglen-RPC_HEADER_SIZE length
Volker Lendecke [Wed, 14 Jan 2009 11:58:13 +0000 (12:58 +0100)]
Check the fragment size the server has sent us
Volker Lendecke [Tue, 13 Jan 2009 21:50:43 +0000 (22:50 +0100)]
Slightly simplify rpc_read: It should not do the resize
Volker Lendecke [Tue, 13 Jan 2009 21:24:57 +0000 (22:24 +0100)]
Always read with offset 0 from a named pipe
Günther Deschner [Wed, 14 Jan 2009 09:53:04 +0000 (10:53 +0100)]
s3-eventlog: fix ps struct removal leftover.
Guenther
Günther Deschner [Tue, 13 Jan 2009 13:45:18 +0000 (14:45 +0100)]
s3: re-run make samba3-idl.
Guenther
Günther Deschner [Tue, 13 Jan 2009 12:14:36 +0000 (13:14 +0100)]
eventlog: more eventlog record idl fixes.
- treat eventlogEventTypes as an enum.
- do not align the full eventlog entry.
- set range on number of strings according to docs.
- make a little more obvious what the reserved field stands for.
Guenther
Günther Deschner [Tue, 13 Jan 2009 13:43:46 +0000 (14:43 +0100)]
s3-rpcclient: always parse the full eventlog entry.
Guenther
Günther Deschner [Tue, 13 Jan 2009 10:04:45 +0000 (11:04 +0100)]
s3-eventlog: use main talloc context in eventlog read call.
Guenther
Günther Deschner [Tue, 13 Jan 2009 13:44:29 +0000 (14:44 +0100)]
s4-smbtorture: also test for invalid flags in eventlog test_ReadEventLog.
Guenther
Günther Deschner [Mon, 12 Jan 2009 17:21:20 +0000 (18:21 +0100)]
s4-smbtorture: pure cosmetic cleanup of eventlog test.
Guenther
Kai Blin [Wed, 14 Jan 2009 07:25:52 +0000 (08:25 +0100)]
s4 torture: Fix the wbinfo blackbox tests
Andrew Bartlett [Wed, 14 Jan 2009 04:05:08 +0000 (15:05 +1100)]
Fix error message in mkrelease to refer to source4, not source
Torgeir Lerkerod [Tue, 13 Jan 2009 21:15:37 +0000 (22:15 +0100)]
Fixed problemed showed on a number of systems on the buildfarm.
Problem shows up as perl error related to config.pm in reality
this was related to the ECHO_C variable. Added test to skip that
variable as no perl module is using it.
Torgeir
Signed-off-by: Torgeir Lerkerod <Torgeir.Lerkerod@gmail.com>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Jeremy Allison [Tue, 13 Jan 2009 23:42:56 +0000 (15:42 -0800)]
From boyang - ensure we never "return" from a forked child, always _exit().
Jeremy.
Jeremy Allison [Tue, 13 Jan 2009 23:36:09 +0000 (15:36 -0800)]
Only call sendfile_short_read() if we need it.
Jeremy.
Jeremy Allison [Tue, 13 Jan 2009 21:02:44 +0000 (13:02 -0800)]
Fix bug noticed by Volker - if sendfile returns zero then
we might have to handle a short send by filling with zeros.
Jeremy.
Jeremy Allison [Tue, 13 Jan 2009 19:19:11 +0000 (11:19 -0800)]
Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDB
Jeremy.
Stefan Metzmacher [Tue, 13 Jan 2009 12:01:36 +0000 (13:01 +0100)]
pidl: remove references to EJS and SWIG code
This fixes 'make install'.
metze
Steven Danneman [Mon, 12 Jan 2009 06:56:48 +0000 (22:56 -0800)]
Covert several persistant tdb files to use state_path() instead of lock_path()
Steven Danneman [Mon, 12 Jan 2009 06:44:10 +0000 (22:44 -0800)]
Audit usage of get_dyn_STATEDIR() and replace with state_path()
The state directory is now run-time configurable through loadparm, so all
references to it should be done through state_path() or lp_statedir().
Jeremy Allison [Tue, 13 Jan 2009 00:25:03 +0000 (16:25 -0800)]
Deprecate the "share modes" parameter to address bug #6024, swat disagrees with smbstatus as to share mode with share modes = No set in samba.
Jeremy.
Günther Deschner [Mon, 12 Jan 2009 17:00:33 +0000 (18:00 +0100)]
s3: re-run make samba3-idl.
Guenther
Günther Deschner [Mon, 12 Jan 2009 15:16:24 +0000 (16:16 +0100)]
s3-rpcclient: some cleanup for eventlog client.
Guenther
Günther Deschner [Mon, 12 Jan 2009 12:45:38 +0000 (13:45 +0100)]
eventlog: some fixes for eventlog_Record struct.
* make reserved field always have value 0x654c664C ("eLfL").
* add missing sid entry
* add padding and 2nd size counter.
* use time_t in eventlog_Record.
Guenther
Günther Deschner [Mon, 12 Jan 2009 12:45:04 +0000 (13:45 +0100)]
eventlog: make out pointer a ref pointer in eventlog_GetNumRecords.
Guenther
Stefan Metzmacher [Mon, 12 Jan 2009 11:32:46 +0000 (12:32 +0100)]
s3:libsmb: handle the smb signing states the same in the krb5 and ntlmssp cases
SMB signing works the same regardless of the used auth mech.
We need to start with the temp signing ("BSRSPYL ")
and the session setup response with NT_STATUS_OK
is the first signed packet.
Now we set the krb5 session key if we got the NT_STATUS_OK
from the server and then recheck the packet.
All this is needed to make the fallback from krb5 to
ntlmssp possible. This commit also resets the cli->vuid
value to 0, if the krb5 auth didn't succeed. Otherwise
the server handles NTLMSSP packets as krb5 packets.
The restructuring of the SMB signing code is needed to
make sure the krb5 code only starts the signing engine
on success. Otherwise the NTLMSSP fallback could not initialize
the signing engine (again).
metze
Michael Adam [Mon, 12 Jan 2009 12:04:40 +0000 (13:04 +0100)]
nss_wrapper.pl: fix "Use of uninitialized value $i in array element" messages
I just saw this in "make test" after "SMBD OUTPUT:"...
Michael
Steven Danneman [Thu, 8 Jan 2009 19:18:13 +0000 (11:18 -0800)]
Make STATEDIR and CACHEDIR configurable through ./configure and loadparm.c
If they are not explicitely set in either place both will default to LOCKDIR.
Signed-off-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Sat, 10 Jan 2009 16:59:43 +0000 (17:59 +0100)]
Even for srclen == 0 we have to return something
This fixes a regression reported by Corinna Vinschen <corinna@vinschen.de>
Thanks,
Volker
Stefan Metzmacher [Mon, 12 Jan 2009 08:20:57 +0000 (09:20 +0100)]
tevent: use for() loops instead of while() loops
metze
Tim Prouty [Mon, 12 Jan 2009 07:16:37 +0000 (23:16 -0800)]
s3: Fix uninitialized variable in OneFS streams
Tim Prouty [Sat, 3 Jan 2009 01:35:04 +0000 (17:35 -0800)]
s3: Differentiate between posix files with colons and actual streams
It is possible for a posix file created locally or over nfs to have a
":" in the name. Since ":" is a reserved character in windows,
filenames containing a colon must be mangled in a directory listing.
Right now files containing colons will not even be displayed in
directory listings if streams modules are in use. During the
directory listing the file will be detected as a stream because of the
colon, but the streams module will fail to find the stream since it
doesn't exist. This fix adds a step to is_ntfs_stream_name that stats
the filename to differentiate between actual streams and files
containing colons.
While this is an improvement, it isn't perfect. Consider the case
where there is a file on disk called "a.txt:s1" and also a file called
"a.txt" that has a stream called "s1". This patch will always
preference "a.txt:s1" over a.txt's s1 stream.
The real issue is that at the vfs level, the vfs modules have no way
to tell between a demangled name with a colon and an actual stream. A
more invasive, but better, long-term fix would be to add all paths
that come over the wire into a struct containing metadata about the
path. This metadata could include a flag to indicate whether the path
came over the wire with a colon ":" (guaranteeing that the client is
requesting a stream). Passing this struct down to the lower levels,
including all path-based vfs calls, would allow the above case to be
handled correctly in all cases.
Tim Prouty [Fri, 12 Dec 2008 22:32:48 +0000 (14:32 -0800)]
s3: Add OneFS alternate data streams implementation
Tim Prouty [Wed, 31 Dec 2008 01:17:24 +0000 (17:17 -0800)]
s3: General cleanup of the open path in the OneFS vfs module
Volker Lendecke [Sun, 11 Jan 2009 10:17:26 +0000 (11:17 +0100)]
Move cli_api_pipe() to its only user cli_pipe.c
Tim Prouty [Sun, 11 Jan 2009 19:00:50 +0000 (11:00 -0800)]
tevent: Fix build break
Bo Yang [Sat, 10 Jan 2009 05:46:50 +0000 (13:46 +0800)]
Fix tevent_common_context_destructor to remove all events instead of just the first one
Signed-off-by: Bo Yang <boyang@novell.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Bo Yang [Sat, 10 Jan 2009 22:12:08 +0000 (14:12 -0800)]
Don't set child->requests to NULL in parent after fork
Volker Lendecke [Sat, 10 Jan 2009 12:04:33 +0000 (13:04 +0100)]
Fix a type-punned error