1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

59433 Commits

Author SHA1 Message Date
Andrew Tridgell
8120bc2ba9 s3-lib: use TYPESAFE_QSORT() in remaining s3 library code
the sort_query_replies() in nmblib.c is a TODO. It uses a hack that
treats a char* as a structure. I've left that one alone for now.
2010-02-14 18:44:20 +11:00
Andrew Tridgell
7347ca359d s3-libsmb: use TYPESAFE_QSORT() in namequery code
This one was a bit trickier. I'd appreciate it if someone else can
look over this.
2010-02-14 18:44:20 +11:00
Andrew Tridgell
007f24f29d s3-lib: use TYPESAFE_QSORT() in s3 interfaces code 2010-02-14 18:44:20 +11:00
Andrew Tridgell
76a7382346 lib: use TYPESAFE_QSORT() in lib/ and libcli/ 2010-02-14 18:44:20 +11:00
Andrew Tridgell
cebbc9a6f1 s3-includes: enable TYPESAFE_QSORT() in s3 2010-02-14 18:44:20 +11:00
Andrew Tridgell
282cc79454 s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb code 2010-02-14 18:44:20 +11:00
Matthias Dieter Wallnöfer
0c39fbc94e s4:loadparm.c - prevent memory leaks
If a "logfile" was already set, free the content up before setting a new
location. This can happen on a loadparm reload.
2010-02-13 20:05:22 +01:00
Matthias Dieter Wallnöfer
195bda569e s4:loadparm.c - the logfile parameter value needs to be duplicated
Otherwise the "logfile" pointer tracks all changes of "pszParmValue" which
content is only temporal. This was the cause of bug #6212.
2010-02-13 19:41:43 +01:00
Matthias Dieter Wallnöfer
3598409951 s4:popt_common.c - fix intendation 2010-02-13 19:19:02 +01:00
Matthias Dieter Wallnöfer
415c615dbf s4:util.c - Corrected the location of the "Directory Service" object
I wonder why nobody noticed this since for sure this "tombstone" functionality
was broken till now.
2010-02-13 18:24:45 +01:00
Matthias Dieter Wallnöfer
eed65ed337 s4:server.c - use always "return" instead of "exit" in the "binary_smbd_main" function
Just to be consistent - no functional change
2010-02-13 18:24:07 +01:00
Kai Blin
9848086aa8 libwbclient: Fix s4 build failure by fixing up includes.
Sorry about this, folks.
2010-02-13 17:55:01 +01:00
Volker Lendecke
b00d223f87 s3: Fix Coverity ID 629: DEADCODE
We have already returned if (argc < 1) above
2010-02-13 17:47:43 +01:00
Volker Lendecke
2ea2d2a81e s3: Fix bug 5198 -- parse chfn(1)-change gecos field 2010-02-13 17:23:43 +01:00
Volker Lendecke
271a4c60db s3: Fix typo found by jhell <jhell@DataIX.net> 2010-02-13 16:39:08 +01:00
Kai Blin
b99d9f86e4 libwbclient: Separate out the async functions 2010-02-13 14:30:36 +01:00
Volker Lendecke
613777e6dc s3: Remove unused comparison fn from "struct sorted_tree" 2010-02-13 13:26:11 +01:00
Volker Lendecke
3ab78e31f0 s3: Make adt_tree data definitions private to adt_tree.c 2010-02-13 13:26:11 +01:00
Volker Lendecke
2260732084 s3: SORTED_TREE -> struct sorted_tree 2010-02-13 13:26:11 +01:00
Volker Lendecke
ceebed6ce1 s3: TREE_NODE -> struct tree_node 2010-02-13 13:26:10 +01:00
Volker Lendecke
65b26ba985 s3: Fix some nonempty blank lines 2010-02-13 13:26:10 +01:00
Volker Lendecke
e371317686 use ZERO_STRUCT 2010-02-13 13:25:32 +01:00
Volker Lendecke
95ca53f3e0 Use ZERO_STRUCTP 2010-02-13 13:25:17 +01:00
Volker Lendecke
1a995ab51e s3: Fix a typo 2010-02-13 13:25:03 +01:00
Volker Lendecke
ece99c763a s3: Fix a C++ warning 2010-02-13 13:24:59 +01:00
Andrew Tridgell
f69135e0e9 s4-smbd: fix crash in notify code on client termination
We need to free the lp_ctx after we free the event context, otherwise
the teardown code in the notify backend dies when it tries to use the
iconv_convenience ptr

Fixes bug 7053
2010-02-13 23:12:29 +11:00
Andrew Tridgell
da86f08605 s4-rpc: be more careful about DCERPC auth padding
Cope with a wider range of auth padding in dcerpc bind_ack and
alter_context packets. We now use a helper function that calculates
the right auth padding.
2010-02-13 23:12:29 +11:00
Andrew Tridgell
3ae75a4248 s4: use LDB_TYPESAFE_QSORT() instead of ldb_qsort() 2010-02-13 22:36:12 +11:00
Andrew Tridgell
46dfa9dfbd s4-ldb: added LDB_TYPESAFE_QSORT()
Like TYPESAFE_QSORT() but for the ldb_qsort() function
2010-02-13 22:36:12 +11:00
Andrew Tridgell
1da87fc988 s4-wrepl: use TYPESAFE_QSORT() in wins repl code 2010-02-13 22:36:12 +11:00
Andrew Tridgell
700f464951 s4-torture: use TYPESAFE_QSORT() in smbtorture 2010-02-13 22:36:12 +11:00
Andrew Tridgell
f954f522a4 s4-rpcserver: use TYPESAFE_QSORT() in rpc servers 2010-02-13 22:36:12 +11:00
Andrew Tridgell
e5c83e1adb s4-ntvfs: use TYPESAFE_QSORT() in notify code 2010-02-13 22:36:12 +11:00
Andrew Tridgell
828b5cd451 s4-socket: use TYPESAFE_QSORT() in netif code 2010-02-13 22:36:12 +11:00
Andrew Tridgell
0f50f4440d s4-auth: use TYPESAFE_QSORT() in gensec 2010-02-13 22:36:12 +11:00
Andrew Tridgell
5549190b37 s4-dsdb: use TYPESAFE_QSORT() in dsdb code 2010-02-13 22:36:12 +11:00
Andrew Tridgell
1373e748aa tdb: use fdatasync() instead of fsync() in transactions
This might help on some filesystems
2010-02-13 22:36:11 +11:00
Andrew Tridgell
f435538576 libreplace: add fdatasync() if not available 2010-02-13 22:36:11 +11:00
Andrew Tridgell
63844609da util: added TYPESAFE_QSORT() macro
This makes it much harder to get the type of a qsort comparison
function wrong.
2010-02-13 22:36:11 +11:00
Volker Lendecke
6824c6f46b tdb: Apply some const, just for clarity 2010-02-13 12:19:09 +01:00
Jeremy Allison
9252df53d9 Use sec_initial_uid() in the places where being root doesn't matter,
and 0 in the places where it does.

Jeremy
2010-02-12 23:18:53 -08:00
Jeremy Allison
d46d7717c7 Simplify the logic in make_connection_snum(), and make it match Windows behavior.
Cause all exit paths to go through one place, where all cleanup is
done. change_to_root_user() for pathname operations that should succeed if
the path exists, even if the connecting user has no access.

For example, a share can now be defined with a path of /root/only/access
(where /root/only/access is a directory path with all components only
accessible to root e.g. root owned, permissions 700 on every component).
Non-root users will now correctly connect, but get ACCESS_DENIED on
all activities (which matches Windows behavior). Previously, non-root
users would get NT_STATUS_BAD_NETWORK_NAME on doing a TConX to this
share, even though it's a perfectly valid share path (just not accessible
to them).

This change was inspired by the research I did for bug #7126, which
was reported by bepi@adria.it.

As this is a change in a core function, I'm proposing to leave
this only in master for 3.6.0, not back-port to any existing releases.
This should give us enough time to decide if this is the way we want this to
behave (as Windows) or if we prefer the previous behavior.

Jeremy.
2010-02-12 22:45:37 -08:00
Jeremy Allison
10e54fb422 Fix warning messages on compile in g_lock.c Volker & Michael please check.
Jeremy.
2010-02-12 22:21:19 -08:00
Jeremy Allison
c7f16abc47 Fix error in docs. Should be milliseconds, not microseconds. 2010-02-12 21:29:58 -08:00
Steven Danneman
cb0ea27369 s3/smbd: change locking behavior when "lock spin time = 0".
The "lock spin time" parameter mimics the following Windows
setting which by default is 250ms in Windows and 200ms in Samba.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\LockViolationDelay

When a client sends repeated, non-blocking, contending BRL requests
to a Windows server, after the first Windows starts treating these
requests as timed blocking locks with the above timeout.

As an efficiency, I've changed the behavior when this setting is 0,
to skip this logic and treat all requests as non-blocking locks.

This gives the smbd server behavior similar to the 3.0 release with
the do_spin_lock() implementation.

I've also changed the blocking lock parameter in the call from
push_blocking_lock_request() to true as all requests made in this
path are blocking by definition.
2010-02-12 21:29:00 -08:00
Jeremy Allison
465ffbadb8 Remove #if SOFTLINK_OPTIMIZATION code.
This hasn't been turned on or been capable of doing so for
many years now. Makes this jumbo function smaller...
Jeremy.
2010-02-12 18:50:54 -08:00
Jeremy Allison
1f89ffd035 Revert "Fix bug #7126 - [SMBD] With access denied error smbd return wrong NT_STATUS_OBJECT_PATH_INVALID error"
This reverts commit 2fdd8b10c6.

This fix is incorrect. The original code works as desired,
I made a mistake here.

Jeremy.
2010-02-12 18:17:32 -08:00
Jeremy Allison
2fdd8b10c6 Fix bug #7126 - [SMBD] With access denied error smbd return wrong NT_STATUS_OBJECT_PATH_INVALID error
As tridge's comment says, we should be ignoring ACCESS_DENIED
on the share path in a TconX call, instead allowing the mount
and having individual SMB calls fail (as Windows does). The
original code erroneously caught SMB_VFS_STAT != 0 and errored
out on that.

Jeremy.
2010-02-12 15:45:20 -08:00
Michael Adam
72242ef7cd packaging(RHEL-CTDB): adapt configure.rpm to match the spec-file configure call
Michael
2010-02-12 23:12:13 +01:00
Volker Lendecke
a6338c01b7 v3-4-ctdb: Do not do any logrotation 2010-02-12 23:12:12 +01:00