Derrell Lipman [Thu, 24 Jan 2008 01:50:24 +0000 (20:50 -0500)]
Merge branch 'setxattr-dos-mode' into v3-2-test
Derrell Lipman [Thu, 24 Jan 2008 01:44:54 +0000 (20:44 -0500)]
Allow clearing all settable DOS mode bits. A mode value of zero is ignored by
Windows. If the requested mode is zero, we instead send the appropriate one
of 0x80 (NORMAL) or 0x10 (DIRECTORY).
Thanks Jeremy!
Derrell
Jeremy Allison [Wed, 23 Jan 2008 23:23:16 +0000 (15:23 -0800)]
Don't leak memory in error path.
Jeremy.
Jeremy Allison [Wed, 23 Jan 2008 23:00:40 +0000 (15:00 -0800)]
Use strchr_m in seaching for '.' in the hostname to make sure we're mb safe.
Jeremy.
Andreas Schneider [Thu, 17 Jan 2008 10:35:40 +0000 (11:35 +0100)]
Fix Windows 2008 (Longhorn) join.
During 'net ads join' the cli->desthost is a hostname (e.g.
rupert.galaxy.site). Check if we have a hostname and use only the
first part, the machine name, of the string.
Andreas Schneider [Thu, 17 Jan 2008 09:11:11 +0000 (10:11 +0100)]
Windows 2008 (Longhorn) auth2 flag fixes.
Interop fixes for AD specific flags. Original patch from Todd Stetcher.
Jeremy Allison [Wed, 23 Jan 2008 21:54:02 +0000 (13:54 -0800)]
Forward ported version of Matt Geddes <musicalcarrion@gmail.com>
patch for adding acct_flags to rpccli_samr_create_dom_user().
Jerry please test.
Jeremy.
Volker Lendecke [Wed, 23 Jan 2008 15:42:31 +0000 (16:42 +0100)]
read_socket_with_timeout has timeout=0 handling
Volker Lendecke [Wed, 23 Jan 2008 10:04:10 +0000 (11:04 +0100)]
strtok -> strtok_r
Michael Adam [Wed, 23 Jan 2008 13:33:22 +0000 (14:33 +0100)]
Fix panic: Don't free the logfilename in winbind_child_died().
The child struct is immediately reused, and this results
in a panic when child->logfilename == NULL.
Michael
Michael Adam [Wed, 23 Jan 2008 12:52:42 +0000 (13:52 +0100)]
Initialize _domain_list to NULL.
Just to be sure the "if (!_domain_list)" in domain_list() test always works.
Michael
Günther Deschner [Wed, 23 Jan 2008 11:03:51 +0000 (12:03 +0100)]
Fix get_trust_creds() to return always an upper-cased krb5 principal (this
fixes winbind krb5 session at least with heimdal).
Guenther
Volker Lendecke [Wed, 23 Jan 2008 09:33:36 +0000 (10:33 +0100)]
Remove two unused variables
Michael Adam [Tue, 22 Jan 2008 23:30:28 +0000 (00:30 +0100)]
Fix tab_depth: it should not create an extra debug header.
In pstring removal
4ae4b23586, the behaviour of tab_depth was
changed to create an extra debug header (by using the DEBUGLVL
macro).
This extracts the debug level check from DEBUGLVL into
a macro CHECK_DEBUGLVL without the debug header creation
and uses this instead of DEBUGLVL in tab_depth.
Michael
Andrew Tridgell [Wed, 23 Jan 2008 02:08:14 +0000 (13:08 +1100)]
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
Andrew Tridgell [Wed, 23 Jan 2008 02:07:33 +0000 (13:07 +1100)]
Added PFIF notice to Samba 3.2 tree
Corinna Vinschen [Tue, 22 Jan 2008 15:38:00 +0000 (16:38 +0100)]
Get Samba version or capability information from Windows
On Jan 22 13:31, Volker Lendecke wrote:
> On Tue, Jan 22, 2008 at 11:33:17AM +0100, Corinna Vinschen wrote:
> > Right. I changed samba_gitcommitdate from time_t to NTTIME and shortened
> > samba_version_string to 28 bytes. New patch below.
>
> Ok, pushed with some modifications. You might want to review
> that.
Reviewed and tested. Looks good, thank you!
Below you'll find a tiny patch to add the git commit date. It seems
I simply missed its existence in version.h :( Tested on Windows XP.
Thanks,
Corinna
* source/smbd/trans2.c (samba_extended_info_version): Fill out
samba_gitcommitdate member with GIT commit timestamp.
Volker Lendecke [Tue, 22 Jan 2008 12:42:44 +0000 (13:42 +0100)]
replace svn references with git ones in Readme
Volker Lendecke [Tue, 22 Jan 2008 12:00:22 +0000 (13:00 +0100)]
Move samba_extended_info_version to smbd/trans2.c
This is right now only used there, and in version.c it gave linker errors
because some binaries (e.g. smbmnt) don't link in time.o
Volker Lendecke [Tue, 22 Jan 2008 11:46:51 +0000 (12:46 +0100)]
Avoid use of uninitialized memory
Corinna Vinschen [Tue, 22 Jan 2008 10:33:17 +0000 (11:33 +0100)]
Get Samba version or capability information from Windows
On Jan 21 16:18, Danilo Almeida wrote:
> Corina wrote:
>
> > + time_t samba_gitcommitdate;
>
> And:
>
> > + SIVAL(pdata,28,extended_info.samba_gitcommitdate);
> > + memcpy(pdata+32,extended_info.samba_version_string,32);
>
> Note that you are dropping bits on a system w/64-bit time_t, and that this has the 2038 problem.
Right. I changed samba_gitcommitdate from time_t to NTTIME and shortened
samba_version_string to 28 bytes. New patch below.
Thanks,
Corinna
Volker Lendecke [Mon, 21 Jan 2008 19:24:23 +0000 (20:24 +0100)]
Hide streams from the EA API
Stefan Metzmacher [Tue, 22 Jan 2008 11:21:55 +0000 (12:21 +0100)]
libreplace: getpwent_r/getgrent_r on IRIX are similar to solaris but use size_t
metze
Volker Lendecke [Tue, 22 Jan 2008 08:22:14 +0000 (09:22 +0100)]
Fix a ton of IBM checker uninitialized variable warnings
SET_STAT_INVALID only sets nlink, not the other fields
We might consider to change SET_STAT_INVALID to always do ZERO_STRUCT
Volker Lendecke [Tue, 22 Jan 2008 08:18:40 +0000 (09:18 +0100)]
Fix get_ea_names_from_file for many EAs
Found by the IBM checker
Volker Lendecke [Tue, 22 Jan 2008 08:13:25 +0000 (09:13 +0100)]
Fix a segfault
Found by the IBM checker.
Jeremy, you changed this from 'dirname == 0' which does not make sense at all
in the old code to '!dirname == 0' which from my point of view makes even less
sense, because the precedence of ! is according to Harbison/Steele higher than
the precedence of ==. Please check that the code now actually does what it's
supposed to do.
Thanks!
Michael Adam [Mon, 21 Jan 2008 14:35:09 +0000 (15:35 +0100)]
Add another check for talloc failure to libnet_conf
Michael
Michael Adam [Mon, 21 Jan 2008 14:31:57 +0000 (15:31 +0100)]
Fix formatting of multi_sz registry values.
Don't print only the last component.
Michael
Michael Adam [Mon, 21 Jan 2008 14:28:04 +0000 (15:28 +0100)]
Use talloc_stackframe() for temporary contexts throughout libnet_conf.c
Michael
Michael Adam [Mon, 21 Jan 2008 14:24:23 +0000 (15:24 +0100)]
Add a check for talloc failure. - Pointed out by Volker.
Michael
Michael Adam [Mon, 21 Jan 2008 14:14:16 +0000 (15:14 +0100)]
Fix two debug messages.
Michael
Volker Lendecke [Mon, 21 Jan 2008 17:07:38 +0000 (18:07 +0100)]
Attempt to fix the darwin build
Kai Blin [Mon, 21 Jan 2008 17:01:55 +0000 (18:01 +0100)]
util_sock: Don't return a pointer to freed memory.
Fix a bug in my bugfix. Thanks to vl for spotting that one.
Volker Lendecke [Mon, 21 Jan 2008 14:10:44 +0000 (15:10 +0100)]
Add SMB_VFS_FS_CAPABILITIES
It turns out that this is a necessary operation, separate from statvfs. statvfs
can fail during tcon, so conn->fs_capabilities would never see that we support
streams on a particular share.
James, can you check that I got the darwin variant right? Thanks!
Volker Lendecke [Mon, 21 Jan 2008 14:00:34 +0000 (15:00 +0100)]
Link smbd on AIX with -bexpfull instead of -bexpall
-bexpall only exports the names without leading _, so we don't get
_talloc_reallo_array for example.
Thanks a lot to Heinrich Mislik for the hint!
Kai Blin [Mon, 21 Jan 2008 12:18:38 +0000 (13:18 +0100)]
util_sock: Fix memcache bug in get_mydnsfullname.
get_mydnsfullname relied on memcache_add(); memcache_lookup() working.
When run from ntlm_auth, the global_cache variable in memcache is NULL, so
the add and lookup both fail. In that case, just return the result of the
getaddrinfo call.
Jeremy, please check.
Stefan Metzmacher [Sat, 19 Jan 2008 10:08:49 +0000 (11:08 +0100)]
libwbclient: use the same style in each switch case for the error mapping
metze
Stefan Metzmacher [Fri, 18 Jan 2008 07:39:47 +0000 (08:39 +0100)]
winbindd: remove useless strcpy
metze
Michael Adam [Sun, 20 Jan 2008 23:40:10 +0000 (00:40 +0100)]
Rename lib/util_reg_smbconf.c to registry/reg_init_smbconf.c
This actually is a counterpart to reg_init_full, in that is does
open and initialize the registry too, but only registeres the backends
necessary to access the SMBCONF key.
Michael
Michael Adam [Sun, 20 Jan 2008 23:34:06 +0000 (00:34 +0100)]
Move reg_frontend_hilvl.c to reg_dispatcher.c
This is actually the dispatcher to the registered registry backends.
Michael
Michael Adam [Sun, 20 Jan 2008 23:32:01 +0000 (00:32 +0100)]
Extend/fix comments.
Michael
Michael Adam [Sun, 20 Jan 2008 23:28:39 +0000 (00:28 +0100)]
Extract regkey_open_internal() from reg_frontend.c to new reg_util_legacy.c
reg_openpath should be used instead of this function (along with the
reg_api interface). Last callers of this function are in services_db.c
Michael
Michael Adam [Sun, 20 Jan 2008 23:16:40 +0000 (00:16 +0100)]
Rename reg_db.c to reg_backend_db.c
Michael
Michael Adam [Sun, 20 Jan 2008 23:14:10 +0000 (00:14 +0100)]
Rename reg_shares.c to reg_backend_shares.c
Michael
Michael Adam [Sun, 20 Jan 2008 23:07:41 +0000 (00:07 +0100)]
Rename reg_smbconf.c to reg_backend_smbconf.c
Michael
Michael Adam [Sun, 20 Jan 2008 22:59:06 +0000 (23:59 +0100)]
Rename reg_printing.c to reg_backend_printing.c
Start making naming of source files more systematic
to facilitate understanding of the structures.
Michael
Michael Adam [Sun, 20 Jan 2008 22:48:28 +0000 (23:48 +0100)]
Makefile.in: Group together registry related object variables.
Michael
Michael Adam [Sun, 20 Jan 2008 22:39:16 +0000 (23:39 +0100)]
Makefile.in: extract registry backend objects to common variable.
Michael
Michael Adam [Sun, 20 Jan 2008 22:44:33 +0000 (23:44 +0100)]
reg_eventlog.o and reg_perfcount.o are no longer neede for reg_smbconf.
This is an effect of the removal of the dynamic registry overlay.
This is the beginning of a restructuring of registry linkage in Makefile.in.
Michael
Volker Lendecke [Sun, 20 Jan 2008 16:35:25 +0000 (17:35 +0100)]
Fix some "set but never used" warnings
Volker Lendecke [Sun, 20 Jan 2008 16:32:19 +0000 (17:32 +0100)]
Free case_state earlier
Found by a "set but never used" warning. Thanks to talloc_tos() this was not
really a bug, but this way the code becomes much clearer.
Volker Lendecke [Sun, 20 Jan 2008 14:59:31 +0000 (15:59 +0100)]
Activate SMB_QUERY_FILE_STREAM_INFO
gcolley was right, my nt4 does not blue screen with it
Volker Lendecke [Sun, 20 Jan 2008 13:10:51 +0000 (14:10 +0100)]
Active RAW-STREAMS in make test
Volker Lendecke [Sun, 20 Jan 2008 14:09:53 +0000 (15:09 +0100)]
Fix valgrind errors
Volker Lendecke [Sun, 20 Jan 2008 13:44:07 +0000 (14:44 +0100)]
NT_STATUS_OBJECT_NAME_NOT_FOUND also means "no streams around :-)"
Volker Lendecke [Sun, 20 Jan 2008 13:43:30 +0000 (14:43 +0100)]
Don't test split_ntfs_stream_name
This is a hot code path, and if it has a :, the name will be split later on
anyway.
Volker Lendecke [Sun, 20 Jan 2008 13:09:08 +0000 (14:09 +0100)]
Do not use an unfinished fsp in streams_xattr_open
Volker Lendecke [Sun, 20 Jan 2008 13:05:36 +0000 (14:05 +0100)]
In streams_xattr_pwrite, base_fsp does not have an fd
These bugs haven't shown up when I did my tests with real xattrs, not with the
xattr_tdb backend. It worked because the stream fsp does has the base file as
fd.
Volker Lendecke [Sun, 20 Jan 2008 12:55:27 +0000 (13:55 +0100)]
Add some DEBUG
Volker Lendecke [Sun, 20 Jan 2008 12:51:52 +0000 (13:51 +0100)]
For pread/pwrite we need to do the setxattr on base_fsp
Volker Lendecke [Sun, 20 Jan 2008 12:49:38 +0000 (13:49 +0100)]
Really remove the _NEXT_ from vfs_xattr_tdb.c
This must have been lost somewhere in my patch-mangling
Volker Lendecke [Sun, 20 Jan 2008 10:20:58 +0000 (11:20 +0100)]
Support XATTR_CREATE and XATTR_REPLACE in vfs_xattr_tdb
Volker Lendecke [Sun, 20 Jan 2008 10:10:06 +0000 (11:10 +0100)]
Complete the ea->xattr rename in vfs_xattr_tdb
Volker Lendecke [Sun, 20 Jan 2008 08:03:32 +0000 (09:03 +0100)]
Fix a segfault
Pointed out by Steven Danneman on irc, thanks!
Jerry, Günther, please check!
Jeremy Allison [Sun, 20 Jan 2008 05:53:49 +0000 (21:53 -0800)]
Couple of minor fixes for POSIX pathname processing in the
new stream code. (1) In smbd/filename, don't split the name at
':' if we know it's a posix path (this should be parameterized....).
(2). When calling posix_mkdir, we get the flag FILE_FLAG_POSIX_SEMANTICS
passed to open_directory(). I know for a posix client lp_posix_pathnames
should be true (which is checked for in is_ntfs_stream_name() but we
have an explicit flag here, so let's use it.
Jeremy.
Michael Adam [Fri, 18 Jan 2008 15:06:37 +0000 (16:06 +0100)]
Do an explicit init_globals() when restarting for "config backend = registry".
Michael
Michael Adam [Fri, 18 Jan 2008 16:57:32 +0000 (17:57 +0100)]
Add a debug message to fetch_reg_values().
Michael
Michael Adam [Fri, 18 Jan 2008 15:08:52 +0000 (16:08 +0100)]
Add some debugging output to reg_cachehook.c
Michael
Michael Adam [Sun, 20 Jan 2008 02:45:40 +0000 (03:45 +0100)]
Remove the dynamic registry overlay.
It is unnecessary now the dynamic functions have been made
registry backends of their own.
Michael
Michael Adam [Sun, 20 Jan 2008 02:39:27 +0000 (03:39 +0100)]
Add a registry backend perflib that replaces the former dynamic overlay.
Michael
Michael Adam [Sun, 20 Jan 2008 02:25:54 +0000 (03:25 +0100)]
Some reformatting of current_version_fetch_values().
Michael
Michael Adam [Sun, 20 Jan 2008 02:24:13 +0000 (03:24 +0100)]
Add a registry backend current_version that replaces the former dynamic overlay.
Make sure to only respond to the exact current version key since subkeys
are registered by other backends (printing and - soon - perflib).
Michael
Michael Adam [Sun, 20 Jan 2008 01:23:00 +0000 (02:23 +0100)]
Reorder the registry key name constants in a more systematic way.
Michael
Michael Adam [Sun, 20 Jan 2008 00:09:52 +0000 (01:09 +0100)]
Use some consts instead of literal strings for registry keys.
Michael
Michael Adam [Sun, 20 Jan 2008 00:15:31 +0000 (01:15 +0100)]
Some reformatting in hkpt_params_fetch_values().
Michael
Michael Adam [Sun, 20 Jan 2008 00:00:14 +0000 (01:00 +0100)]
Add a registry backend hkpt_params that replaces the former dynamic overlay.
Michael
Michael Adam [Sun, 20 Jan 2008 00:21:45 +0000 (01:21 +0100)]
Some reformatting in tcpip_params_fetch_values().
Michael
Michael Adam [Sat, 19 Jan 2008 22:46:13 +0000 (23:46 +0100)]
Add a registry backend tcpip_params that replaces the former dynamic overlay.
Michael
Michael Adam [Sun, 20 Jan 2008 00:25:08 +0000 (01:25 +0100)]
Some reformatting in prod_options_fetch_values().
Michael
Michael Adam [Fri, 18 Jan 2008 15:15:43 +0000 (16:15 +0100)]
Add a registry backend prod_options that replaces the former dynamic overlay.
Michael
Michael Adam [Sun, 20 Jan 2008 00:30:38 +0000 (01:30 +0100)]
Some reformatting in netlogon_params_fetch_values().
Michael
Michael Adam [Sat, 19 Jan 2008 21:42:30 +0000 (22:42 +0100)]
Rename netlogon_params_fetch_reg_values() to netlogon_params_fetch_values().
Michael
Michael Adam [Sat, 19 Jan 2008 21:39:33 +0000 (22:39 +0100)]
In reg_backend_netlogon_params, delegate fetch_subkeys() to regdb.
In order to be able to open the netlogon_params key (the new backend replacing
the former dynamic overlay), certain methods need to be provided. Delegate these
to the regdb backend (like e.g. the smbconf backend does).
Michael
Michael Adam [Fri, 18 Jan 2008 16:51:57 +0000 (17:51 +0100)]
Fix registering Registry backends in reghook_cache_add().
This was broken in
331c0d6216e1a1607a49ed7eb4078e10138ec16a
(pstring removal).
Michael
Michael Adam [Fri, 18 Jan 2008 15:13:01 +0000 (16:13 +0100)]
Use constant KEY_NETLOGON_PARAMS instead of literal key.
Michael
Michael Adam [Fri, 18 Jan 2008 11:13:37 +0000 (12:13 +0100)]
Volker is right: why keep commented out migrated dynamic reg overlays around?...
Michael
Michael Adam [Sat, 19 Jan 2008 22:09:38 +0000 (23:09 +0100)]
Use c99 struct initializers for REGISTRY_OPS in reg_shares.c
Michael
Michael Adam [Sat, 19 Jan 2008 22:06:12 +0000 (23:06 +0100)]
Use c99 struct initializers for REGISTRY_OPS in reg_printing.c
Michael
Michael Adam [Sat, 19 Jan 2008 22:01:58 +0000 (23:01 +0100)]
Use c99 struct initializers for REGISTRY_OPS in reg_smbconf.c.
Michael
Volker Lendecke [Sat, 19 Jan 2008 23:44:14 +0000 (00:44 +0100)]
Some systems do not have XATTR_ defined
Volker Lendecke [Sat, 19 Jan 2008 22:36:34 +0000 (23:36 +0100)]
vfs_streams_depot
Store streams in a file each. Not 100% finished, and not built by default.
Volker Lendecke [Sat, 19 Jan 2008 22:33:11 +0000 (23:33 +0100)]
vfs_streams_xattr module
Store streams in posix xattrs. A kludge, as xattrs are limited in many ways,
but it might be a help for some situations.
Volker Lendecke [Sat, 19 Jan 2008 22:25:36 +0000 (23:25 +0100)]
Add streams support
This is the core of the streams support. The main change is that in
files_struct there is now a base_fsp pointer that holds the main file open
while a stream is open. This is necessary to get the rather strange delete
semantics right: You can't delete the main file while a stream is open without
FILE_SHARE_DELETE, and while a stream is open a successful unlink of the main
file leads to DELETE_PENDING for all further access on the main file or any
stream.
Volker Lendecke [Sat, 19 Jan 2008 22:10:09 +0000 (23:10 +0100)]
Add "split_ntfs_stream_name()" together with a torture test
Volker Lendecke [Sat, 19 Jan 2008 21:44:55 +0000 (22:44 +0100)]
Add an error mapping for ENOATTR
Volker Lendecke [Sat, 19 Jan 2008 19:41:15 +0000 (20:41 +0100)]
Add the STREAMINFO vfs call
Based on jpeach's work, modified the streaminfo prototype
Make use of it in trans2.c together with marshall_stream_info()
Volker Lendecke [Sat, 19 Jan 2008 18:31:02 +0000 (19:31 +0100)]
Use SAFE_FREE instead of free
Corinna Vinschen [Sat, 19 Jan 2008 14:14:45 +0000 (15:14 +0100)]
Tiny memory leak in lib/version.c
Hi,
while implementing the extra_info version stuff, it occured to me that
samba_version_string() potentially allocates memory which is unused but
never free'd.
If SAMBA_VERSION_VENDOR_PATCH is defined, a second call to asprintf
takes place. The result is stored in tmp_version. Afterwards,
samba_version is set to tmp_version without free'ing samba_version
first. Looks like a simple free(samba_version) is missing. Patch
against 3.2-test below.
Ok, this only happens once over the lifetime of the application, so it's
no big deal, but I though it doesn't hurt to mention it.
Corinna
* lib/version.c (samba_version_string): Free samba_version
before setting to tmp_version.
Volker Lendecke [Sat, 19 Jan 2008 14:44:48 +0000 (15:44 +0100)]
Fix error return in xattr_tdb_load_attrs
Volker Lendecke [Sat, 19 Jan 2008 15:19:08 +0000 (16:19 +0100)]
The remote storage op is gone
Alexander, I think this ok...