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

649 Commits

Author SHA1 Message Date
Rusty Russell
6bc59d77b6 tdb_store: check returns for 0, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
1078eb21c4 tdb_delete: check returns for 0, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
058c4f8492 tdb_fetch_compat: use instead of tdb_fetch.
This is a noop for tdb1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
0e4c358e27 tdb_compat.h: divert every tdb build and includes to tdb_compat
We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:34 +02:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +02:00
Matthias Dieter Wallnöfer
75e77f9fa0 s4:ntvfs subsystems - rework it using concrete enum values
This changes commit 260bc987b0 to comply
with metze's plans.
2011-06-16 09:05:31 +02:00
Matthias Dieter Wallnöfer
260bc987b0 s4:ntvfs subsystem - quiet enum warnings
Simply return "NT_STATUS_INVALID_LEVEL" for unknown types of requests.

Reviewed-by: Tridge
2011-06-09 10:53:36 +02:00
Andrew Bartlett
907cdb5de7 s4-modules Remove lp_ctx from init functions that no longer need it
Now that we don't allow the smb.conf to change the modules dir, many
functions that simply load modules or initialise a subsytem that may
load modules no longer need an lp_ctx.

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Rusty Russell
0204ae6229 lib/util/time.c: timeval_current_ofs_usec
Several places want "microseconds from current time", and several were
simply handing "usecs" values which could be over a million.

Using a helper to do this is safer and more readable.

I didn't replace any obviously correct callers (ie. constants).

I also renamed wait_nsec in source3/lib/util_sock.c; it's actually
microseconds not nanoseconds (introduced with this code in Volker's
19b783cc Async wrapper for open_socket_out_send/recv).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Rusty Russell
56e72337b0 lib/util/time.c: timeval_current_ofs_msec
Several places want "milliseconds from current time", and several were
simply doing "msec * 1000" which can (and does in one place) result in
a usec value over 1 a million.

Using a helper to do this is safer and more readable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Andrew Bartlett
1969aa8eac s4-ntvfs: Rename brl_*() -> brlock_*() to avoid conflict with brlock_init in s3 2011-05-08 10:56:26 +02:00
Andrew Bartlett
3892112e7b lib/util Rename ms_fnmatch() to ms_fnmatch_protocol() to avoid dup symbol
This verison of the function takes a protcol as argument to determine
matching rules.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
1475013963 lib/util Move source3 tdb_wrap_open() into the common code.
This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in
the top level build, these options are not available for these
databases.  However, having two different tdb_wrap lists is a worse
fate, so this will do for now.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
cdd802af83 s4-messaging Rename messaging -> imessaging
This avoid symbol and structure conflicts between Samba3 and Samba4,
and chooses a less generic name.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Stefan Metzmacher
b8d0994627 s4:ntvfs/posix: name->dos.attrib isn't initialized in pvfs_access_check_create()
That's why we have the 'container' parameter to indicate
the caller wants to create a directory.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Mar 22 17:39:11 CET 2011 on sn-devel-104
2011-03-22 17:39:11 +01:00
Stefan Metzmacher
3dc999e38b s4:ntvfs/posix: grant SEC_STD_DELETE if the parent grants SEC_DIR_DELETE_CHILD
metze
2011-03-21 22:35:17 +01:00
Jelmer Vernooij
e02f1cd9b1 source4/ntvfs/posix: Fix prototypes for all functions. 2011-03-19 03:20:04 +01:00
Jelmer Vernooij
b077ccccfb ntvfs: Add some missing dependencies on tevent/events.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Feb 28 21:57:16 CET 2011 on sn-devel-104
2011-02-28 21:57:16 +01:00
Jelmer Vernooij
136c160064 Use <tdb.h> to include tdb, so the system include file gets used when building against
system tdb.
2011-02-28 21:11:21 +01:00
Pavel Shilovsky
738b2abe78 s4: Don't grant level II oplock to a file with byte-range locks.
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Feb 15 11:09:17 CET 2011 on sn-devel-104
2011-02-15 11:09:17 +01:00
Jelmer Vernooij
4217734a51 credentials: Lowercase library name,
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov  7 01:48:44 UTC 2010 on sn-devel-104
2010-11-07 01:48:44 +00:00
Jelmer Vernooij
0878399bd5 samdb: Lowercase library name. 2010-11-07 01:52:13 +01:00
Andrew Tridgell
28c1e4d3eb s4-modules: get rid of the remaining static prototypes for modules
the waf build now generates the prototype declarations for us
2010-11-01 18:55:19 +11:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Jelmer Vernooij
8cf61377aa waf: Remove lib prefix from libraries manually. 2010-10-26 10:17:17 -07:00
Jelmer Vernooij
7b8549348a s4: Rename WRAP_XATTR to wrap_xattr. 2010-10-23 22:24:06 +00:00
Andrew Tridgell
b4dd1accc8 s4-waf: don't depend directly on python modules
build rules should not list dependencies on python modules. Instead,
if code needs the module it should use the python API import calls to
access the module.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:26 +11:00
Andrew Tridgell
2dcb596e83 s4-waf: removed dependencies on missing subsystems
these were left over from the old config.mk system
2010-10-21 19:03:24 +11:00
Andrew Bartlett
353d9bc3e4 s4-acl Merge sec_access_check() with se_access_check() from source3/
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:05 +00:00
Björn Jacke
3eda2815f6 s4/pvfs: use monotonic time for this timeout 2010-09-10 23:10:26 +02:00
Matthias Dieter Wallnöfer
4def6775b5 s4:ntvfs/posix/pvfs_*.c - quiet Solaris warnings
Fix the function argument of "pvfs_xattr_ndr_load/save".
2010-08-27 19:11:44 +02:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Bartlett
285647664c s4:idmap Adjust code to new idmap structure names and layout.
Andrew Bartlett
2010-05-24 23:08:56 +10:00
Matthias Dieter Wallnöfer
6836304957 s4:ntvfs/posix/pvfs_wait.c - fix a "calculated value unused" warning
The calculated value is "req" (!= NULL) if "talloc_reference" did work correctly
or it is NULL if we ran out of memory.
2010-05-21 23:35:57 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Bartlett
415bd62764 s4:ntvfs Prepare for a possible future sharing of notify.idl
I would love for notify.idl to be shared between Samba4 and Samba3
some day, and this seems to be the point at which the structure is
initialised.

Andrew Bartlett
2010-05-18 13:21:09 +10:00
Andrew Bartlett
81407b1bff s4:ntvfs Prepare for a possible future sharing of notify.idl
I would love for notify.idl to be shared between Samba4 and Samba3
some day, and this seems to be the point at which the structure is
initialised.

Andrew Bartlett
2010-05-14 23:25:45 +10:00
Andrew Tridgell
208d92a259 s4-waf: cleaned up tevent dependency 2010-04-06 20:27:13 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
844acb2260 build: waf quicktest nearly works
Rewrote wafsamba using a new dependency handling system, and started
adding the waf test code
2010-04-06 20:26:48 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Andrew Tridgell
e8788808da s4-pvfs_sys: build on systems without O_NOFOLLOW or O_DIRECTORY 2010-03-05 23:07:32 +11:00
Andrew Tridgell
568f0851f0 s4-pvfs_sys: talloc_free should be before errno restore
talloc can potentially change the errno
2010-03-05 23:07:32 +11:00
Andrew Tridgell
2c2156ea95 s4-pvfs: use pvfs_sys_fchmod() 2010-03-05 23:07:32 +11:00
Andrew Tridgell
dae9d20e14 s4-pvfs: set default for perm override based on system features
If the system has O_NOFOLLOW and O_DIRECTORY then we allow for
overrides by default. If not, then we disable by default, as we will
be more vulnerable to symlink attacks
2010-03-05 23:07:32 +11:00
Andrew Tridgell
f7c97c8597 s4-pvfs: use O_FOLLOW one level at a time for security overrides
To prevent symlink attacks we need to use O_NOFOLLOW one level at a
time when processing a root security override
2010-03-05 23:07:32 +11:00
Andrew Tridgell
ace6d75ae6 s4-pvfs: use pvfs_sys_*() functions to wrap posix calls
This allows for root override, which fixes many problems with
mismatches between NT ACL permissions and unix permissions.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-05 23:07:31 +11:00
Andrew Tridgell
034bcaf14d s4-pvfs: new pvfs_sys module
The pvfs_sys_*() calls provide wrapper functions for posix file
functions which use root privileges to override EACCES failures if
PVFS_FLAG_PERM_OVERRIDE is set

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-05 23:07:31 +11:00
Andrew Tridgell
edd5a572d8 s4-pvfs: added new pvfs flag PVFS_FLAG_PERM_OVERRIDE
This flag indicates that we should use root privileges to override 
unix permissions when the NT ACLs indicate that access should be
granted

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-05 23:07:31 +11:00
Andrew Tridgell
2e1637833b s4-pvfs: log more error conditions in NTVFS backend
This should make is easier to track down some bug reports

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-05 16:12:06 +11:00