1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

622 Commits

Author SHA1 Message Date
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
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
Kai Blin
ea055e8c79 s4: Switch to S3-style id mapping data types. 2010-02-11 23:56:35 +01:00
Matthias Dieter Wallnöfer
e34637b2a6 s4:Remove "Py_RETURN_NONE" compatibility code
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Matthias Dieter Wallnöfer
16aa0744c6 s4:UID wrapper - Fix includes
The includes of the UID wrapper headers werent't really efficient according
to metze's post on the technical mailing list (http://lists.samba.org/archive/samba-technical/2010-February/069165.html).
To achieve this move the "uid_wrapper.h" includes into "lib/util/unix_privs.c",
 "lib/util/util.c", "ntvfs/posix/pvfs_acl.c" and "ntvfs/unixuid/vfs_unixuid.c".
2010-02-05 19:47:26 +01:00
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Jelmer Vernooij
8562bbdce5 pyxattr: Move to the same directory as the xattr code. 2010-01-25 15:18:01 +01:00
Matthieu Patou
c442b2534f s4: ntvfs, create push_xattr_blob_tdb_raw and pull_xattr_blob_tdb_raw that do not depend on pvfs objects
Following a talk with tridge on IRC, this patch allow (pull|push)_xattr_blob to be called without
  having a pvfs object. It's handy for programs that wants to manipulate xattr directly.
2010-01-21 07:11:15 +13:00
brendan powers
0708b2a0c9 s4-ntvfs: check if pvfs is NULL in pvfs_logoff
pvfs can be NULL if the directory a share points to does not exist. In
this case, there would be no open files, so it is safe to just return
from the function.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-17 11:48:39 +11:00
Andrew Tridgell
d31b6360d6 s4-ntvfs: try to fix bug 6989
bug 6989 is a rare crash that has occurred in production. My best
guess as to the cause is the talloc_free() not being specific enough
as to which parent needs to be freed.
2009-12-16 20:56:20 +11:00
Kamen Mazdrashki
f1d9382b18 s4/smbstreams: Fix memory use after free.
The bug is that sometimes 'streams' is parent for 'new_name'.
With this said, 'new_name' must be dupped before 'streams'
pointer is freed.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-08 12:39:11 +11:00
Matthias Dieter Wallnöfer
fed6ac05d0 s4:ntvfs/posix/pvfs_streams - Fix "discard const" warning
I removed one "const" in front of a string declaration to achieve this.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-03 21:46:31 +11:00
Matthias Dieter Wallnöfer
1a855eb741 s4:ntvfs/posix/pvfs_resolve - Fix "discard const" warning
I removed two "const"s in front of string declarations to achieve this.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-03 21:46:31 +11:00
Andrew Tridgell
d78921d78c s4-pvfs: fixed access check failure in SFILEINFO test
matching windows behaviour is not always the right thing to do!
2009-11-27 16:05:06 +11:00
Andrew Tridgell
d3d7ca8eea s4-smb2: SMB2 uses NT_STATUS_CANCELLED for cancelled locks 2009-11-27 16:05:06 +11:00
Matthias Dieter Wallnöfer
07e971f1c1 s4:ntvfs/posix/pvfs_acl - Remove unused variable "token" 2009-11-20 12:18:45 +01:00
Andrew Tridgell
4828f92754 s4-pvfs: fill in alignment_requirement (valgrind error) 2009-10-19 20:03:12 +11:00
Andrew Tridgell
e5b36c6eae s4-pvfs: another uninitialised variable
thanks to valgrind for this one
2009-10-19 13:51:17 +11:00
Andrew Tridgell
1219dac5ae s4-pvfs: fixed uninitialised variable
This caused havoc on the build farm. Interestingly, it only affected
gcc 4.3.3, not gcc 4.4.1
2009-10-19 11:59:57 +11:00
Andrew Tridgell
764c09e6bc s4-streams: fixed handling of stream rename and overwrite 2009-10-18 15:06:13 +11:00
Andrew Tridgell
44612c74a6 s4-pvfs: rename with full name gives SHARING_VIOLATION 2009-10-18 15:06:12 +11:00
Andrew Tridgell
83db71e9a7 s4-pvfs: when reporting the file name, don't include the :$DATA suffix 2009-10-18 15:06:12 +11:00
Andrew Tridgell
2d4ad4f504 s4-pvfs: the STREAM_INFORMATION calls don't need any access flags 2009-10-18 15:06:11 +11:00
Andrew Tridgell
edd0ea5225 s4-pvfs: fixed update of stream sizes
The data_blob_free() was changing the size we set the stream to
2009-10-18 15:06:11 +11:00
Andrew Tridgell
a2aa13da32 s4-pvfs: more fixes for ACLs on file creation
The passed in SD is not used to limit the access mask allowed on file
create.
2009-10-18 10:32:06 +11:00
Andrew Tridgell
bae8c93d9b s4-smb2: fixed SMB2 find commands
The change to check for invalid \ prefix on SMB2 paths broke the
internal SMB2 code.
2009-10-18 10:30:10 +11:00
Andrew Tridgell
0463d69883 s4-pvfs: change the handling of access checking on create
Previously when a file was created, we produces the resulting access
mask based on an ACL check against the parent. This change means we
now calculate the inherited ACL much earlier, and produce the
resulting access mask from that ACL, or the user supplied ACL.
2009-10-18 07:13:47 +11:00