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

621 Commits

Author SHA1 Message Date
Jeremy Allison
3d34406c7b Windows does canonicalization of inheritance bits. Do the same.
We need to filter out the
SEC_DESC_DACL_AUTO_INHERITED|SEC_DESC_DACL_AUTO_INHERIT_REQ
bits. If both are set we store SEC_DESC_DACL_AUTO_INHERITED
as this alters whether SEC_ACE_FLAG_INHERITED_ACE is set
when an ACE is inherited. Otherwise we zero these bits out.
See:

http://social.msdn.microsoft.com/Forums/eu/os_fileservices/thread/11f77b68-731e-407d-b1b3-064750716531

for details.
2012-08-30 10:08:50 -07:00
Jeremy Allison
70ebf1da67 Re-add set_sd(), called from set_sd_blob(). Allows us to centralize all ACL canonicalization. 2012-08-30 10:08:50 -07:00
Jeremy Allison
8c84ecef89 Rename set_sd() to set_sd_blob() - this describes what it does. 2012-08-30 10:08:50 -07:00
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().

A simple patch, but hits a lot of files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Stefan Metzmacher
d6939c39c0 s3:smbd: change nt_open_pipe() to uint16_t pnum/fnum
This is SMB1 code...

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 28 14:47:45 CEST 2012 on sn-devel-104
2012-06-28 14:47:45 +02:00
Jeremy Allison
818fd7e917 Remove unused code now we set the correct command codes. 2012-06-19 10:27:24 -07:00
Jeremy Allison
816c40cb0d Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params
Found by Richard Sharpe <realrichardsharpe@gmail.com>. The correct
command code in a reply to NT Transact Secondary (0xa1) is
NT Transact (0xa0).
2012-06-15 21:10:37 -07:00
Michael Adam
b4f6ef4e95 s3:smbd: change nttrans.c to use fsp_fnum_dbg() for fsp->fnum logging.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15 03:28:14 +02:00
Stefan Metzmacher
b5b943dbad s3:smbd: make use of change_notify_fsp_has_changes()
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
e262db6c31 s3:smbd: only strip \\ off the name if present (for ntcreatex)
metze
2012-05-28 19:51:58 +02:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr  6 01:47:43 CEST 2012 on sn-devel-104
2012-04-06 01:47:43 +02:00
Richard Sharpe
3be2af1df9 Add DEBUG statements to show when access has been denied and why.
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Wed Mar 28 07:07:26 CEST 2012 on sn-devel-104
2012-03-28 07:07:26 +02:00
Volker Lendecke
11d087aa04 s3: Remove chain_reply
<insert your favourite tombstone ascii art here>
2012-03-10 15:34:12 +01:00
Volker Lendecke
90b33a05e9 s3: Make sure the andX chains are ended correctly
Normally chain_reply took care of this. This will go away soon.
2012-03-10 15:34:11 +01:00
Volker Lendecke
c86584adaf s3: Fix typos 2012-02-21 15:43:28 +01:00
Jeremy Allison
da992be64f Fix bug 8636 - When returning an ACL without SECINFO_DACL requested, we still set SEC_DESC_DACL_PRESENT in the type field.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 30 04:59:07 CET 2011 on sn-devel-104
2011-11-30 04:59:07 +01:00
David Disseldorp
d5ea379428 s3: Remove duplicate fsctl function definitions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19 15:44:29 +02:00
Frank Lahm
c3bdcab516 First part of fix for bug #8419 - Make VFS op "streaminfo" stackable.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 17 21:39:32 CEST 2011 on sn-devel-104
2011-10-17 21:39:32 +02:00
Frank Lahm
7a0b5d6fc5 Add support for VFS op streaminfo chaining in all relevant VFS modules.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 14 03:26:06 CEST 2011 on sn-devel-104
2011-10-14 03:26:06 +02:00
Richard Sharpe
c875ab8747 Move FSCTL handling into the VFS. Initial code changes. Passes smbtorture NTTRANS-FSCTL. Test added to selftests. 2011-10-01 07:02:20 -07:00
Jeremy Allison
893497ee16 Fix bug #8458] - IE9 on Windows 7 cannot download files to samba 3.5.11 share
Handle the SECINFO_LABEL flag in the same was as Win2k3.
2011-09-21 13:34:50 -07:00
Volker Lendecke
f9d183f931 s3: Pass sconn explicitly to open_was_deferred 2011-08-02 19:18:08 +02:00
Andrew Bartlett
9289537993 s3-auth Use struct auth_user_info_unix for unix_name and sanitized_username
This is closer to the layout of struct auth_session_info in auth.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Volker Lendecke
d77854fbb2 struct make "struct shadow_copy_data" its own talloc context 2011-05-31 21:47:07 +02:00
Volker Lendecke
0ec9a90c29 s3: Remove SHADOW_COPY_DATA typedef 2011-05-31 21:47:07 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Jeremy Allison
4f41be356a Fix many const compiler warnings. 2011-05-05 10:41:59 -07:00
Andrew Bartlett
0520da2bbe s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCH
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0a3c84b554 s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
317e19aeb3 s3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDEN
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:12 +10:00
Stefan Metzmacher
4a4a774e61 s3:smbd/nttrans: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
We rely on uint64_t for a long time now...

metze
2011-04-23 11:17:46 +02:00
Günther Deschner
165521e20d s3: only include smb profiling where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
2011-04-14 01:31:39 +02:00
Volker Lendecke
015511d12a s3: Make send_nt_replies() static
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr 13 16:25:29 CEST 2011 on sn-devel-104
2011-04-13 16:25:29 +02:00
Jeremy Allison
b6a30be702 Fix bug #7080 - Quota only shown when logged as root.
Remove the final incorrect uses of conn->session_info->utok.uid.
When we're in the "admin users" list, then this value is not set
to zero.

Inspired by the comment on this bug by Dmitry Butskoy <dmitry@butskoy.name>.

I'll create a different fix for 3.5.x.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Apr  5 21:53:59 CEST 2011 on sn-devel-104
2011-04-05 21:53:59 +02:00
Günther Deschner
b1e3b9d7c1 s3: only include ntioctl.h where needed.
Guenther
2011-03-30 01:13:10 +02:00
Günther Deschner
af300a9fcb s3-auth: smbd needs auth.h
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
235f148590 s3-passdb: use passdb headers where needed.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Andrew Bartlett
2e69e89456 s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_info
These variables, of type struct auth_serversupplied_info were poorly
named when added into 2001, and in good consistant practice, this has
extended all over the codebase in the years since.

The structure is also not ideal for it's current purpose.  Originally
intended to convey the results of the authentication modules, it
really describes all the essential attributes of a session.  This
rename will reduce the volume of a future patch to replaced these with
a struct auth_session_info, with auth_serversupplied_info confined to
the lower levels of the auth subsystem, and then eliminated.

(The new structure will be the output of create_local_token(), and the
change in struct definition will ensure that this is always run, populating
local groups and privileges).

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-22 16:20:10 +11:00
Jeremy Allison
a65bce4e38 Add uint32_t name_hash argument (currently unused) to get_file_infos().
Will be used when we store more than one delete on close token.
2011-01-25 14:02:18 -08:00
Jeremy Allison
bb54f72b94 Make processing of incoming stream rename paths common between reply_mv and ntrename. Ensure we don't depend on "./" in the streams module. 2011-01-20 16:27:56 -08:00
Volker Lendecke
d082701ea5 s3: Reply correctly to FSCTL_IS_VOLUME_DIRTY 2010-12-19 23:25:06 +01:00
Jeremy Allison
16d6da8a9b Move checks inside file_set_sparse() to allow it to be called from anywhere.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec 17 21:56:38 CET 2010 on sn-devel-104
2010-12-17 21:56:38 +01:00
Jeremy Allison
fe50632d54 file_set_sparse needs to be a handle based call. 2010-12-17 21:11:04 +01:00
Björn Jacke
192c4a145f s3:smbd: implement FSCTL_SET_SPARSE more correctly
this is a port of a patch from metze for 3.3:

We don't do the "strict allocation" when the sparse bit isn't
set, but that shouldn't matter.

We now allow windows applications to set and unset the sparse
bit.

Note that in order to implement this 100% like described
in [MS-FSA], we'd have to change our data model and support
the sparse flag per stream.
2010-12-17 21:11:04 +01:00
Jeremy Allison
b1dacb8195 Add in fsp->access_mask checks. Not required (underlying system does this)
but makes logic cleaner. Pointed out by Metze.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 24 01:47:13 CET 2010 on sn-devel-104
2010-11-24 01:47:13 +01:00
Volker Lendecke
f6a1f46b5e s3: Align nttrans replies the same way Windows does it
If you look at traces of "smbcacls" reading a secdesc from Samba and from W2k3
shows this difference in the querysecdesc nttrans reply. This patch is
necessary to enable viewing previous versions via the shadow copy modules from
Windows 2008. The other client versions seem not to care, but W2k8 does.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov  3 17:04:28 UTC 2010 on sn-devel-104
2010-11-03 17:04:28 +00:00