summaryrefslogtreecommitdiff
path: root/source3/smbd/dosmode.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r11943: Don't reset attrs to zero in EA get - we are addingJeremy Allison1-1/+2
to the attr list not resetting it. Jeremy. (This used to be commit 8ee569626be7ebf3b6ebf71e1becdd091b9e893a)
2007-10-10r11767: Doesn't need to be exported.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 52b6f0db2e4a209641187255bd8815c8d03a5315)
2007-10-10r11718: Filter stored DOS attributes by SAMBA_ATTRIBUTES_MASK (0x7f).Jeremy Allison1-0/+4
Jeremy. (This used to be commit 61444049e1543b364eea2ee79743287c75d37db5)
2007-10-10r10979: After discussions on IRC about profile shares,Jeremy Allison1-4/+9
added new parameter : map readonly = [yes|no|permissions] If yes: map inverse of user "w" bit to mean readonly. If no: never set DOS readonly bit. If permissions: check file permissions for user and set readonly bit if the current user cannot write. If store dos attributes is set to yes then this parameter is ignored. Jeremy. (This used to be commit da4238d18c7a57d1264db8517fb027a10a11baed)
2007-10-10r10888: We've already checked 'CAN_WRITE' so we don't need to do it again.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 1c52bf875cfdacb058aa6f54ab27b9f7e2d178dc)
2007-10-10r10885: Fix bug where read-only share files are always seen asJeremy Allison1-1/+1
read-only. Noticed by Andrew Bartlett. Jeremy (This used to be commit a33f4f0d2afe28ca0e3ab6c9ecfcdbaa267a7fbe)
2007-10-10r10359: Ensure that smb.conf requests for hidden files are honored, evenJeremy Allison1-12/+13
when DOS attributes are stored in EA's. Jeremy. (This used to be commit 758b30710e9f84f19b79c39afddc742aef495ebd)
2007-10-10r10276: Fix for bug #3104 from Leo Weppelman <leo@wau.mis.ah.nl>.Jeremy Allison1-0/+11
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 54eab3828aa0405288b68f6954abba201564c9e7)
2007-10-10r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison1-1/+1
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 c7fe18761e2c753afbffd3a78abff46472a9b8eb)
2007-10-10r7452: Set sparse flag if needed. Based on code from jpeach@sgi.com.Jeremy Allison1-5/+12
Fixes bug #2774. Jeremy. (This used to be commit 5d366047debed68f36d44d34233ba4670e412d1e)
2007-10-10r6895: Add "acl check permissions" to turn on/off the new behaviour ofJeremy Allison1-5/+12
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 dd1a5e6e499dd721c5bb8d56a61810a7454a3449)
2007-10-10r6049: Ensure "dos filetime" checks file ACLs correctly. May fix Excel ↵Jeremy Allison1-18/+7
"read-only" issue. Jeremy. (This used to be commit 80e788143a6c3d973d3b8e57d91ca5c4a83605b2)
2007-10-10r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,Jeremy Allison1-6/+6
not an existing one. Jeremy. (This used to be commit fbbdb72cf1adfe567112556626f26b031747f440)
2007-10-10r3673: Do not fail on setting file attributes with acl support enabled.Günther Deschner1-3/+1
Rolling back r3496 (close #2015). Guenther (This used to be commit e88ac807847bd016f9c921f01f788708b1564b5c)
2007-10-10r3496: Fix calling of get_acl_group_bits().Günther Deschner1-1/+3
Guenther (This used to be commit 3acc74eef5dae16d7e2792206640904265c42494)
2007-10-10r2700: Fix bug where we could incorrectly set sparse attribute. Don't useJeremy Allison1-2/+2
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 0a40c1a50f0e4b1b7efc9a53d22ceac14841bccf)
2007-10-10r971: Auto remove store dos attributes if underlying filesystemJeremy Allison1-0/+13
doesn't support EA's. Jeremy. (This used to be commit 9de6b25c9e9abe982e21b0229df520802cafbfd8)
2004-04-02Added per-share parameter "store dos attributes". When set, will storeJeremy Allison1-7/+122
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 ed653cd468213e0be901bc654aa3748ce5837947)
2004-03-31Reformat in preparation for EA dosmode attributes.Jeremy Allison1-123/+125
Jeremy (This used to be commit de2f149e9e687fc8cba6870d921341a6a1fd9c13)
2004-03-19Fix for #1064 - ensure truncate attribute checking is done correctly on ↵Jeremy Allison1-4/+26
"hidden" dot files. Jeremy. (This used to be commit a6045c904fbe7df111c520134581bfd4f1ca67a8)
2003-11-25Patch from Jim McDonough for bug #802. Retrieve the correct ACL group bitsJeremy Allison1-0/+3
if the file has an ACL. Jeremy. (This used to be commit 7bf5ed30ce74ba658ca35059955748c1d8cbd6d2)
2003-10-14Enclose usage of st_blksize and st_blocks struct stat members inTim Potter1-0/+2
#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 18adfdbe0c6ed79ba8ac07956b1e7abc226556c3)
2003-05-14Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy1-7/+7
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 c2689ed118b490e49497a76ed6a2251262018769)
2003-05-11Fix VFS layer:Alexander Bokovoy1-7/+7
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 91984ef5caa2d13c5d52e1f535bd3bbbae1ec978)
2003-02-24Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.Andrew Bartlett1-1/+1
Andrew Bartlett (This used to be commit 9ef0d40c3f8aef52ab321dc065264c42065bc876)
2002-08-17Sync 3.0 branch with headJelmer Vernooij1-45/+47
(This used to be commit 42615b945e2e48e53a21ea47f2e45407913a6a1e)
2002-03-05Mask off the aDIR on setfileinfo.Jeremy Allison1-0/+2
Jeremy. (This used to be commit d9cb1bf20ac8a739102b03d9a70e34fe5cb2f0f7)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-1/+1
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-04The big character set handling changeover!Andrew Tridgell1-2/+2
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 debb471267960e56005a741817ebd227ecfc512a)
2001-04-14configure:Jeremy Allison1-11/+15
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 32397e5bc6d995ce7ca37c82d6aedc1e5b1b6fbd)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-4/+0
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2001-02-16configure configure.in smbd/posix_acls.c smbd/dosmode.c: Fix for zero ↵Jeremy Allison1-0/+2
permission W2K profiles. libsmb/cliconnect.c rpc_client/cli_login.c smbd/reply.c: codepage fixes from Tim. Jeremy. (This used to be commit 3ded1e6bd5f79948e437ce5b1799705945f36ad2)
2001-01-17Get the logic right thistime :-(.Jeremy Allison1-2/+3
Jeremy. (This used to be commit 83596034cdecc7b03e35c0b4bb149e6bf9cebc70)
2001-01-17Typo in new file_chmod code caused file attribute changes to fail.Jeremy Allison1-1/+1
THIS NEEDS TO BE ADDED TO APPLIANCE-HEAD. Jeremy. (This used to be commit b92ccc0c8e5d066eeb077dfced6e717cd741c7a6)
2001-01-09Fix from "B.V.Dean" <B.V.Dean@ukc.ac.uk> to add "dos filemode" parameterJeremy Allison1-36/+70
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 8abdf0e29fdb02a7929aa4395947b5023a7194a0)
2000-10-06Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison1-2/+2
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 b07611f8159b0b3f42e7e02611be9f4d56de96f5)
2000-09-27Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison1-4/+4
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 f96625ec124adb6e110dc54632e006b3620a962b)
2000-06-23Delete OriginalDir stuff.Tim Potter1-2/+2
(This used to be commit 3d0f1845c8cefccfabcfd35694264c1e5f52c3af)
2000-05-16The new msdfs implementation that uses symlinks to point to otherShirish Kalele1-1/+1
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 6803d2574fab9e5931786d5c9aa5dc5867bb5f05)
2000-05-10more merging voodooAndrew Tridgell1-0/+4
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 92109d7b3c06f240452d39f669ecb8c9c86ab610)
2000-02-03Put back lots of missing calls to dos_to_unix(). Thanks toTim Potter1-1/+1
aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO) (This used to be commit 176c405d2702a4245561ff56c8eac3c754a0dea3)
2000-02-03Mega-VFS merge. Yeah baby!Tim Potter1-5/+5
Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct. (This used to be commit 3aad500c0fb61232ed3431ff4b743b5d18ec852f)
2000-01-14Added "inherit permissions" patch.Jeremy Allison1-18/+59
Fixed locking bug found by Andrew. Jeremy. (This used to be commit 38dffd360dc2e44bfc9e751f017e24f81ff0f2fa)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-14/+11
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-04-04Use VFS operations for file I/O.Tim Potter1-5/+5
(This used to be commit cfddbdb62485256a947a30e04c753200451cbe1c)
1998-09-17configure configure.in: Added checks for statvfs64. Last bit of 64 bit ↵Jeremy Allison1-1/+1
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 c512b1b91fb7f2a7a93b9033a33e06d966daadb4)
1998-09-17configure configure.in: Added tests for fseek64 and ftell64.Jeremy Allison1-1/+1
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 c381d32e3dc23fe887408016cae821aceb30da2c)
1998-09-01More abstraction of file system data types, to move to a 64Jeremy Allison1-10/+10
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 28aa182dbffaa4ffd86047e608400de4b26e80eb)