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

56 Commits

Author SHA1 Message Date
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02: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
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
83db71e9a7 s4-pvfs: when reporting the file name, don't include the :$DATA suffix 2009-10-18 15:06:12 +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
Stefan Metzmacher
5240b10eaa s3:ntvfs/posix: avoid unnesessary talloc_reference()
This caused the panics on the RAW-SETFILEINFO.RENAME test,
because we returned an empty strings.

The problem was:

ERROR: talloc_steal with references at ntvfs/posix/pvfs_setfileinfo.c:215
       reference at ntvfs/posix/pvfs_resolve.c:799

metze
2009-07-15 19:24:35 +02:00
Stefan Metzmacher
5fbbddec35 s4:pvfs: fix some talloc related compiler warnings
metze
2009-02-05 17:48:06 +01:00
Jelmer Vernooij
bd64688c6a Fix more compiler warnings in various places. 2008-12-23 22:57:11 +01:00
Stefan Metzmacher
84b2db8d51 s4:pvfs: correctly check stream names
metze
2008-12-01 14:41:29 -08:00
Stefan Metzmacher
7c07be9cab s4:pvfs: return the correct error code for invalid names
metze
2008-12-01 14:40:51 -08:00
Jelmer Vernooij
c3415b3e57 Add version of next_codepoint without iconv_convenience. 2008-10-24 16:00:43 +02:00
Stefan Metzmacher
6e52c4feb8 pvfs_close: correctly handle the write time updates passed by close()
metze
(This used to be commit 7f033ce4fb)
2008-06-03 14:03:52 +02:00
Stefan Metzmacher
c43591c216 pvfs: add PVFS_RESOLVE_NO_OPENDB flag and get the write time from the opendb
By default get the current write time from the opendb,
but allow callers to pass PVFS_RESOLVE_NO_OPENDB
for performance reasons, if they don't need to the write time.

metze
(This used to be commit def52cc098)
2008-06-03 14:03:50 +02:00
Stefan Metzmacher
391b746430 pvfs_resolve: stream_name = "" is only the same as NULL for files
metze
(This used to be commit 47756129fd)
2008-05-23 09:55:15 +02:00
Stefan Metzmacher
f9b2d29d32 pvfs_resolve: add pvfs_resolve_name_handle()
metze
(This used to be commit 714717253c)
2008-02-29 15:17:52 +01:00
Stefan Metzmacher
5734a10c89 pvfs_resolve: "\\" and a trailing "\" need to be reduced
metze
(This used to be commit 356338b99a)
2008-02-29 15:17:52 +01:00
Stefan Metzmacher
c5d961586e pvfs_resolve: fix endless loop with trailing ".."
We also need to move the NULL termination.

metze
(This used to be commit 4fc41065a3)
2008-02-29 15:17:52 +01:00
Jelmer Vernooij
c38c2765d1 Remove yet more uses of global_loadparm.
(This used to be commit e01c1e87c0)
2008-02-21 17:17:37 +01:00
Jelmer Vernooij
d9f8232c34 Remove more uses of global_loadparm.
(This used to be commit 230355d2e6)
2008-02-21 15:21:45 +01:00
Jelmer Vernooij
96a200511e r26443: Remove global_loadparm instances.
(This used to be commit 8242c69623)
2007-12-21 05:50:11 +01:00
Jelmer Vernooij
d891c0c74a r26429: Avoid use of global_smb_iconv_convenience.
(This used to be commit d37136b7ab)
2007-12-21 05:49:56 +01:00
Jelmer Vernooij
39ee38d9c1 r26316: Use contexts for conversion functions.
(This used to be commit f6420d933b)
2007-12-21 05:48:30 +01:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139)
2007-10-10 15:07:55 -05:00
Andrew Tridgell
3b3bfed2c3 r24646: fixed the handling of case insensitive paths with wildcards
(This used to be commit 066bcd8420)
2007-10-10 15:02:31 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Jelmer Vernooij
cf0f4ec073 r15358: Fix some compiler warnings / type safety. Found by tcc
(This used to be commit 12ba42de58)
2007-10-10 14:05:25 -05:00
James Peach
6ab33938d5 r15186: Introduce ISDOT and ISDOTDOT macros for testing whether a filename is
"." for "..". These express the intention better that strcmp or strequal
and improve searchability via cscope/ctags.
(This used to be commit 7e4ad7e8e5)
2007-10-10 14:04:14 -05:00
Jelmer Vernooij
b674411eb4 r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinking
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m!
(This used to be commit 200a8f6652)
2007-10-10 13:35:01 -05:00
Stefan Metzmacher
0f8d452ca0 r7458: don't look at components[-1] :-)
we now survive the RAW-UNLINK test without crashing

metze
(This used to be commit c214996391)
2007-10-10 13:17:55 -05:00
Andrew Tridgell
759da3b915 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
ddc10d4d37 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
(This used to be commit 89b74b5354)
2007-10-10 13:08:25 -05:00
Andrew Tridgell
abe22d0351 r4403: - added ACL inheritance in the pvfs backend. ACLs are now inherited on
file and directory creation via ntcreatex. pvfs now passes the
  inheritance test in RAW-ACLS

- cleaned up the error handling a bit in pvfs_open()
(This used to be commit f4dfb63d53)
2007-10-10 13:07:43 -05:00
Andrew Tridgell
4183b2ac38 r4037: fixed a bunch of "might be uninitialised" warnings after enabling -O1 in my compile
(This used to be commit 0928b1f5b6)
2007-10-10 13:06:16 -05:00
Andrew Tridgell
5a34ef4df6 r3799: - added the bit for FS_ATTR_NAMED_STREAMS support into qfsinfo filesystem attribute reply
- pvfs passes the RAW-STREAMS test
(This used to be commit c1a48a7542)
2007-10-10 13:05:55 -05:00
Andrew Tridgell
ae7caf08c1 r3798: added support for alternate data streams in xattrs into pvfs.
The trickiest part about this was getting the sharing and locking
rules right, as alternate streams are separate locking spaces from the
main file for the purposes of byte range locking, and separate for
most share violation rules.

I suspect there are still problems with delete on close with alternate
data streams. I'll look at that next.
(This used to be commit b6452c4a20)
2007-10-10 13:05:54 -05:00
Andrew Tridgell
187412f3da r3747: - added some of the infrastructure needed for streams support in pvfs
(the IDL, and the load/save meta-data logic)

- changed pvfs_resolve_name() to default to non-wildcard, needing
  PVFS_RESOLVE_WILDCARD to enable wildcards. Most callers don't want
  wildcards, so defaulting this way makes more sense.

- fixed deletion of EAs
(This used to be commit e7afd4403c)
2007-10-10 13:05:50 -05:00
Andrew Tridgell
94c6fde541 r3694: added support for the RENAME_INFORMATION level of setfileinfo and
setpathinfo. pvfs now passes the RAW-SFILEINFO test.
(This used to be commit 31ac31398b)
2007-10-10 13:05:45 -05:00
Andrew Tridgell
e7810eeab7 r3658: use handle->fd == -1 as the primary indicator of a directory. This
fixes a directory creation problem from WinXP
(This used to be commit 4b3afc6c39)
2007-10-10 13:05:42 -05:00
Andrew Tridgell
9fe5fa11d6 r3545: initial support for using extended attributes to hold extended dos attributes of files.
I decided to use IDL/NDR to encode the attribute, as it gives us a
simple way to describe and extend the saved attributes.

The xattr code needs to hook into quite a few more places in the pvfs
code, but this at least gets the basics done. I will start encoding
alternate data streams streams, DOS EAs etc soon using the same basic
mechanism.

I'll probably stick to "version 1" for the xattr.idl for quite a while
even though it will be changing, as I don't expect anyone to be
deploying this in production just yet. Once we have production users
we will need to keep compatibility by supporting all the old version
numbers in xattr.idl.
(This used to be commit c54253ed1b)
2007-10-10 13:05:30 -05:00
Andrew Tridgell
ead3508ac8 r3447: more include/system/XXX.h include files
(This used to be commit 264ce91810)
2007-10-10 13:05:12 -05:00
Andrew Tridgell
d1a732dd2d r3353: don't reference dos.attrib unless its initialised
(This used to be commit 498799e426)
2007-10-10 13:05:00 -05:00
Andrew Tridgell
78b85c96c9 r3351: handle far more operations on open directory handles. pvfs was failing
with a wxp client because of qfileinfo operations on directories
failing with NT_STATUS_INVALID_HANDLE after the fstat() failed (as
pvfs sets f->fd to -1 for directories)
(This used to be commit 1993128cb1)
2007-10-10 13:04:58 -05:00
Andrew Tridgell
074da7ccf7 r3288: - updated the path processing in pvfs to pass the RAW-CHKPATH test. This
rather extensive test reveals some really bizarre error code
  handling in w2k3.

- extended and simplified the RAW-CHKPATH test, making it easier to
  read (note that Samba3 fails the new tests - jra may wish to look)

- marked RAW-CHKPATH as pass for pvfs
(This used to be commit 32dccf91cf)
2007-10-10 13:04:50 -05:00
Andrew Tridgell
e9820e1b6e r3240: - update the rules for what error codes should be given on the
different type of unlink an seach mismatches

- wildcard directory listings that have attribute
  FILE_ATTRIBUTE_DIRECTORY and match "." or ".." should be failed.

- don't set the write_time on SMBclose unless it is non-zero

- added much better support for setfileinfo and setpathinfo in pvfs

- better (and more efficient) handling of .. and . components in filenames
(This used to be commit 9305b07af3)
2007-10-10 13:04:45 -05:00
Andrew Tridgell
d5fd12648e r3227: added a per-share option "case insensitive filesystem", that tells the
backend that the underlying filesystem is case insensitive, so it can
bypass the directory search if the name is not found.
(This used to be commit d84ade90ce)
2007-10-10 13:04:43 -05:00
Andrew Tridgell
7780bec7b4 r3198: check for too many .. components in filenames
pvfs now passes RAW-MKDIR
(This used to be commit 41adb385f1)
2007-10-10 13:04:40 -05:00
Andrew Tridgell
f71e7ae1e3 r3133: - more consistent error checking in rename and setfileinfo
- add paranoid checking of device/inode change during open to detect race conditions
(This used to be commit 043361fed4)
2007-10-10 13:02:25 -05:00
Andrew Tridgell
9d9b42b059 r2984: fixed the error code for a non-terminal component of a path name not existing
(This used to be commit c6a922dbd8)
2007-10-10 12:59:54 -05:00
Andrew Tridgell
2ec58445ca r2931: use next_codepoint() to ensure we properly handle multi-byte characters in pvfs_unix_path()
(This used to be commit 0acf95d84c)
2007-10-10 12:59:49 -05:00
Andrew Tridgell
4962d9d03e r2928: - fixed the handling of reserved names (rejecting them with ACCESS_DENIED)
- don't check for '.' specially in checking for legal names. Longhorn
  doesn't do this any more, and its a real pain. Longhorn allows for
  filenames ending in '.', and with as many '.' elements as you like.
(This used to be commit 0a475175c5)
2007-10-10 12:59:49 -05:00