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

47 Commits

Author SHA1 Message Date
Jeremy Allison
1970294ab3 r10359: Ensure that smb.conf requests for hidden files are honored, even
when DOS attributes are stored in EA's.
Jeremy.
(This used to be commit 758b30710e)
2007-10-10 11:03:41 -05:00
Jeremy Allison
20f2305c50 r10276: Fix for bug #3104 from Leo Weppelman <leo@wau.mis.ah.nl>.
Don't update the time on read-only shares.
We need this as set_filetime (which can be called on
close and other paths) can end up calling this function
without the NEED_WRITE protection.
Jeremy.
(This used to be commit 54eab3828a)
2007-10-10 11:03:40 -05:00
Jeremy Allison
af8a691db1 r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
(This used to be commit c7fe18761e)
2007-10-10 10:58:18 -05:00
Jeremy Allison
6d39f3bdce r7452: Set sparse flag if needed. Based on code from jpeach@sgi.com.
Fixes bug #2774.
Jeremy.
(This used to be commit 5d366047de)
2007-10-10 10:57:09 -05:00
Jeremy Allison
bd16770954 r6895: Add "acl check permissions" to turn on/off the new behaviour of
checking for write access in a directory before delete. Also
controls checking for write access before labeling a file read-only
if DOS attributes are not being stored in EA's.
Docuementation to follow.
Jeremy.
(This used to be commit dd1a5e6e49)
2007-10-10 10:56:56 -05:00
Jeremy Allison
fcfa75b2fc r6049: Ensure "dos filetime" checks file ACLs correctly. May fix Excel "read-only"
issue.
Jeremy.
(This used to be commit 80e788143a)
2007-10-10 10:56:18 -05:00
Jeremy Allison
46f546571b r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,
not an existing one.
Jeremy.
(This used to be commit fbbdb72cf1)
2007-10-10 10:53:27 -05:00
Günther Deschner
c0cad75f09 r3673: Do not fail on setting file attributes with acl support enabled.
Rolling back r3496 (close #2015).

Guenther
(This used to be commit e88ac80784)
2007-10-10 10:53:13 -05:00
Günther Deschner
193e82b056 r3496: Fix calling of get_acl_group_bits().
Guenther
(This used to be commit 3acc74eef5)
2007-10-10 10:53:08 -05:00
Jeremy Allison
8df096a75e r2700: Fix bug where we could incorrectly set sparse attribute. Don't use
st_blksize, it isn't what you think....
Jeremy.
--his line, and those below, will be ignored--

M    source/smbd/dosmode.c
(This used to be commit 0a40c1a50f)
2007-10-10 10:52:49 -05:00
Jeremy Allison
03d4344432 r971: Auto remove store dos attributes if underlying filesystem
doesn't support EA's.
Jeremy.
(This used to be commit 9de6b25c9e)
2007-10-10 10:51:51 -05:00
Jeremy Allison
722aa118c6 Added per-share parameter "store dos attributes". When set, will store
dos attributes in an EA. Based on an original patch from tridge, but
modified somewhat to cover all cases.
Jeremy.
(This used to be commit ed653cd468)
2004-04-02 18:46:19 +00:00
Jeremy Allison
e869727420 Reformat in preparation for EA dosmode attributes.
Jeremy
(This used to be commit de2f149e9e)
2004-03-31 22:46:15 +00:00
Jeremy Allison
7cea655424 Fix for #1064 - ensure truncate attribute checking is done correctly on "hidden" dot files.
Jeremy.
(This used to be commit a6045c904f)
2004-03-19 23:46:48 +00:00
Jeremy Allison
09a7088156 Patch from Jim McDonough for bug #802. Retrieve the correct ACL group bits
if the file has an ACL.
Jeremy.
(This used to be commit 7bf5ed30ce)
2003-11-25 23:25:42 +00:00
Tim Potter
ec890d5c0f Enclose usage of st_blksize and st_blocks struct stat members in
#ifdef HAVE_STAT_ST_BLKSIZE and #ifdef HAVE_STAT_ST_BLOCKS,
respectively.

Fixes bug 550 reported by Joachim Schmitz <schmitz@hp.com>.
(This used to be commit 18adfdbe0c)
2003-10-14 03:56:42 +00:00
Alexander Bokovoy
bc2a3748e9 Prefix VFS API macros with SMB_ for consistency and to avoid problems with VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out
(This used to be commit c2689ed118)
2003-05-14 10:59:01 +00:00
Alexander Bokovoy
e7c8c15888 Fix VFS layer:
1. Finally work with cascaded modules with private data storage per module
2. Convert VFS API to macro calls to simplify cascading
3. Add quota support to VFS layer (prepare to NT quota support)

Patch by Stefan (metze) Metzemacher, with review of Jelmer and me
Tested in past few weeks. Documentation to new VFS API for third-party developers to follow
(This used to be commit 91984ef5ca)
2003-05-11 23:34:18 +00:00
Andrew Bartlett
266ec4aac0 Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
(This used to be commit 9ef0d40c3f)
2003-02-24 03:09:08 +00:00
Jelmer Vernooij
127e77e6e3 Sync 3.0 branch with head
(This used to be commit 42615b945e)
2002-08-17 15:27:10 +00:00
Jeremy Allison
5d1db25abd Mask off the aDIR on setfileinfo.
Jeremy.
(This used to be commit d9cb1bf20a)
2002-03-05 01:43:50 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
53850c51ca configure:
configure.in:
include/config.h.in:
include/profile.h:
smbd/vfs-wrap.c:
smbd/vfs.c:
Added fchmod and fchown to VFS (sorry Gerald - but we needed them anyway).
smbd/dosmode.c:
smbd/files.c:
printing/printfsp.c:
smbd/close.c:
smbd/open.c:
Fixed "dos filemode" correctly so there are no race conditions. Forces test
of open of file O_WRONLY before allowing fchmod as root. Afterwards, calls
standard close function that preserves POSIX locks due to POSIX-me-harder
braindamage. :-). Andrew please review this code.
Also - in removing the tmpdir param in smbrun an extra NULL parameter
was missed in each print_run_command() call (which is a varargs fn.).
Now fixed.
Jeremy.
(This used to be commit 32397e5bc6)
2001-04-14 00:19:12 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
Jeremy Allison
62dc55a432 configure configure.in smbd/posix_acls.c smbd/dosmode.c: Fix for zero permission W2K profiles.
libsmb/cliconnect.c rpc_client/cli_login.c smbd/reply.c: codepage fixes from Tim.
Jeremy.
(This used to be commit 3ded1e6bd5)
2001-02-16 00:24:43 +00:00
Jeremy Allison
ebee2c6c6d Get the logic right thistime :-(.
Jeremy.
(This used to be commit 83596034cd)
2001-01-17 23:47:08 +00:00
Jeremy Allison
aa7cd80206 Typo in new file_chmod code caused file attribute changes to fail.
THIS NEEDS TO BE ADDED TO APPLIANCE-HEAD.
Jeremy.
(This used to be commit b92ccc0c8e)
2001-01-17 23:41:01 +00:00
Jeremy Allison
615af12cf2 Fix from "B.V.Dean" <B.V.Dean@ukc.ac.uk> to add "dos filemode" parameter
to allow a chmod to be done if the user has write access to a file, just
like Windows allows. Off by default (compare with "dos filetimes" parameter).
Jeremy.
(This used to be commit 8abdf0e29f)
2001-01-09 20:34:37 +00:00
Jeremy Allison
636f146abf Restructuring of vfs layer to include a "this" pointer - can be an fsp or
a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).

In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
(This used to be commit b07611f815)
2000-10-06 03:21:49 +00:00
Jeremy Allison
b43b2e4f8a Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector them
through the VFS. All file access/directory access code in smbd should now
go via the vfs. Added vfs_chown/vfs_chmod calls. Still looking at vfs_get_nt_acl()
vfs_set_nt_acl() call API design.
Jeremy.
(This used to be commit f96625ec12)
2000-09-27 19:09:59 +00:00
Tim Potter
2a1dbb0acd Delete OriginalDir stuff.
(This used to be commit 3d0f1845c8)
2000-06-23 05:57:48 +00:00
Shirish Kalele
651946153e The new msdfs implementation that uses symlinks to point to other
servers. Very intuitive.

Removed the dfs map parsing code and tdb maintenance code (files
msdfs/parse_dfs_map.c & msdfs/msdfs_tdb.c), dfs map loading and unloading
calls (param/loadparm.c smbd/server.c).

Added code to display msdfs format symlinks as directories in a
transact2_findfirst/findnext. (smbd/trans2.c)

Modified msdfs/msdfs.c to use the msdfs symlinks to
create dfs referrals.

Changed msdfs/README to reflect new operability.
(This used to be commit 6803d2574f)
2000-05-16 01:13:16 +00:00
Andrew Tridgell
49a0e6d598 more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
(This used to be commit 92109d7b3c)
2000-05-10 10:41:59 +00:00
Tim Potter
ae7696117e Put back lots of missing calls to dos_to_unix(). Thanks to
aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO)
(This used to be commit 176c405d27)
2000-02-03 23:08:24 +00:00
Tim Potter
16bb009dbb Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops
structure contained in the connection_struct.
(This used to be commit 3aad500c0f)
2000-02-03 05:17:25 +00:00
Jeremy Allison
3a6c2069d7 Added "inherit permissions" patch.
Fixed locking bug found by Andrew.
Jeremy.
(This used to be commit 38dffd360d)
2000-01-14 01:41:04 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Tim Potter
6d5ef2e929 Use VFS operations for file I/O.
(This used to be commit cfddbdb624)
1999-04-04 06:25:13 +00:00
Jeremy Allison
b8b67f4fab configure configure.in: Added checks for statvfs64. Last bit of 64 bit widening (I hope :-).
include/config.h.in: Added #undef STAT_STATVFS64.
include/includes.h: Added SMB_STRUCT_STATVFS type, Changed SMB_BIG_INTEGER to
                    SMB_BIG_UINT and SMB_BIG_INT types.
include/smb.h: Added flag defines from CIFS spec.
lib/debug.c: Fixed one more mode_t issue.
lib/system.c: Added sys_statvfs wrapper.
lib/util.c: Changed trim_string to use size_t.
param/loadparm.c: Moved "blocking locks" into locking section. Alphabetised
                  locking options. Question - shuld we do this for all options ?
passdb/ldap.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/nispass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/smbpass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
smbd/dfree.c: Changed to use 64 bit types if available. Moved to use unsigned
              types.
smbd/dosmode.c: Fixed one more mode_t issue.
smbd/negprot.c: Changed literals to be FLAG_ #defines.
smbd/nttrans.c: Removed dead code.
smbd/open.c: Changed disk_free call.
smbd/process.c: Changed literals to be FLAG_ #defines.
smbd/reply.c: Changed disk_free call.
smbd/trans2.c: Fixed but in SMB_QUERY_FS_VOLUME_INFO call. Was using
               UNICODE - should use ascii.
tests/summary.c: Added STAT_STATVFS64 check.
Jeremy.
(This used to be commit c512b1b91f)
1998-09-17 23:06:57 +00:00
Jeremy Allison
ac9b687cc2 configure configure.in: Added tests for fseek64 and ftell64.
config.h.in: Added fseek64 and ftell64.
includes.h: Added definition of SMB_BIG_INTEGER.
smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
access.c: Tidyup of dbug statement.
system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t.
asyncdns.c: Tidyup of comment.
loadparm.c: Tidyup of set_default_server_announce_type() function definition.
ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER.
smbpassfile.c: Use sys_fseek().
chgpasswd.c: Tidyup of debug statement.
dosmode.c: Changed mode calls to use mode_t.
ipc.c: Removal of dead code.
nttrans.c: Changed mode calls to use mode_t.
open.c: Changed mode calls to use mode_t.
pipes.c: Removal of dead code.
reply.c: Removal of dead code.
trans2.c: Removal of dead code. Changed mode calls to use mode_t.
Jeremy.
(This used to be commit c381d32e3d)
1998-09-17 19:16:12 +00:00
Jeremy Allison
1855627413 More abstraction of file system data types, to move to a 64
bit file interface for the NT SMB's.

Created a new define, SMB_STRUCT_STAT that currently is
defined to be struct stat - this wil change to a user
defined type containing 64 bit info when the correct
wrappers are written for 64 bit stat(), fstat() and lstat()
calls.

Also changed all sys_xxxx() calls that were previously just
wrappers to the same call prefixed by a dos_to_unix() call
into dos_xxxx() calls. This makes it explicit when a pathname
translation is being done, and when it is not.

Now, all sys_xxx() calls are meant to be wrappers to mask
OS differences, and not silently converting filenames on
the fly.

Jeremy.
(This used to be commit 28aa182dbf)
1998-09-01 20:11:54 +00:00
Andrew Tridgell
2c065107b1 changed the default permissions code to do this:
if ((sbuf->st_mode & S_IWUSR) == 0)
      result |= aRONLY;

rather than the very complex user/group permissions checks we do
currently. This is equivalent ot setting "alternate permissions = yes"
in the old code. The change is motivated by three main reasons:

1) it's basically impossible to second guess whether a file is
writeable without trying to open it for writing. ACLs, root squash etc
just make it too hard.

2) setting it not RONLY if the owner can write is closer to what NT
does (eg. look at a cdrom - files are not marked read only).

3) it prevents the silly problem of copying files from a read only
share to a writeable share and then finding you can't write to them as
windows preserves the RONLY flag. Lots of people get bitten by this
when they drag a folder from a Samba drive. It also hurts some install
programs.

I have also added a new flag type for loadparm.c called
FLAG_DEPRECATED which I've set for "alternate permissions". I'll soon
add code to testparm to give a warning about deprecated options.
(This used to be commit c4363a12fd)
1998-08-25 06:40:42 +00:00
Andrew Tridgell
c3effa8b59 this completes the splitup of server.c.
the splitup was done with an axe, not a scalpel, so there are some
rough edges. I mostly wanted to get the general form right with fine
tuning of what goes where to come later. Still, this is better than
what we had before where server.c was a general repository for
anything that didn't fit elsewhere.
(This used to be commit a6d194886a)
1998-08-17 13:11:34 +00:00
Andrew Tridgell
0922615405 more splitting of server.c
created dosmode.c and filename.c
(This used to be commit 534a90ca44)
1998-08-17 07:40:06 +00:00