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

41 Commits

Author SHA1 Message Date
Björn Jacke
d1c7d7d21a vfs_catia: fix return type warnings 2010-02-09 10:11:29 +01:00
Volker Lendecke
f6650f5d19 s3: Do not talloc in readdir
This is a hot codepath (called from the stat cache)
2009-11-18 23:16:13 +01:00
Aravind Srinivasan
32ee976708 vfs catia: Fix a NULL dereference when CATIA is loaded with no mappings specified.
When we use the CATIA vfs module and don't have any mapping specified,
we return NULL for the mapped_name, thereby resulting in segfaults.
When we don't have catia mapping, we should just use the old name
instead of returning NULL for the mapped_name.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24 10:59:33 -07:00
Aravind Srinivasan
637901c242 vfs catia: Fix the double translation that was happening with createfile and open.
Since the catia translation is implemented for open, it should not
also be done in createfile.  By removing createfile from catia,
translation is now done correctly for the primary open path.

In order to support systems that have custom createfile
implementations that don't eventually call SMB_VFS_OPEN,
SMB_VFS_TRANSLATE_NAME has been expanded to take an additional
argument that specifies direction.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24 10:59:33 -07:00
Aravind Srinivasan
c870043b27 vfs catia: Fix a possible NULL dereference
Also free some unfreed memory.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24 10:59:33 -07:00
Volker Lendecke
e94361e1e2 s3:vfs_catia: Make some fns static 2009-09-14 22:48:45 +02:00
Volker Lendecke
d3a6914e3b s3:vfs_catia: Use talloc_zero for simplification 2009-09-14 22:48:45 +02:00
Volker Lendecke
9dae2501f1 s3:vfs_modules: Fix Coverity ID 946: OVERRUN_STATIC
Tim, please check!
2009-09-14 22:48:45 +02:00
Aravind Srinivasan
ad88284038 s3: Major revamp for catia vfs module
This patch builds out catia to allow fully configurable mappings,
including mappings from single byte to multi-byte characters.
Additionally, a much more complete list of vfs operations are now
covered.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28 16:38:57 -07:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04:00
Volker Lendecke
ce378e7c51 Fix a few type errors in VFS modules 2009-07-19 02:36:59 +02:00
Volker Lendecke
5ab0677b45 Attempt to fix the build of vfs_catia.c -- Tim, please check! 2009-07-07 20:43:21 +02:00
Tim Prouty
f39232a8fb s3 catia: Remove pointless VOPs from catia 2009-07-06 15:38:41 -07:00
Tim Prouty
258952aa85 s3: Plumb smb_filename through SMB_VFS_UNLINK 2009-07-06 15:38:36 -07:00
Tim Prouty
5a09ba460c s3: Plumb smb_filename through SMB_VFS_RENAME 2009-07-06 15:38:29 -07:00
Tim Prouty
e129384d7c s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTAT
This patch introduces two new temporary helper functions
vfs_stat_smb_fname and vfs_lstat_smb_fname.  They basically allowed me
to call the new smb_filename version of stat, while avoiding plumbing
it through callers that are still too inconvenient.  As the conversion
moves along, I will be able to remove callers of this, with the goal
being to remove all callers.

There was also a bug in create_synthetic_smb_fname_split (also a
temporary utility function) that caused it to incorrectly handle
filenames with ':'s in them when in posix mode.  This is now fixed.
2009-06-24 21:15:25 -07:00
Tim Prouty
4e3656b8d1 s3: Change SMB_VFS_OPEN to take an smb_filename struct
This was a little messy because of all of the vfs modules I had to
touch.  Most of them were pretty straight forward, but the streams
modules required a little attention to handle smb_filename.  Since the
use of smb_filename enables the vfs modules to access the raw,
over-the-wire stream, a little bit of the handling that was being done
by split_ntfs_stream_name has now been shifted into the individual
stream modules.  It may be a little more code, but overall it gives
more flexibility to the streams modules, while also allowing correct
stream handling.
2009-06-17 20:11:53 -07:00
Steven Danneman
af0e199b31 Add an optional SMB_STRUCT_SMB parameter to VFS_OP_READDIR
* this allows VFS implementations that prefetch stat information on
  readdir to return it through one VFS call
* backwards compatibility is maintained by passing in NULL
* if the system readdir doesn't return stat info, the stat struct is
  set to invalid
2009-02-09 23:56:16 -08:00
todd stecher
48b0016cff Extend NTIMES to allow setting create_time
1) Add in smb_file_time struct to clarify code and make room for createtime.
2) Get and set create time from SMB messages.
3) Fixup existing VFS modules + examples Some OS'es allow for the
setting of the birthtime through kernel interfaces. This value is
generically used for Windows createtime, but is not settable in the
code today.
2009-01-23 21:05:38 -08:00
Jeremy Allison
9253044276 Fix bug #5692 - Core dump in full_audit.so.
There were some function mismatches in the various GET_NT_ACL modules (some places the fsp parameter has not been removed).
Jeremy.
(This used to be commit 221cc5e21e)
2008-08-14 10:58:50 -07:00
Tim Prouty
fb37f15600 Cleanup size_t return values in callers of convert_string_allocate
This patch is the second iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(This used to be commit 6b189dabc5)
2008-05-20 22:40:13 +02:00
Jeremy Allison
00b2cdf75e Yay ! Remove a VFS entry. Removed the set_nt_acl() call,
this can only be done via fset_nt_acl() using an open
file/directory handle. I'd like to do the same with
get_nt_acl() but am concerned about efficiency
problems with "hide unreadable/hide unwritable" when
doing a directory listing (this would mean opening
every file in the dir on list).
Moving closer to rationalizing the ACL model and
maybe moving the POSIX calls into a posix_acl VFS
module rather than having them as first class citizens
of the VFS.
Jeremy.
(This used to be commit f487f742cb)
2008-05-08 18:09:07 -07:00
Michael Adam
233eb0e560 Change the prototype of the vfs function get_nt_acl().
Up to now, get_nt_acl() took a files_struct pointer (fsp) and
a file name. All the underlying functions should need and now
do need (after the previous preparatory work), is a connection_struct
and a file name. The connection_struct is already there in the
vfs_handle passed to the vfs functions. So the files_struct
argument can be eliminated.

This eliminates the need of calling open_file_stat in a couple
of places to produce the fsp needed.

Michael
(This used to be commit b5f600fab5)
2007-12-19 23:08:01 +01:00
Jeremy Allison
8829875944 Remove pstring from modules directory.
Jeremy.
(This used to be commit 977dc3accb)
2007-11-16 17:07:11 -08:00
Volker Lendecke
15953b82eb Make [f]get_nt_acl return NTSTATUS
(This used to be commit dcbe1bf942)
2007-11-13 15:47:01 +01:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Jeremy Allison
3d5f029ead r25222: Fix last assumptions that (size_t)-1 can be used
as a special dest_len of sizeof(pstring).
Jeremy.
(This used to be commit 9fc14c83cc)
2007-10-10 12:30:51 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
c509ce3675 r23722: Fix the build of the catia module
(This used to be commit fa09744cce)
2007-10-10 12:23:48 -05:00
Jeremy Allison
a0ac7a7f4c r23620: Convert set_nt_acl to return NTSTATUS. Also fix the chown
return to correctly return NT_STATUS_INVALID_OWNER if it
should be disallowed. Matches better what W2K3R3 does.

NFSv4 ACL module owners, please examine these changes.

Jeremy.
(This used to be commit fc6899a550)
2007-10-10 12:23:37 -05:00
James Peach
0d5265e9d4 r23423: Use the correct structure types in the NT_ACL operations. It's not
clear to my why the catia module feels it's necessary to implement
these operations, but at least they're now the right type.
(This used to be commit b5be0c7403)
2007-10-10 12:23:15 -05:00
Jeremy Allison
57d6318a0b r23105: Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy.
(This used to be commit 932523cbb5)
2007-10-10 12:22:46 -05:00
Jeremy Allison
4952fe368a r21714: Change the VFS interface to use struct timespec
for utimes - change the call to ntimes. This preserves
nsec timestamps we get from stat (if the system supports
it) and only maps back down to usec or sec resolution
on time set. Looks bigger than it is as I had to move
lots of internal code from using time_t and struct utimebuf
to struct timespec.
Jeremy.
(This used to be commit 8f3d530c5a)
2007-10-10 12:18:24 -05:00
Herb Lewis
55ed1d5945 r20261: merge 20260 from samba_3_0_24
clean up a bunch of no previous prototype warnings
(This used to be commit c60687db11)
2007-10-10 12:16:37 -05:00
Jelmer Vernooij
4db7642caa r18745: Use the Samba4 data structures for security descriptors and security descriptor
buffers.

Make security access masks simply a uint32 rather than a structure
with a uint32 in it.
(This used to be commit b41c52b9db)
2007-10-10 12:00:54 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
f98f86394a r9483: Changed DIR to SMB_STRUCT_DIR because of the amazing stupidity of a UNIX vendor
not understanding abstract data types :-(.
Jeremy.
(This used to be commit be5b4e2fa3)
2007-10-10 11:01:11 -05:00
Volker Lendecke
ad54e2f0c2 r7902: Fix the build
(This used to be commit 6d431eb676)
2007-10-10 10:58:02 -05:00
Jeremy Allison
ff7e5c2673 r7893: Add in the extra parameters to opendir() to fix the large directory/insane app
problem. Rev vfs version. Doesn't change the normal codepath.
Jeremy.
(This used to be commit 0f03a6bdcd)
2007-10-10 10:58:02 -05:00
Volker Lendecke
eb200fcdda r5880: From the comment....
* Implement a fixed mapping of forbidden NT characters in filenames that are
 * used a lot by the CAD package Catia.
 *
 * Yes, this a BAD BAD UGLY INCOMPLETE hack, but it helps quite some people
 * out there. Catia V4 on AIX uses characters like "<*$ a *lot*, all forbidden
 * under Windows...

Volker
(This used to be commit 8c0148df81)
2007-10-10 10:56:06 -05:00