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

1313 Commits

Author SHA1 Message Date
Stefan Metzmacher
96ada4d87b s4:ntvfs: add '_fn' suffix to all ntvfs_ops function pointers
This hopefully fixes the build on systems where _LARGE_FILES
triggers defines of syscalls e.g. '#define lseek lseek64'
on AIX.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jun 13 11:03:15 CEST 2012 on sn-devel-104
2012-06-13 11:03:15 +02:00
Björn Jacke
2fb4c551e8 s4/pvfs: handle non-POSIX compliant Tru64, NetBSD and FreeBSD errno on O_NOFOLLOW symlink open calls
see also f75f1d6233
2012-06-10 21:38:08 +02:00
Andrew Bartlett
f9b7cd53b9 s4-xattr: Use libreplace xattr functions directly 2012-06-02 02:13:49 +02:00
Stefan Metzmacher
e4c59a66aa s4:ntvfs/ipc: fix protocol specific processing of pipe names
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 28 21:48:47 CEST 2012 on sn-devel-104
2012-05-28 21:48:47 +02:00
Alexander Bokovoy
2ddf89a2bc Introduce system MIT krb5 build with --with-system-mitkrb5 option.
System MIT krb5 build also enabled by specifying --without-ad-dc

When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level
configure in WAF build we are trying to detect and use system-wide MIT krb5
libraries. As result, Samba 4 DC functionality will be disabled due to the fact
that it is currently impossible to implement embedded KDC server with MIT krb5.

Thus, --with-system-mitkrb5/--without-ad-dc build will only produce
  * Samba 4 client libraries and their Python bindings
  * Samba 3 server (smbd, nmbd, winbindd from source3/)
  * Samba 3 client libraries

In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture.
This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-05-23 17:51:50 +03:00
Stefan Metzmacher
8588d10861 s4:ntvfs/smb2: remove misleading comment regarding security=server
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 15 10:12:53 CEST 2012 on sn-devel-104
2012-05-15 10:12:52 +02:00
Stefan Metzmacher
12ce84f0cf s4:ntvfs/cifs: remove misleading comment regarding security=server
metze
2012-05-15 08:18:29 +02:00
Michael Adam
e945511aae move the dbwrap library to the top level
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon May 14 04:04:55 CEST 2012 on sn-devel-104
2012-05-14 04:04:55 +02:00
Alexander Bokovoy
566884553c s4:ntvfs: add missing headers to vfs_ipc
vfs_ipc.c had system/kerberos.h and system/filesys.h missing

Signed-off-by: Simo Sorce <idra@samba.org>
2012-05-04 16:51:29 +02:00
Jelmer Vernooij
d3b4c2c771 UTIL_TDB: lowercase name.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu May  3 20:18:22 CEST 2012 on sn-devel-104
2012-05-03 20:18:22 +02:00
Stefan Metzmacher
2ccf5f67a5 s4:ntvfs/ipc: don't echo back the smb2 ioctl input_buffer
metze
2012-04-27 08:31:37 +02:00
Alexander Bokovoy
594e316181 lib/replace: split out GSSAPI from lib/replace/system/kerberos.h into lib/replace/system/gssapi.h
With waf build include directories are defined by dependencies specified to subsystems.
Without proper dependency <gssapi/gssapi.h> cannot be found for embedded Heimdal builds
when there are no system-wide gssapi/gssapi.h available.

Split out GSSAPI header includes in a separate replacement header and use that explicitly
where needed.

Autobuild-User: Alexander Bokovoy <ab@samba.org>
Autobuild-Date: Wed Apr 25 00:18:33 CEST 2012 on sn-devel-104
2012-04-25 00:18:32 +02:00
Andrew Bartlett
628a24172f s4-python: Add python wrapper for xattr_tdb format xattr storage
This uses the format used by the vfs_xattr_tdb module.  The s4
posix:eadb format is kept, just in a new file and module.

Andrew Bartlett
2012-04-18 12:05:00 +10:00
Adrian Bunk
55cbf7ba34 rely on sys/inotify.h for inotify
sys/inotify.h was added to glibc 2.4 in 2006.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr 13 21:15:00 CEST 2012 on sn-devel-104
2012-04-13 21:15:00 +02:00
Andrew Bartlett
7b4d511bc6 s4-ntvfs: Rename xattr_tdb.c to posix_eadb.c and make more generally useful
This is now a small library, to be called from ntvfs, python and
vfs_posix_eadb.  The rename makes it clear that this has a different
DB format to that used by vfs_xattr_tdb, and matches the posix:eadb
smb.conf parameter used to configure it.

Andrew Bartlett
2012-04-03 14:35:02 +10:00
Jelmer Vernooij
ce4531ee31 tdb_wrap: Move to specific directory.
It's a bit confusing to mix low-level and high-level libraries.  We had
multiple libraries in one directory, and there were have circular
dependencies with other libraries outside that directory (in this case,
samba-hostconfig).

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104
2012-03-10 23:13:01 +01:00
Matthieu Patou
474c02acac s3-waf: add dependency on talloc or it won't build if talloc.h is not in the default include path
The problem occurs only if talloc, tdb and ldb are used as system
libraries and talloc is not installed in a default.

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Feb 10 23:27:29 CET 2012 on sn-devel-104
2012-02-10 23:27:29 +01:00
Jelmer Vernooij
6b1e83c65c pyxattr_tdb: Remove pointless check for blob.length < 0. 2012-02-07 01:11:07 +01:00
Jelmer Vernooij
05bc4de083 Revert making public of the samba-module library.
This library was tiny - containing just two public functions than were
themselves trivial. The amount of overhead this causes isn't really worth the
benefits of sharing the code with other projects like OpenChange. In addition, this code
isn't really generically useful anyway, as it can only load from the module path
set for Samba at configure time.

Adding a new library was breaking the API/ABI anyway, so OpenChange had to be
updated to cope with the new situation one way or another. I've added a simpler
(compatible) routine for loading modules to OpenChange, which is less than 100 lines of code.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec  3 08:36:33 CET 2011 on sn-devel-104
2011-12-03 08:36:30 +01:00
Andrew Tridgell
3c4af39aa5 s4-ntvfs: added allow_override check based on use of NT ACL
This disables the posix permission override if the calculated
permissions did not come from a NT ACL.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  1 05:14:49 CET 2011 on sn-devel-104
2011-12-01 05:14:49 +01:00
Andrew Tridgell
d1274f7f62 s4-ntvfs: fixed a unix ACL mapping bug
the ACL mapping code was incorrectly allowing creation of directories
in some situations where it should be denied by the unix permissions
2011-12-01 13:40:54 +11:00
Stefan Metzmacher
4afbda221c s4:libcli/raw: implement on top of smbXcli_conn/req
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov 30 15:13:36 CET 2011 on sn-devel-104
2011-11-30 15:13:36 +01:00
Andrew Bartlett
7f8f7159af lib/util Rename samba_modules_load -> samba_module_init_fns_for_subsystem
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
0ce09fcf7a lib/util Rename samba_init_module_fns_run -> samba_module_init_fns_run
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
1b7cc4ac7c lib/util Rename samba_init_module_fn -> samba_module_init_fn
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
87354c9a6d lib/util Split samba-modules library into public and private parts
This will allow OpenChange to get at the symbols it needs, without
exposing any more of this as a public API than we must.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
b7b798e15b lib/util Rename load_samba_modules -> samba_modules_load
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
ce0ccc2a2e lib/util Rename run_init_functions -> samba_init_module_fns_run
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
1935b7b6c2 lib/util Rename init_module_fn to samba_init_module_fn
This prepares for making the samba_module.h header public again, for OpenChange.

I am keen to avoid too much API namespace pollution if we can.
2011-10-28 13:10:28 +02:00
Andreas Schneider
7cb08171ce Include uid_wrapper correctly. 2011-10-27 13:32:02 +02:00
David Disseldorp
281fc93c6b libcli: move ioctl function field defs to smb_constants
Currently there are a lot of duplicate ioctl function field definitions
between source3 and source4.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19 15:44:29 +02:00
Andrew Bartlett
01c934c81e lib/util: Add back control of mmap and hash size in tdb for top level build
This passes down a struct loadparm_context to allow these
parameters to be checked.  This may be s3 or s4 context, allowing the
#if _SAMBA_BUILD_ macro to go away safely.

Andrew Bartlett
2011-10-13 14:06:07 +02:00
Andrew Bartlett
b21b012756 lib/param move source4 param code to the top level
This is done so that the lpcfg_ functions are available across the whole
build, either with the struct loadparm_context loaded from an smb.conf directly
or as a wrapper around the source3 param code.

This is not the final, merged loadparm, but simply one step to make
it easier to solve other problems while we make our slow progress
on this difficult problem.

Andrew Bartlett
2011-10-11 13:41:34 +11:00
Andrew Bartlett
7d33ec3dfe lib/util: consolidate module loading into common code
This creates a samba-modules private libary that handles the details.

Andrew Bartlett
2011-10-06 07:18:07 +02:00
Matthieu Patou
4383665101 python-s4: use PyErr_SetNTSTATUS instead of PyErr_NTSTATUS_IS_ERR_RAISE as it use NT_STATUS_IS_ERROR which is not completely the same as NT_STATUS_IS_OK
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Sep 23 09:22:56 CEST 2011 on sn-devel-104
2011-09-23 09:22:56 +02:00
Matthieu Patou
766d43efde pys4: really return an exception if the status if not correct
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Sep 23 06:06:57 CEST 2011 on sn-devel-104
2011-09-23 06:06:57 +02:00
Matthias Dieter Wallnöfer
02a08d5cd5 s4:ntvfs common - remove two outdated function prototypes
The two functions don't exist anymore.

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Sep 20 20:16:29 CEST 2011 on sn-devel-104
2011-09-20 20:16:29 +02:00
Matthias Dieter Wallnöfer
7c44039f48 s4:ntvfs common - add "UTIL_TDB" and "tdb-wrap" as internal build dependency
These modules are required for both header and source code files (see
bug #8468).

Reviewed-by: Jelmer
2011-09-20 18:43:06 +02:00
Matthias Dieter Wallnöfer
fcfde9ac86 s4:ntvfs/common/brlock.c - remove unnecessary include "tdb_compat.h"
Attempt to fix bug #8468
(https://bugzilla.samba.org/show_bug.cgi?id=8468).

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Sep 19 18:03:24 CEST 2011 on sn-devel-104
2011-09-19 18:03:24 +02:00
Stefan Metzmacher
592ac97728 s4:ntvfs: s/!= PROTOCOL_SMB2/< PROTOCOL_SMB2_02/
metze
2011-09-05 13:17:34 +02:00
Stefan Metzmacher
1ba5077e5f s4:ntvfs: s/== PROTOCOL_SMB2/>= PROTOCOL_SMB2_02/
metze
2011-09-05 13:17:33 +02:00
Jelmer Vernooij
292fe74971 credentials: Rename library to samba-credentials to avoid name clashes.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Aug 18 22:16:38 CEST 2011 on sn-devel-104
2011-08-18 22:16:38 +02:00
Jelmer Vernooij
9ee1e1f0ac cli-raw: Add public libsmbclient-raw library. 2011-08-18 14:19:18 +02:00
Simo Sorce
b1feb9d432 s4:ntvfs: use tevent_ fn names instead of legacy event_ ones 2011-08-13 09:54:16 -04:00
Andrew Bartlett
f5963aad18 s4-auth Move conversion of security_token to unix_token to auth
This allows us to honour the AUTH_SESSION_INFO_UNIX_TOKEN flag.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-29 04:24:07 +02:00
Andrew Bartlett
d2a6ae254a ntvfs: Use security_unix_token from auth.idl
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-29 04:24:07 +02:00
Jelmer Vernooij
7524413751 cli_raw: Make name lowercase.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jul 23 23:20:51 CEST 2011 on sn-devel-104
2011-07-23 23:20:51 +02:00
Stefan Metzmacher
5a8ac84270 s4:ntvfs/cifs: add option to use S4U2Proxy
Note: this doesn't work against a Samba4 KDC yet.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jun 22 18:17:43 CEST 2011 on sn-devel-104
2011-06-22 18:17:43 +02:00
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
62a1e13b29 s4:ntvfs/smb2/vfs_smb2.c - remove unused variable
Reviewed-by: Jelmer
2011-06-11 16:26:13 +02:00
Andrew Bartlett
a772797a38 librpc/idr Use the Samba3 notify.idl in common.
The extra fields in the structure that Samba4 does not use should not
bother it.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d057116cc2 server_id.idl: Bring server_id.idl in common
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-09 12:40:08 +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
Stefan Metzmacher
902b1d9a19 s4:ntvfs/cifs: return NT_STATUS_INTERNAL_ERROR if no credentials are available
This is a configuration problem on the server, no invalid parameter
from the client.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 18 08:49:00 CEST 2011 on sn-devel-104
2011-05-18 08:49:00 +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
344eb08ee4 nterr: Add mem_ctx for return string from get_nt_error_c_code()
It is clearer to avoid the implicit return on talloc_tos()

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
2742ec0e34 Remove strlower_m() and strupper_m() from source4 and common code.
This function is problematic because a string may expand in size when
changed into upper or lower case.  This will then push characters off
the end of the string in the s3 implementation, or panic in the former
s4 implementation.

Andrew Bartlett
2011-05-03 07:37:07 +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
2bb637d1cf s4:ntvfs/smb2: use sync version of smb2_connect()
We don't use it in an async fashion anyway.

metze
2011-04-28 20:35:47 +02:00
Andrew Tridgell
5adf85e6af tstream: make npa_tstream a private library
this prevents symbol duplication of the npa_tstream symbols

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-04-06 08:12:19 +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
f5c3742a4c source4/ntvfs: Fix prototypes for all functions. 2011-03-19 03:20:05 +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
Jelmer Vernooij
21d926f0ef Use <tevent.h> so the system tevent gets included, if enabled. 2011-02-28 21:11:21 +01:00
Andrew Tridgell
bed374215f s4-idl: rename s4 server_id.idl to server_id4.idl
this avoids a conflict with the new s3 server_id.idl

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-18 18:41:00 +11: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
Andrew Bartlett
d66150c14d libcli/named_pipe_auth Change from 'info3' to auth_session_info_transport
This changes the structure being used to convey the current user state
from the netlogon-derived 'netr_SamInfo3' structure to a purpose-built
structure that matches the internals of the Samba auth subsystem and
contains the final group list, as well as the final privilege set and
session key.

These previously had to be re-created on the server side of the pipe
each time.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10 06:51:06 +01:00
Andrew Bartlett
a2ce53c1f5 s4-auth Rework auth subsystem to remove struct auth_serversupplied_info
This changes auth_serversupplied_info into the IDL-defined struct
auth_user_info_dc.  This then in turn contains a struct
auth_user_info, which is the only part of the structure that is
mainted into the struct session_info.

The idea here is to avoid keeping the incomplete results of the
authentication (such as session keys, lists of SID memberships etc) in
a namespace where it may be confused for the finalised results.

Andrew Barltett
2011-02-09 01:11:06 +01:00
Matthieu Patou
504be0ac54 s4: make pipes with underscore works also
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jan  9 15:47:01 CET 2011 on sn-devel-104
2011-01-09 15:47:01 +01:00
Andrew Tridgell
ed8ea4ed18 s4-server: move the creation of the IPC$ share into ntvfs
the IPC$ share is only used by the ntvfs backends, and doesn't need to
be created on every load of smb.conf. This fixes a problem with
testparm showing the ipc$ share when it isn't defined in smb.conf.

This also removes the admin$ share, which really shouldn't be on by
default. The admin$ share is used for remote software installation,
and normally exposes the c:\windows directory on a windows
server. That makes no sense on Samba. If for some reason a admin$
share is needed, then the admin can create one as usual. Exposing /tmp
via admin$ by default seems like a bad idea.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-11 02:57:04 +00: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
Philip M. White
cb9d048f90 s4:waf - fix the build on Gentoo platforms
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-11-03 08:22:54 +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
Andrew Tridgell
0563c5bacf s4-rpc: split the dcesrv reply code out of dcerpc_server
this allows us to remove a dependency on the dcerpc_server from code
that uses rpc forwarding

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-30 23:49:01 +11:00
Jelmer Vernooij
8cf61377aa waf: Remove lib prefix from libraries manually. 2010-10-26 10:17:17 -07:00
Jelmer Vernooij
d9cbcdd410 s4: Drop duplicate 'lib' prefix for private libraries. 2010-10-26 10:17:16 -07:00
Jelmer Vernooij
2933fac7c7 s4: Rename NSS_WRAPPER to nss_wrapper.
Only link to nss_wrapper when it is enabled.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Oct 23 23:05:44 UTC 2010 on sn-devel-104
2010-10-23 23:05:43 +00:00
Jelmer Vernooij
9757a0c54c s4: Rename UID_WRAPPER to uid_wrapper.
Only link to uid_wrapper when it is enabled.
2010-10-23 22:24:06 +00:00
Jelmer Vernooij
7b8549348a s4: Rename WRAP_XATTR to wrap_xattr. 2010-10-23 22:24:06 +00:00
Jelmer Vernooij
cf26d8a958 s4: Rename LIBEVENTS to libevents. 2010-10-23 22:24:06 +00:00
Andrew Tridgell
56640a8501 s4-rpc_server: split out DCERPC_SHARE as a separate subsystem
this avoids a problem with -Wl,-no-undefined in the ntvfs layer

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:27 +11:00
Andrew Tridgell
cef53b289b s4-waf: removed the dependency loop between ntvfs and dcerpc_server
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:26 +11: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
Jelmer Vernooij
41e55d7894 ntvfs_ipc: add missing dependency on dcerpc_common. 2010-10-11 01:06:35 +02:00
Jelmer Vernooij
9b18d48d51 heimdal: Fix library name of gssapi. 2010-10-05 00:38:34 +02: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 Bartlett
6cf29b3e4f s4:security Change struct security_token->sids from struct dom_sid * to struct dom_sid
This makes the structure much more like NT_USER_TOKEN in the source3/
code.  (The remaining changes are that privilages still need to be merged)

Andrew Bartlett
2010-08-23 08:50:55 +10:00
Andrew Bartlett
60086dcf9a s4:ntvfs Don't treat the user SID and primary group SID special for idmap
This simply askes IDMAP about all the user SIDs, rather than the user
and group sid, followed by all but the first two sids from the token.

Andrew Bartlett
2010-08-18 09:30:08 +10: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
Matthias Dieter Wallnöfer
f6f21202eb s4:ntvfs/ipc/vfs_ipc.c - remove unused code
Spotted by the Solaris 10 compiler
2010-06-29 22:36:03 +02:00
Matthias Dieter Wallnöfer
146dad103b s4:ntvfs/ipc/vfs_ipc.c - add casts to suppress warnings on Solaris 10 2010-06-29 22:35:20 +02:00
Matthias Dieter Wallnöfer
7a3a1cb5a7 s4:ntvfs/simple/svfs_util.c - change an "asprintf" into a "talloc_asprintf" 2010-05-28 10:04:47 +02:00
Matthias Dieter Wallnöfer
69166d3ebb s4:ntvfs/nbench/vfs_bench.c - change a "asprintf" into a "talloc_asprintf" 2010-05-28 10:04:46 +02: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
Andrew Bartlett
6c726745a4 s4:ntvfs rename notify.idl to s4_notify.idl until we can merge this IDL
This IDL is almost common, but the source3 version has a
hand-marshalled server_id.  The s3compat build has problems with two
different idl files of the same name.

Andrew Bartlett
2010-05-24 23:08:11 +10:00
Matthias Dieter Wallnöfer
a05ac3039b s4:ntvfs/ipc/vfs_ipc.c - add more "const" in order to fix warnings 2010-05-21 23:35:57 +02: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
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +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
Stefan Metzmacher
7c4d9fa0e9 s4:ntvfs/ipc: remote // debug comments
metze
2010-04-27 15:11:09 +02:00
Stefan Metzmacher
d94c94fcb9 s4:ntvfs: remove socket_address based functions
metze
2010-04-27 13:02:26 +02:00
Stefan Metzmacher
bb04e90259 s4:ntvfs/ipc: pass the already given tsocket_address structures to the named_pipe_auth code
metze
2010-04-27 13:01:59 +02:00
Stefan Metzmacher
c04d809ba0 s4:ntvfs: add tsocket based addresses to ntvfs_context
metze
2010-04-27 13:01:57 +02:00
Günther Deschner
aae716d044 s4: fix some build warnings.
Guenther
2010-04-26 22:53:00 +02:00
Günther Deschner
1983d0dde7 s4: use generated rap header.
Guenther
2010-04-26 22:52:59 +02:00
Günther Deschner
1ede2a0577 s4: rename RAP share_enum_info to share_info.
Guenther
2010-04-26 22:52:45 +02:00
Andrew Tridgell
553324bc10 s4-waf: move to a universal method of recursing into subdirs
This works with both standalone lib builds and bundled builds
2010-04-06 20:27:25 +10:00
Andrew Tridgell
b690fedef5 s4-waf: removed the AUTOGENERATED markers
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
d8b91f1120 s4-waf: sys_lease depends on talloc 2010-04-06 20:27:14 +10:00
Andrew Tridgell
b0fb567f04 s4-waf: more dependencies on talloc
these are needed so we can support a system talloc without using the
bundled talloc.h
2010-04-06 20:27:13 +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
04fed1f2b6 build: sys_lease_linux needs to be conditionally enabled 2010-04-06 20:27:01 +10:00
Andrew Tridgell
344621cb0f build: conditionally enable inotify 2010-04-06 20:26:55 +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
dd05b6512a build: improve autoconf macros
- enable headers to be specified
- enable both forms of DECL check
- more libreplace checks
- more heimdal checks
- more sysdep checks
2010-04-06 20:26:42 +10:00
Andrew Tridgell
d87ea524d8 build: ntvfs/sysdep configure checks 2010-04-06 20:26:42 +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
Andrew Tridgell
80a37beb53 s4-pvfs: move the private ntcreatex flags to private_flags
Re-using two of the create_options bits was bound to eventually
cause problems, and indeed, Windows7 now uses one of those bits
when opening text files.

Fixes bug 7189
2010-03-05 16:12:05 +11:00
Andrew Tridgell
8fe783edaf s4-posix: allow change ownership of files if the user has the right privileges
When a user has SEC_PRIV_TAKE_OWNERSHIP or SEC_PRIV_RESTORE they have
permission to change the ownership of a file.

This should fix bug 6987

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-03 23:05:23 +11:00
Andrew Tridgell
781ad038c9 s4-krb5: propogate errors from a lot more kerberos functions
We need to be able to give sensible error messages when a kerberos
calls fails. This propogates the kerberos error up the stack to the
caller.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-26 13:59:16 +11:00