1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

53507 Commits

Author SHA1 Message Date
Michael Adam
6d82b59755 s3:first cut at dbwrap_tool - a tdb tool that is CTDB-aware.
This tool (in contrast to tdbtool) reads Samba's configuration
and if clustering = yes, it talks to CTDB instead of accessing
the TDB data bases directly. This is done by simply using
the dbwrap mechanim, just like the Samba daemons.

This first version can read and write int32 and uint32 values
and delete records from a (c)tdb database.
More operations will follow.

This tool can already be useful in CTDB environments, e.g. when
"net idmap restore" fails to set the USER and GROUP HWM keys,
because the methods are deliberately not implemented in
idmap_tdb2.c. You can manually set the high water marks
with
"dbwrap_tool store idmap_tdb2.tdb 'USER HWM' int32 12345"
and
"dbwrap_tool store idmap_tdb2.tdb 'GROUP HWM' int32 67890"

Michael
2009-05-15 11:46:53 +02:00
Jeremy Allison
4dce2dfb5b Turn on SHORTNAME-TEST in torture.
Jeremy.
2009-05-14 16:49:34 -07:00
Jeremy Allison
ff9375a04c Make us pass SHORTNAME-TEST.
Jeremy
2009-05-14 16:49:18 -07:00
Jeremy Allison
f61959e87a Make error message clearer on fail.
Jeremy.
2009-05-14 16:30:11 -07:00
Jeremy Allison
41aa7d790a Add a test showing what ascii values cause an NTFS volume to
create a mangled name. We don't pass this yet, but it's not
run by default.
Jeremy.
2009-05-14 16:03:31 -07:00
Jeremy Allison
a84028590f Remove one use of mangle_is_8_3(), not needed.
Jeremy.
2009-05-14 16:03:18 -07:00
Jeremy Allison
57e03b6a1d Fix the core of the SAMR access functions. This passes make test, but
usrmgr fails against it. The core of this patch is to move all the
access mask setup into the _samr_OpenXXX functions, and then have
each specific function check the attached access_mask against the
required bits. We can then go through the MS-SAMR doc and match
things up. Signed off by Guenther, and writespace cleanup removal
by Volker.
Jeremy.
2009-05-14 15:11:50 -07:00
Steve French
d35a3952f0 Maximum password length check too short in mount.cifs
Windows allows up to 127 byte passwords, and we using a 64 byte limit
    in most places and a 16 byte limit when using the "pass=" mount option

    Acked-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@us.ibm.com>
2009-05-14 15:04:27 -05:00
Andrew Bartlett
d73eab2b33 Add extensive tests for str_list function behaviour 2009-05-15 01:50:06 +10:00
Volker Lendecke
074890b39e Remove two unused variables 2009-05-14 15:40:57 +02:00
Günther Deschner
8fdb499497 s3-netapi: implement NetShutdownInit_r and NetShutdownAbort_r.
Guenther
2009-05-14 14:18:26 +02:00
Günther Deschner
80f0d819fb s3-netapi: add example code for NetShutdownInit and NetShutdownAbort.
Guenther
2009-05-14 14:18:26 +02:00
Günther Deschner
1ddc4829ae s3-netapi: add NetShutdownInit and NetShutdownAbort to public API.
Guenther
2009-05-14 14:18:26 +02:00
Günther Deschner
8fd3c8902c s3-netapi: add NetShutdownInit and NetShutdownAbort skeletons.
Guenther
2009-05-14 14:18:26 +02:00
Günther Deschner
3a2c748cf4 s3-build: re-run make samba3-idl.
Guenther
2009-05-14 14:18:26 +02:00
Günther Deschner
e272acf484 s3-netapi: add NetShutdownInit and NetShutdownAbort.
I know, they don't exist as such calls on windows but having them in
libnetapi.so would be very handy.

Guenther
2009-05-14 14:18:26 +02:00
Volker Lendecke
0a5d99ae7d Fix a type-punned warning 2009-05-14 12:15:10 +02:00
Volker Lendecke
9c23115cb8 Add some const 2009-05-14 12:15:10 +02:00
Volker Lendecke
979f13b19e Fix some nonempty blank lines 2009-05-14 12:14:57 +02:00
Andrew Bartlett
524a79b735 s4:nbtd Use str_list_make_single() to turn iname->wins_server into a list 2009-05-14 05:56:59 +10:00
Andrew Bartlett
aa5cee2288 s4:libnet Use str_list_make_single() in resolv code 2009-05-14 05:56:59 +10:00
Andrew Bartlett
6df4aece1d dsdb:schema Use str_list_make_empty() to create an empty list 2009-05-14 05:56:59 +10:00
Andrew Bartlett
5182b10b7a s4:torture Use str_list_make_single where appropriate 2009-05-14 05:56:59 +10:00
Andrew Bartlett
a89bee4c98 Add new functions and tests: str_list_make_empty(), str_list_make_single() 2009-05-14 05:56:58 +10:00
Derrell Lipman
a13ba4347f What to do about debugging in a multi-threaded application?
- For now, punt. Any thread that requests debug to stderr will establish that
  for all threads.

Derrell
2009-05-13 14:51:43 -04:00
Derrell Lipman
636fbd1028 Thread-safe protection: libsmbclient initialization
- Begin converting init functions to use SMB_THREAD_ONCE. libsmbclient
  module-wide initialization is now moved into a separate function and called
  via SMB_THREAD_ONCE.

- libsmbclient counts users (contexts) so that it can release global resources
  when the last context is closed. That count of contexts is now protected by
  a mutex.

Derrell
2009-05-13 14:37:28 -04:00
Derrell Lipman
045af600f2 Take advantage of the easier-to-use thread macros
- Now that we initialize for the non-thread-safe case in the macro, there's no
  need to do it here too.

Derrell
2009-05-13 14:37:28 -04:00
Derrell Lipman
088906b064 Make the thread functions a bit easier to use
- Create separate macros for lock and unlock so that it's easier to identify
  which request is being made.

- Initialize *ponce in the SMB_THREAD_ONCE macro in the non-thread-safe case,
  rather than requiring each init function to determine if it's in the
  non-thread-safe case and manually initialize.

Derrell
2009-05-13 14:37:28 -04:00
Stefan Metzmacher
b9f3a78169 s3:libsmb: move read_smb_send/recv() static in async_smb.c
metze
2009-05-13 18:27:50 +02:00
Stefan Metzmacher
ca6ec5ecd7 s3:libsmb: let cli_smb_chain_send() also return NTSTATUS
metze
2009-05-13 18:27:50 +02:00
Bo Yang
6ff09b323e s3:libsmb: return NT_STATUS_CONNECTION_INVALID if the fd is -1
This way we can destinguish between requests which failed
because the connection broke after they were triggered
and the requests which are started on an already broken
connection.

This also moves the check to cli_smb_req_iov_send()
where it really belongs.

metze
2009-05-13 18:27:41 +02:00
Bo Yang
83ff460401 Revert "s3: checkin .po for pam_winbind" because of license issue.
This reverts commit 8611f03dbb.
2009-05-13 22:00:05 +08:00
Derrell Lipman
e03b9ae609 Allow a parameter to smb_thread_once's initialization function
- This should make life easier for ourselves. We're no longer constrained to
  the semantics of pthread_once, so let's allow passing a parameter to the
  initialization function. Some of Samba's init functions return a
  value. Although I haven't searched, I suspect that some of the init
  functions require in input parameters. The parameter added here can be used
  for input, output, or both, as necessary... or ignored, as is now done in
  talloc_stackframe_init().

Derrell
2009-05-13 09:50:17 -04:00
Günther Deschner
652251701d s3-printing: no need to define struct table_node 4 times.
Guenther
2009-05-13 15:27:06 +02:00
Günther Deschner
077327a923 s3-net: Fix bug 6340: don't segfault when cleartext trustdom pwd could not be retrieved.
Guenther
2009-05-13 15:19:41 +02:00
Günther Deschner
c3e61b5460 s4-selftest: match new name of RPC-SAMR-ACCESSMASK.
Guenther
2009-05-13 15:19:40 +02:00
Günther Deschner
675e52cde7 s4-smbtorture: split RPC-SAMR-ACCESSMASK into several tests.
Guenther
2009-05-13 15:19:40 +02:00
Günther Deschner
2abdfab613 s4-smbtorture: cosmetic cleanup for RPC-SAMR-ACCESSMASK.
Guenther
2009-05-13 15:19:40 +02:00
Volker Lendecke
c62cc96b1e Remove an unused struct definition 2009-05-13 13:00:19 +02:00
Bo Yang
8611f03dbb s3: checkin .po for pam_winbind
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-13 18:59:55 +08:00
Bo Yang
05379f0125 s3: return proper error code in cli_smb_req_send
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-13 18:47:00 +08:00
Karolin Seeger
42e0cb8c0a s3/packaging: Fix build on RHEL when ccache is not available.
This fixes bug #5832.
Patch was provided by D.L. Meyer <dlmeyer [at] uiuc.edu>.

Thanks for reporting and providing the patch!

Karolin
2009-05-13 10:07:56 +02:00
Derrell Lipman
7c39e450fc Fix broken smb_thread_once function (again)
- It would help if smb_thread_once did, eventually, set the variable that
  prevents the init function from being run again. Sigh. It must be getting
  late.

Derrell
2009-05-12 21:32:33 -04:00
Derrell Lipman
8a60c26c7c Fix broken smb_thread_once function
- We can't set *ponce=true before running the function because although other
  threads wouldn't re-run the initialization function, they could potentially
  proceed beyond the initialization point while the first thread was still
  running the initialization function. If a second thread gets to an
  SMB_THREAD_ONCE() call while one with the same ponce is running, we need to
  ensure that it enters smb_thread_once() to await the mutex and then recheck
  whether *ponce is set or not.  My original comment about other "once"
  functions possibly being called from within this "once" function is
  irrelevant since those other ones would have their own unique ponce.

Derrell
2009-05-12 21:24:34 -04:00
Zack Kirsch
3627ceb5e2 s3 onefs: Self-contend level2 oplocks on BRL 2009-05-12 17:53:16 -07:00
Tim Prouty
c2482d6b23 s3 onefs: Fix ignore sacl parameter 2009-05-12 17:52:00 -07:00
Tim Prouty
c60bb39df3 s3: Fix strict locking with chained reads
Move the strict lock/unlock code down a level for reads to avoid
calling chain_reply before the unlock.
2009-05-12 17:13:40 -07:00
Aravind Srinivasan
5aefb44bf0 s3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.
This is very similar to be1dfff02d
2009-05-12 17:13:40 -07:00
Dan Sledz
c71d4530b4 s3 auth: Make debug message louder and more useful 2009-05-12 17:13:40 -07:00
Timur I. Bakeyev
d9f1b2ceec Use PYTHON_VER rather than PYTHON_VERSION, as the first is already
commonly used (e.g. in the FreeBSD ports system).

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
2009-05-13 02:09:05 +02:00