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

1865 Commits

Author SHA1 Message Date
Volker Lendecke
8a17cd810f Make gencache more stable
This provides a compromise between stability and performance: gencache is a
persistent database these days that for performance reasons can not use tdb
transactions for all writes. This patch splits up gencache into gencache.tdb
and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, writes
to it don't use transactions. By default every 5 minutes and when a program
exits, all entries from _notrans.tdb are transferred to gencache.tdb in one
transaction.
2009-07-15 10:55:20 +02:00
Volker Lendecke
3edcd55bf1 Remove gencache_init/shutdown
gencache_get/set/del/iterate call gencache_init() internally anyway. And we've
been very lazy calling gencache_shutdown, so this seems not really required.
2009-07-15 10:55:20 +02:00
Volker Lendecke
e5a34b2533 Remove gencache_[un]lock_key 2009-07-15 10:55:20 +02:00
Jeremy Allison
d57e67f9eb Revert this commit :
s3: Make smbd aware of permission change of usershare. Since usershare are relatively volatile and
non-previledge users must disconnect from smbd and reconnect to it to make share permission in effect.

For now. This is a feature request and I think we need
to design it a little differently so as not to touch
core change_to_user() code.

Jeremy.
2009-07-14 11:25:45 -07:00
Bo Yang
9ef6af73b3 s3: Make smbd aware of permission change of usershare. Since usershare are relatively volatile and non-previledge users must disconnect from smbd and reconnect to it to make share permission in effect. 2009-07-15 17:05:45 +08:00
Günther Deschner
9f15ef11bd s3-account_policy: add pdb_policy_type enum.
Guenther
2009-07-14 12:12:18 +02:00
Jeremy Allison
e67de63ba6 Make cli_posix_lock/unlock asynchronous.
Jeremy.
2009-07-13 18:43:10 -07:00
Günther Deschner
f7ff6bd142 s3-rpc_server: pass down full unix token to map_max_allowed_access().
Also use unix_token->uid instead of geteuid() when checking for mapping of the
SEC_FLAG_MAXIMUM_ALLOWED flag.

Guenther
2009-07-13 15:38:20 +02:00
Günther Deschner
05fbe0c7f7 libds: merge the UF<->ACB flag mapping functions.
Guenther
2009-07-13 15:36:07 +02:00
Jeremy Allison
2000421c59 Remove reply_unixerror() - no longer needed. Should make Metze's refactoring a lot easier.
Jeremy.
2009-07-10 18:23:00 -07:00
Volker Lendecke
c624a704be Make escape_ldap_string take a talloc context 2009-07-09 22:25:29 +02:00
Tim Prouty
3a7d372e2e s3: Change the share_mode_lock struct to store a base_name and stream_name 2009-07-08 21:36:04 -07:00
Tim Prouty
161e182b65 s3: Remove is_ntfs_stream_name() and split_ntfs_stream_name()
Actually I moved split_ntfs_stream_name into torture.c which is the one
consumer of it.  This could probably be changed at some point.
2009-07-08 21:36:04 -07:00
Tim Prouty
1a1d10d22f s3: Plumb smb_filename through dos_mode() and related funtions 2009-07-08 21:36:03 -07:00
Tim Prouty
69c8795b67 s3: convert unix_mode to take an smb_filename 2009-07-08 21:36:03 -07:00
Jeremy Allison
400c18a8c4 Rename update_stat_ex_writetime() -> update_stat_ex_mtime()
to better describe what we're doing here.
Jeremy
2009-07-08 18:05:30 -07:00
Jeremy Allison
c9c3d4312d The migration to struct stat_ex broke the calculation of
create time from the existing timestamps (for systems
that need to do this). Once the write time is changed
via a sticky write, the create time might need to be
recalculated. To do this I needed to add a bool into
struct stat_ex to remember if the st_ex_btime field
was calculated, or read from the OS. Also fixed the
returning of modified write timestamps in the return
from NTCreateX, SMBattr and SMBattrE (which weren't
taking into account the modified timestamp stored
in the open file table). Attempting to fix an issue
with Excel 2003 and offline files. Volker and Metze,
please review.
Jeremy
2009-07-08 17:51:35 -07:00
Tim Prouty
0d9b204882 s3: Remove unnecessary const qualifiers 2009-07-07 18:02:53 -07:00
Björn Jacke
a28596964b s3: QNX doesn't know uint - replace with uint_t 2009-07-07 22:15:16 +02:00
Tim Prouty
3cb0e521e1 s3: Plumb smb_filename through SMB_VFS_NTIMES 2009-07-06 15:38:42 -07:00
Tim Prouty
18a27a8df2 s3 sticky write time: Removed unused args and tighten up a function by making an arg const 2009-07-06 15:38:41 -07:00
Tim Prouty
99bd4fda0c s3: Plumb smb_filename around SMB_VFS_CHFLAGS
SMB_VFS_CHFLAGS isn't actually getting the smb_filename struct for now
since it only operates on the basefile.  This is the strategy for all
path-based operations that will never actually operate on a stream.

By clarifying the meaning of path based operations that don't take an
smb_filename struct, modules that implement streams such as vfs_onefs
no longer need to implement SMB_VFS_CHFLAGS to ensure it's only called
on the base_name.
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
Volker Lendecke
e77e21e0f1 Add const to init_rpc_hdr_ba 2009-07-05 23:50:12 +02:00
Volker Lendecke
58fbf7420c Remove "typedef struct ndr_syntax_id RPC_IFACE;" 2009-07-05 23:50:12 +02:00
Volker Lendecke
f8cfe19d85 Introduce null_ndr_syntax_id 2009-07-05 23:50:12 +02:00
Volker Lendecke
30dd96e819 Make check_bind_req static to rpc_server/srv_pipe.c 2009-07-05 23:50:12 +02:00
Volker Lendecke
b8322ec2b2 Add pdb_get_domain_info 2009-07-04 12:54:22 +02:00
Günther Deschner
1225d57abe s3-spoolss: add rpccli_spoolss_getprinterdriver convenience wrapper.
Guenther
2009-07-03 22:05:46 +02:00
Stefan Metzmacher
b804c30856 s3:smbd: make change_notify_reply() more generic and hide send_nt_replies() behind a callback
This prepares change notify support for SMB2.

metze
2009-07-02 09:11:01 +02:00
Stefan Metzmacher
ef96e8c958 s3:smbd: simplify the notify code a bit and always reply via change_notify_reply() -> send_nt_replies()
metze
2009-07-02 09:11:00 +02:00
SATOH Fumiyasu
7f7ebfaecb Fix bug #6496 - MS-DFS: cannot follow multibyte char link name.
consumed_ucs is the number of bytes
of the UCS2 path consumed not counting any
terminating null. We need to convert
back to unix charset and count again
to get the number of bytes consumed from
the incoming path.
2009-06-30 15:29:08 -07:00
Andrew Bartlett
6e92505080 Fix ndrdump to use a common setup_logging() API
By adding a new common setup_logging_stdout() API, we no longer need to abuse the ABI compatability between the different setup_logging() calls in Samba3 and Samba4's DEBUG() subsystems.

The revert of 49a6d757b4 works with this
to fix bug 6211.

Andrew Bartlett
2009-06-29 20:12:23 +10:00
Volker Lendecke
711544d494 Turn the pdb_rid_algorithm into a capabilities call that returns flags 2009-06-28 22:13:50 +02:00
Volker Lendecke
55dae4469c Add tstream_read_packet 2009-06-27 23:17:49 +02:00
Tim Prouty
6395bc55db s3: pass a valid stat into file_ntimes()
file_ntimes() calls can_write_to_file() which expects a valid stat struct
2009-06-25 18:40:32 -07:00
Tim Prouty
eb8c658fcd s3 file_access: Convert some more functions over to use smb_filneame 2009-06-25 18:25:48 -07:00
Tim Prouty
358ccc3282 s3: Change set_ea() and its callers to use smb_filename 2009-06-25 18:25:47 -07:00
Günther Deschner
7450f3ad99 s3-netlogon: remove remaining netlogon init functions.
Guenther
2009-06-25 16:46:31 +02:00
Günther Deschner
313a2bfa52 s3-netlogon: remove init_netr_SamInfo functions.
Guenther
2009-06-25 12:19:17 +02:00
Günther Deschner
f62d9f5b57 s3-netlogon: fix validation level 2 support in netr_SamLogon and friends.
Guenther
2009-06-25 12:19:10 +02: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
Volker Lendecke
8d1b81926d Fix Coverity IDs 922 and 933
In copy_internals(), if the !CAN_WRITE(conn) kicks in, we end up
dereferencing a NULL smb_filename.

This adds a simple protection around it.

Tim, please check!

Volker
2009-06-19 16:25:10 +02:00
Volker Lendecke
5a9ca3db03 Fix bug 4699: Remove pidfile on clean shutdown 2009-06-18 16:17:57 -07:00
Jeremy Allison
d2da9dee68 Add some const to the stat struct in the dosmode calls.
Fix a couple more unix_convert uses to filename_convert.
Fix bug in acl_group_override() where an uninitialized
struct could be used. Move unix_convert with wildcard
use in SMBsearch reply to boilerplate code.
Jeremy.
2009-06-18 15:07:14 -07:00
Jeremy Allison
34267482d5 Replace the boilerplate calls to :
resolve_dfspath() -> unix_convert() -> get_full_smb_filename() -> check_name()
with a new function filename_convert().
This restores the check_name() calls that had gone missing
since the default create_file was changed. All "standard"
pathname processing now goes through filename_convert().
I'll take a look at the non-standard pathname processing
next. As a benefit, fixed a missing resolve_dfspath()
in the trans2 mkdir call.
Jeremy.
2009-06-18 13:13:38 -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
Tim Prouty
5cfac1a1bd s3: Plumb smb_filename from create_file all of the way down to fd_open
I used the smb_filename struct everywhere that was feasible for the
first pass.  There are still some places in this path that need to be
changed to use smb_filename, but this is a good start.

I also:
- Removed fname/path arguments from a few functions that weren't
  really using them.
- Added a utility function for detecting whether an smb_filename is a
  stream.
2009-06-17 20:11:53 -07:00
Tim Prouty
04afa4b6b5 s3: Plumb smb_filename through SMB_VFS_CREATE_FILE 2009-06-12 16:14:50 -07:00