summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2012-11-05s3:smbd: pass the current time to make_connection[_smb1]()Stefan Metzmacher3-6/+9
Otherwise smbstatus reports the wrong time for tree connects. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Mon Nov 5 20:43:23 CET 2012 on sn-devel-104
2012-11-02smb2_server: Fix typo in comment.Karolin Seeger1-1/+1
Karolin Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Nov 2 15:40:22 CET 2012 on sn-devel-104
2012-11-02s3:smbd:smb2: fix a comment typo in the crediting code.Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Nov 2 10:09:36 CET 2012 on sn-devel-104
2012-10-30s3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support ↵Stefan Metzmacher1-1/+1
(bug #9341) Reported-by: Sebastien LAVEZE <sebastien.laveze@mindspeed.com> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Tested-by: Sebastien LAVEZE <sebastien.laveze@mindspeed.com> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Oct 30 16:49:26 CET 2012 on sn-devel-104
2012-10-29s3:smbd:durable: remove a TODO comment about write time updatesMichael Adam1-2/+0
This has been done. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Oct 29 20:12:18 CET 2012 on sn-devel-104
2012-10-29Fix bug #9329 - Directory listing with SeBackup can crash smbd.Jeremy Allison3-1/+37
When we do a become_root()/unbecome_root() pair to temporarily raise privilege, this NULLs out the NT token. If we're within a become_root()/unbecome_root() pair then return the previous token on the stack as our NT token. This is what we should be using to check against NT ACLs in the file server. This copes with security context changing when removing a file on close under the context of another user (when 2 users have a file open, one sets delete on close and then the other user has to actually do the delete). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Oct 29 16:26:20 CET 2012 on sn-devel-104
2012-10-26pysmbd: Set umask to 0 during smbd operationsAndrew Bartlett1-9/+34
2012-10-26pysmbd: Remember to close files after setting the NT ACLAndrew Bartlett1-0/+5
2012-10-26pysmbd: Add hook for unlink() so python scripts can remove xattr.tdb entriesAndrew Bartlett1-0/+68
If we do not provide a way to remove files from xattr.tdb, we can re-use the inode. Andrew Bartlett
2012-10-25s3:smbd:durable: factor stat checks out into ↵Michael Adam1-392/+261
vfs_default_durable_reconnect_check_stat() This makes vfs_default_durable_reconnect() simpler to read and it reduces code duplication in the failure case handling. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 25 23:03:13 CEST 2012 on sn-devel-104
2012-10-25pysmbd: Fix pysmbd octal mode handlingAndrew Bartlett1-2/+2
It is clearly too long since Computer Science 101... ;-) Andrew Bartlett
2012-10-20s3: Fix some blank line endingsVolker Lendecke1-5/+5
Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Oct 20 09:06:12 CEST 2012 on sn-devel-104
2012-10-20s3: Use talloc_stackframe in token_contains_name_in_listVolker Lendecke1-13/+8
2012-10-19s3:smbd:durable: store stat info for disconnected durables and check at ↵Michael Adam1-0/+456
reconnect. At durable reconnect, we check the stat info stored in the cookie against the current stat data from the file we just opened. If any detail differs, we deny the durable reconnect, because in that case it is very likely that someone opened the file while the handle was disconnected, which has to be interpreted as an oplock break. Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Oct 19 18:56:19 CEST 2012 on sn-devel-104
2012-10-19s3:smbd/durable: remove an extra blank line from vfs_default_durable_reconnect()Michael Adam1-1/+0
Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-10-19s3:smbd/durable: add write_time specific stuff to vfs_default_durable_cookieStefan Metzmacher1-0/+12
metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Oct 19 17:12:29 CEST 2012 on sn-devel-104
2012-10-19s3:smbd/durable: update the low level write_time before disconnecting the file.Stefan Metzmacher1-0/+19
If we close the low level FD, we should better update the write_time if needed. It's not unlikely that the client doesn't reclaim the durable handle, in that case we may not close the after the durable timeout. In such a case we should make sure that we at least update the write time on disconnect, this makes sure backup applications notice that the file was changed. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd/durable: trigger pending write_time updates before disconnecting the ↵Stefan Metzmacher1-0/+8
file We need to call the pending write time update handler immediately. Which means we don't wait exactly 2 seconds before updating the write time after the first write. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: remove unused claim_connection/yield_connectionStefan Metzmacher2-88/+0
metze Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: don't call claim/yield_connection() in ↵Stefan Metzmacher2-19/+0
make_connection_snum/close_cnum() This was used to maintain the connections.tdb database which is being removed. We use info from the smbXsrv_tcon instead. Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: fill tcon->global->session_global_idStefan Metzmacher2-0/+4
metze Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:lib: remove unused sessionid_*() functionsGregor Beck1-3/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: don't use (fill) sessionid.tdb in session_claim/yield any more.Gregor Beck1-99/+33
We use data from new smbXsrv_session instead. Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd/connection: use smbXsrv_tcon_traverse to count connectionsGregor Beck1-18/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd:setup_new_vc_session: traverse sessions instead of connections to ↵Gregor Beck1-10/+17
shutdown other smbds Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbXsrv_tcon: add smbXsrv_tcon_global_traverse()Gregor Beck2-0/+74
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbXsrv_session: add smbXsrv_session_global_traverse()Gregor Beck2-0/+75
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: use session_global_id as session number for pam and utmpGregor Beck2-77/+15
Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-10-19s3:smbd: initialize session->global before calling session_claimGregor Beck2-27/+27
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: remove smbd_server_connection argument from session_claim()Gregor Beck4-6/+7
retrieve the server connection from the smbXsrv_session argument instead. Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: pass smbXsrv_session instead of user_struct to session_claim() and ↵Gregor Beck5-8/+11
session_yield() Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:count_current_connections: do not clear orphaned entries from connections.tdbGregor Beck2-21/+9
This removes one of the last callers of connetions_forall. Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd/utmp: remove ip address from utmp recordStefan Metzmacher3-38/+8
1. This was broken since Samba 3.2. when ipv6 support was added, it only worked for ipv6 addresses. 2. userspace tools only display the hostname field. 3. This is not really portable metze Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: remove duplicate prototypes for sys_utmp_claim() an sys_utmp_yield()Michael Adam1-6/+0
Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: add exit_server to the smbd_shim hooksStefan Metzmacher3-4/+10
This is in preparation of moving sessionid_tdb and conn_tdb to smbd exclusively. metze Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: move initialization of the smbd_shim from smbd_init_globals() to main()Michael Adam2-16/+15
This is in preparation of adding server exit hooks to the shim. Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19s3:smbd: update sconn->remote_hostname after the netbios session requestStefan Metzmacher1-0/+13
Also update the info in the new smbXsrv structure. This way we can log the remote name in status outputs. metze Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-17s3:smbd: fix brace placements in validate_my_share_entries() for readabilityMichael Adam1-2/+4
according to coding guidelines Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Oct 17 14:37:58 CEST 2012 on sn-devel-104
2012-10-17s3:smbd: also log the "offline" flag when debugging the dos-modeMichael Adam1-0/+1
Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
2012-10-12s3:smb2_getinfo ensure proper error for not yet present quota supportChristian Ambach1-0/+4
non-existing quota support needs to be signaled by NT_STATUS_NOT_SUPPORTED, not NT_STATUS_INVALID_PARAMETER Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Fri Oct 12 13:37:37 CEST 2012 on sn-devel-104
2012-10-11smbd: Always free the talloc_stackframe() before leaving ↵Andrew Bartlett1-0/+3
smbd_do_query_security_desc Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Oct 11 15:20:54 CEST 2012 on sn-devel-104
2012-10-11vfs: Implement a sys_acl_blob_get_{fd,file} for POSIX ACL backendsAndrew Bartlett2-0/+125
This simply linearlises the SMB_ACL_T (default and access acl for directories) and the file owner, group and mode into a blob. It will be useful for an improved vfs_acl_common.c that uses this sets that, rather than the hash of the NT ACL, in the xattr This will in turn insulate the stored hash from changes in the ACL mapping. Andrew Bartlett
2012-10-11vfs: Remove type parameter from sys_acl_blob_get_{fd,file}Andrew Bartlett1-2/+1
This interface actually needs to match the get_nt_acl interface in that the system ACL implmenetation may not be posix ACLs, and the blob is not meant to be enforced to be of a particular system ACL structure. Andrew Bartlett
2012-10-11smbd: Add mem_ctx to {f,}get_nt_acl VFS callAndrew Bartlett6-37/+65
This makes it clear which context the returned SD is allocated on, as a number of callers do not want it on talloc_tos(). As the ACL transformation allocates and then no longer needs a great deal of memory, a talloc_stackframe() call is used to contain the memory that is not returned further up the stack. Andrew Bartlett
2012-10-11smbd: Add mem_ctx to sys_acl_init() and all callersAndrew Bartlett4-43/+66
This changes from allocation on NULL to allocation on the supplied memory context. Currently that supplied context is talloc_tos() at the the final consumer of the ACL. Andrew Bartlett
2012-10-06We should never just assign an st_mode to an ace->perms field, theoreticallyJeremy Allison1-2/+2
they are different so should go through a mapping function. Ensure this is so. Practically this does not matter, as for user permissions the mapping function is an identity, and the extra bits we may add are ignored anyway, but this makes the intent clear. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Oct 6 03:04:14 CEST 2012 on sn-devel-104
2012-10-05Modify ensure_canon_entry_valid() into ensure_canon_entry_valid_on_set() - ↵Jeremy Allison1-154/+141
makes the logic clearer.
2012-10-05Simplify ensure_canon_entry_valid by splitting out the _get codepath.Jeremy Allison1-3/+86
2012-10-04Remove all uses of ↵Jeremy Allison2-20/+10
lp_security_mask/lp_force_security_mode/lp_dir_security_mask/lp_force_dir_security_mode and replace with the normal masks. Now these parameters can be removed.
2012-10-04Revert "When creating a new file/directory, we need to obey the create ↵Jeremy Allison1-15/+0
mask/directory mask parameters." This reverts commit c251a6b0442abc13bc8be4ff8de324c1d7706a78. Remove this as we're planning to remove the security mask, directory security mask parameters and only use create mask/directory mask.