1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-18 17:57:55 +03:00

21961 Commits

Author SHA1 Message Date
Jeremy Allison
090061b73a Use strchr_m in seaching for '.' in the hostname to make sure we're mb safe.
Jeremy.
2008-01-23 15:00:40 -08:00
Andreas Schneider
5f60ed4af6 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.
2008-01-23 14:57:45 -08:00
Andreas Schneider
5aadfcdaac Windows 2008 (Longhorn) auth2 flag fixes.
Interop fixes for AD specific flags. Original patch from Todd Stetcher.
2008-01-23 14:55:22 -08:00
Jeremy Allison
7d94f97947 Forward ported version of Matt Geddes <musicalcarrion@gmail.com>
patch for adding acct_flags to rpccli_samr_create_dom_user().
Jerry please test.
Jeremy.
2008-01-23 13:54:02 -08:00
Volker Lendecke
7101026061 read_socket_with_timeout has timeout=0 handling 2008-01-23 17:09:10 +01:00
Volker Lendecke
fd34ce4370 strtok -> strtok_r 2008-01-23 15:08:04 +01:00
Michael Adam
da131d089d 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
2008-01-23 14:33:22 +01:00
Michael Adam
1f49065d44 Initialize _domain_list to NULL.
Just to be sure the "if (!_domain_list)" in domain_list() test always works.

Michael
2008-01-23 13:52:42 +01:00
Günther Deschner
9cf3a98eac Fix get_trust_creds() to return always an upper-cased krb5 principal (this
fixes winbind krb5 session at least with heimdal).

Guenther
2008-01-23 12:05:01 +01:00
Volker Lendecke
f12ac1eced Remove two unused variables 2008-01-23 10:33:36 +01:00
Michael Adam
cbc7d921fa 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
2008-01-23 08:16:37 +01:00
Corinna Vinschen
a33d079758 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.
2008-01-22 16:45:25 +01:00
Volker Lendecke
1f0eaaa591 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
2008-01-22 13:00:22 +01:00
Volker Lendecke
85123aacdb Avoid use of uninitialized memory 2008-01-22 12:46:51 +01:00
Corinna Vinschen
28aa1c199d 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
2008-01-22 12:39:47 +01:00
Volker Lendecke
e9bb3d5067 Hide streams from the EA API 2008-01-22 12:29:02 +01:00
Stefan Metzmacher
2f46091511 libreplace: getpwent_r/getgrent_r on IRIX are similar to solaris but use size_t
metze
2008-01-22 12:21:55 +01:00
Volker Lendecke
8cf8c5b203 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
2008-01-22 09:23:34 +01:00
Volker Lendecke
8741a9b374 Fix get_ea_names_from_file for many EAs
Found by the IBM checker
2008-01-22 09:23:27 +01:00
Volker Lendecke
c8def55647 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!
2008-01-22 09:16:28 +01:00
Michael Adam
196e4ce8c5 Add another check for talloc failure to libnet_conf
Michael
2008-01-21 22:49:45 +01:00
Michael Adam
654e96208e Fix formatting of multi_sz registry values.
Don't print only the last component.

Michael
2008-01-21 22:49:45 +01:00
Michael Adam
4d734106b7 Use talloc_stackframe() for temporary contexts throughout libnet_conf.c
Michael
2008-01-21 22:49:45 +01:00
Michael Adam
bdc49b07cc Add a check for talloc failure. - Pointed out by Volker.
Michael
2008-01-21 22:49:45 +01:00
Michael Adam
35e23368dd Fix two debug messages.
Michael
2008-01-21 22:49:45 +01:00
Volker Lendecke
5b05e09daf Attempt to fix the darwin build 2008-01-21 18:08:19 +01:00
Kai Blin
24f68b90cc util_sock: Don't return a pointer to freed memory.
Fix a bug in my bugfix. Thanks to vl for spotting that one.
2008-01-21 18:02:24 +01:00
Volker Lendecke
3ad798d803 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!
2008-01-21 16:14:27 +01:00
Volker Lendecke
74a71f1988 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!
2008-01-21 15:01:19 +01:00
Kai Blin
1db41ff525 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.
2008-01-21 13:28:06 +01:00
Stefan Metzmacher
0b85f7173d libwbclient: use the same style in each switch case for the error mapping
metze
2008-01-21 13:20:07 +01:00
Stefan Metzmacher
df08708fc1 winbindd: remove useless strcpy
metze
2008-01-21 13:15:10 +01:00
Michael Adam
01bda3ab35 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
2008-01-21 08:49:12 +01:00
Michael Adam
39d65d11f8 Move reg_frontend_hilvl.c to reg_dispatcher.c
This is actually the dispatcher to the registered registry backends.

Michael
2008-01-21 08:49:12 +01:00
Michael Adam
4952417fca Extend/fix comments.
Michael
2008-01-21 08:49:12 +01:00
Michael Adam
0005b88d74 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
2008-01-21 08:49:12 +01:00
Michael Adam
c3f695d3b1 Rename reg_db.c to reg_backend_db.c
Michael
2008-01-21 08:49:12 +01:00
Michael Adam
aaf33ae5b8 Rename reg_shares.c to reg_backend_shares.c
Michael
2008-01-21 08:49:12 +01:00
Michael Adam
b85e5ee450 Rename reg_smbconf.c to reg_backend_smbconf.c
Michael
2008-01-21 08:49:12 +01:00
Michael Adam
b3c2fb17a4 Rename reg_printing.c to reg_backend_printing.c
Start making naming of source files more systematic
to facilitate understanding of the structures.

Michael
2008-01-21 08:49:12 +01:00
Michael Adam
cf485273f6 Makefile.in: Group together registry related object variables.
Michael
2008-01-21 08:49:12 +01:00
Michael Adam
562c3eb37e Makefile.in: extract registry backend objects to common variable.
Michael
2008-01-21 08:49:12 +01:00
Michael Adam
7453e78a8e 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
2008-01-21 08:49:11 +01:00
Volker Lendecke
4a6dadc517 Fix some "set but never used" warnings 2008-01-20 17:44:40 +01:00
Volker Lendecke
b326f11dc3 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.
2008-01-20 17:44:40 +01:00
Volker Lendecke
9f2b5dc186 Activate SMB_QUERY_FILE_STREAM_INFO
gcolley was right, my nt4 does not blue screen with it
2008-01-20 15:59:31 +01:00
Volker Lendecke
63ee2ef775 Active RAW-STREAMS in make test 2008-01-20 15:29:58 +01:00
Volker Lendecke
d7e6ec2258 Fix valgrind errors 2008-01-20 15:29:58 +01:00
Volker Lendecke
96b9a7b3eb NT_STATUS_OBJECT_NAME_NOT_FOUND also means "no streams around :-)" 2008-01-20 14:44:39 +01:00
Volker Lendecke
9f7f6b812d 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.
2008-01-20 14:44:39 +01:00