1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

34488 Commits

Author SHA1 Message Date
Volker Lendecke
69155e4103 s3: Put some parentheses around conditionals 2010-11-08 13:39:51 +01:00
Volker Lendecke
cbe399155d s3: Consistently use stdbool types in new code 2010-11-08 13:39:51 +01:00
Christian Ambach
57b3d32c8d s3:winbind add timeouts to winbind cache
This adds a timeout value to cache entries and the NDR records
in the winbind cache.

The previous approach of just comparing the sequence number has some issues,
e.g. when retrying a wbinfo -n operation for a user in a not yet trusted
domain was always failing even after the trusted domain was added.

The new approach compares sequence number and timeout value to
determine if a cache entry is still valid or not.

I increased the cache version number so an old cache will be wiped
automatically after upgrade.
2010-11-08 13:39:51 +01:00
Volker Lendecke
097be4b101 s3: Make proper use of sid_check_is_in_xx routines
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov  5 15:35:59 UTC 2010 on sn-devel-104
2010-11-05 15:35:59 +00:00
Volker Lendecke
26b2a132ff s3: Fix a typo 2010-11-05 15:54:05 +01:00
Volker Lendecke
5915d4a0b6 s3: Remove some duplicate prototypes 2010-11-05 15:54:05 +01:00
Volker Lendecke
f2456cd542 s3: Allow disabling of mdns registrations
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov  5 11:24:41 UTC 2010 on sn-devel-104
2010-11-05 11:24:41 +00:00
Volker Lendecke
a5d485112e s3: Remove the use of cli_send_trans from cli_get_fs_full_size_info
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Nov  4 22:08:53 UTC 2010 on sn-devel-104
2010-11-04 22:08:52 +00:00
Volker Lendecke
c133fcc0b1 s3: Remove an unused prototype
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Nov  4 17:44:09 UTC 2010 on sn-devel-104
2010-11-04 17:44:09 +00:00
Günther Deschner
8b71438490 s3-waf: add check for httpConnect and httpConnectEncrypt.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Nov  4 14:10:40 UTC 2010 on sn-devel-104
2010-11-04 14:10:40 +00:00
Michael Adam
a50d3638a7 s3:util_str: add strlen_m_ext_term() - variant of strlen_m_ext() counting terminator 2010-11-03 22:45:19 +00:00
Michael Adam
288d55b511 s3:lib/util_str: add strlen_m_ext() that takes input and output charset
The function calculates the number of units (8 or 16-bit, depending
on the destination charset), that would be needed to convert the
input string which is expected to be in in src_charset encoding
to the dst_charset (which should be a unicode charset).
2010-11-03 22:45:19 +00:00
Michael Adam
4579d7ea29 s3:lib/util_str: clarify the comment header for strlen_m(). 2010-11-03 22:45:19 +00:00
Michael Adam
f16ddcae69 s3:lib/charcnv: clarify comments in next_codepoint_ext()
(giving the unicod U+<hexnumber> notation of the codepoints
 referred to in the comments)
2010-11-03 22:45:19 +00:00
Michael Adam
5b6a88b9bf s3:lib/charcnv: rename a parameter for clarity in next_codepoint_ext() 2010-11-03 22:45:19 +00:00
Michael Adam
18104ef1be s3:lib/charcnv: reformat comments in next_codepoint_ext() 2010-11-03 22:45:19 +00:00
Michael Adam
d41d05ec7b s3:lib/charcnv: add next_codepoint_ext() that accepts input charset.
next_codepoint() takes as string in CH_UNIX encoding and returns the
unicode codepoint of the next (possibly multibyte) character of the
input string.

The new next_codepoint_ext() function adds the encoding of the input
string as a parameter. next_codepoint() now only calls next_codepoint_ext()
with CH_UNIX als src_charset argument.
2010-11-03 22:45:19 +00:00
Volker Lendecke
f6a1f46b5e s3: Align nttrans replies the same way Windows does it
If you look at traces of "smbcacls" reading a secdesc from Samba and from W2k3
shows this difference in the querysecdesc nttrans reply. This patch is
necessary to enable viewing previous versions via the shadow copy modules from
Windows 2008. The other client versions seem not to care, but W2k8 does.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov  3 17:04:28 UTC 2010 on sn-devel-104
2010-11-03 17:04:28 +00:00
Volker Lendecke
80c3364cd3 s3: Fix a getgrent crash with many groups
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov  3 12:58:49 UTC 2010 on sn-devel-104
2010-11-03 12:58:49 +00:00
Volker Lendecke
0e95fca747 s3: Add "net registry getvaluesraw"
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov  2 15:42:22 UTC 2010 on sn-devel-104
2010-11-02 15:42:22 +00:00
Volker Lendecke
18e3b223c7 s3: Do not connect to ctdb if it is blocked for some reason 2010-11-02 15:59:05 +01:00
Martin Schwenke
27056d37e0 cluster_fatal() exit code should not indicate success.
cluster_fatal() logs a fatal event and then exits with 0.  This seems
wrong.  Sometimes command like "net" use this code and return
incorrect empty output but then exit with 0.

This simply changes the exit code to 1.

Signed-off-by: Martin Schwenke <martin@meltin.net>
2010-11-02 15:59:05 +01:00
Volker Lendecke
4622f2e926 s3: Fix a typo in a DEBUG msg
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov  2 13:13:39 UTC 2010 on sn-devel-104
2010-11-02 13:13:39 +00:00
Andrew Bartlett
b717ec26d9 s3-param Fix up lp_set_cmdline() not to re-store cmdline options on each reload
The previous code was buggy in that it did not honour the 'store'
argument to lp_set_cmdline_helper(), and would use the stored
parameter after freeing it when handling overwritten values.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Nov  2 05:19:17 UTC 2010 on sn-devel-104
2010-11-02 05:19:17 +00:00
Andrew Bartlett
7d0f04a651 s3-libsmbclient Don't store 'debug_stderr' on the libsmbclient context
Following the review of this patch series by Derrell Lipman, remove
the seperate storage of the debug_stderr variable from the
libsmbclient SMBC_internal_data context.

Andrew Bartlett
2010-11-02 04:36:05 +00:00
Andrew Bartlett
b1099a5b56 s3-libsmbclient Add comments to describe the behaviour of DEBUG()
This isn't quite what you would expect from this interface, but actually
avoids some really nasty situations if you ever have more than one
libsmbclient context in a process.

In the real world, if you have asked for DEBUG() to stderr in one part
of the code, you will want it globally, even in a different thread
(which in the past would have rest everything to stdout again, at
least while starting up).

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
db2a61ab26 debug Explain the behaviour of setup_logging() more clearly 2010-11-02 04:36:04 +00:00
Andrew Bartlett
4aeb608eca s3-debug Clarify the handling of invalid state.fd values in debug.c
This makes it clear that -1 and 0 are both invalid file descriptor values
for DEBUG output.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
ed111d11eb s3-debug Move 'load_case_tables()' before lp_set_cmdline() and popt calls
The problem here is that we cannot run lp_set_cmdline() (directly or
indirectly via the popt helpers) until load_case_tables() has been run.

However, load_case_tables does not have auto-initialisation, so we
must init it once, and once only.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
e64dfdcc71 s3-debug Convert from x_file to real file descriptors.
X_FILE does not gain us anything in this use case, we want our log
messages on disk, not in a buffer, and we don't gain anything from the
X_FILE api.  I discussed the matter with tridge, who feels that to use
FILE in the first place was a mistake, and that X_FILE isn't any
better, but was a stop-gap to avoid issues on solaris.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
d9f67eebf6 s3-debug Remove last direct assignements to DEBUGLEVEL
All future assignments of the debug level should go via
lp_set_cmdline("log level", "x") because this will ensure the value is
not overwritten in an smb.conf load.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
cf4de8ec2c s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() instead
By removing this global variable, the API between the two different
debug systems is made more similar.  Both s3 and s4 now have
lp_set_cmdline() which ensures that the smb.conf cannot overwrite
these the user-specified log level.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
9da4ace1d9 s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Michael Adam
1ccb69aabb s3:winbindd: fix query_user for users with NULL full name.
Not sure whether query_user ever sends a NULL full name.
Query Display Info does, and it does not harm to add the
check here, too.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Nov  1 13:03:33 UTC 2010 on sn-devel-104
2010-11-01 13:03:33 +00:00
Michael Adam
53d19fac5f s3:winbindd: fix query_user_list for users with NULL full_name 2010-11-01 12:21:30 +00:00
Kamen Mazdrashki
717b1158a6 idl: Use DRSUAPI_ATTID_ prefix instead of DRSUAPI_ATTRIBUTE_ for ATTID values
Those values are actually ATTID values and such, they are used
for ATTIDs for Attributes, Classes and Syntaxes.
2010-10-31 23:54:04 +00:00
Andrew Tridgell
228803cd01 zlib: use the real library name 'z' instead of ZLIB
using subsystem aliases has a lot of potential for confusion. Better
to use the real name of the library.
2010-10-30 23:49:01 +11:00
Jeremy Allison
14ff2e8de9 Fix bug #7700 - Improvement of return code of smbclient
Based on an initial patch from H Hasegawa <hasegawa.hiroyuki@fujixerox.co.jp>.
Convert cli_list and associated functions to take calls that return NTSTATUS.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 29 19:40:16 UTC 2010 on sn-devel-104
2010-10-29 19:40:16 +00:00
Günther Deschner
090fcb0114 s3-waf: add vfs_time_audit to the build.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct 28 15:14:27 UTC 2010 on sn-devel-104
2010-10-28 15:14:27 +00:00
Günther Deschner
e00671ee0c s3-waf: use LZXPRESS subsystem.
Guenther
2010-10-28 14:33:19 +00:00
Günther Deschner
9dd467b2d5 s3-selftest: add vfs_modulesdir variable for both test systems.
Guenther
2010-10-28 14:33:19 +00:00
Volker Lendecke
4b2e2f94bb s3: Streamline regdb_normalize_keynames_fn a bit
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Oct 28 14:32:11 UTC 2010 on sn-devel-104
2010-10-28 14:32:11 +00:00
Volker Lendecke
8b87603de4 s3: Fix the registry upgrade code
The strings have the 0-terminator as part of the keys. The rest of the registry
code would not cope well without.
2010-10-28 15:50:14 +02:00
Volker Lendecke
a43261e11d s3: FILE_WRITE_DATA & friends have gone from includes.h
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Oct 28 13:37:06 UTC 2010 on sn-devel-104
2010-10-28 13:37:06 +00:00
Abhidnya P Chirmule
2cfee006e1 s3: Add a vfs_time_audit module
This warns if a file system is slow

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Oct 28 08:56:44 UTC 2010 on sn-devel-104
2010-10-28 08:56:44 +00:00
Volodymyr Khomenko
97595597a3 s3: Fix bug 7759 2010-10-28 10:11:29 +02:00
Jeremy Allison
c6d7e6ad08 Fix for bug 7755 - SMBC_getdents_ctx() ignores struct alignment rules
Based on a fix from Sven Neumann <s.neumann@raumfeld.com>.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 27 22:02:11 UTC 2010 on sn-devel-104
2010-10-27 22:02:11 +00:00
Sven Neumann
0bc94c21e5 Fix bug 7754 - samba uses index(), marked as legacy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 27 19:25:16 UTC 2010 on sn-devel-104
2010-10-27 19:25:16 +00:00
Volker Lendecke
24ef932a61 s3: Make gpfs winattrs work again
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 27 15:32:00 UTC 2010 on sn-devel-104
2010-10-27 15:31:59 +00:00
Andrew Bartlett
cf310a4306 s3-smbd Remove manual override of DEBUGELVEL during exit
This code, originally added at the dawn of time (the import into CVS)
does not seem to be required any more, as all the DEBUG() statements
in the intermediate functions are at level 0.

Andrew Bartlett
2010-10-27 04:42:06 +00:00