summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
* s3-rpc_server: Move pipe/handles functionsSimo Sorce2011-07-211-1/+1
| | | | | | | | | | | | Put InternalPipes related functions in rpc_handles.c and out of rpc_ncacn_np.c rpc_handles.c is the only file that really uses them after all and ncacn_np.c is the wrong place for that stuff. While ther remove unnecessary wrapper functions now that the InternalPipes static variable is directly accessible. Also move all pipes_struct related header stuff in its own rpc_pipes.h header. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-auth Remove seperate guest booleanAndrew Bartlett2011-07-206-15/+25
| | | | | | | | | | Instead, we base our guest calculations on the presence or absense of the authenticated users group in the token, ensuring that we have only one canonical source of this important piece of authorization data Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Use the common auth_session_infoAndrew Bartlett2011-07-208-25/+25
| | | | | | | | | | | This patch finally has the same structure being used to describe the authorization data of a user across the whole codebase. This will allow of our session handling to be accomplished with common code. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_infoAndrew Bartlett2011-07-206-17/+17
| | | | | | | | | | | | This makes auth3_session_info identical to auth_session_info The logic to convert the info3 to a struct auth_user_info is essentially moved up the stack from the named pipe proxy in source3/rpc_server to create_local_token(). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Use guest boolean in auth_user_info_unixAndrew Bartlett2011-07-206-14/+14
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett2011-07-2015-56/+57
| | | | | | | | This is closer to the layout of struct auth_session_info in auth.idl Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Use *unix_token rather than utok in struct auth3_session_infoAndrew Bartlett2011-07-209-46/+58
| | | | | | | | | | | | | | | | This brings this structure one step closer to the struct auth_session_info. A few SMB_ASSERT calls are added in some key places to ensure that this pointer is initialised, to make tracing any bugs here easier in future. NOTE: Many of the users of this structure should be reviewed, as unix and NT access checks are mixed in a way that should just be done using the NT ACL. This patch has not changed this behaviour however. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Use struct auth3_session_info outside the auth subsystemAndrew Bartlett2011-07-208-33/+64
| | | | | | | | | | | | | | | This seperation between the structure used inside the auth modules and in the wider codebase allows for a gradual migration from struct auth_serversupplied_info -> struct auth_session_info (from auth.idl) The idea here is that we keep a clear seperation between the structure before and after the local groups, local user lookup and the session key modifications have been processed, as the lack of this seperation has caused issues in the past. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* debug: log early messages to stdout, and keep it openAndrew Bartlett2011-07-201-2/+8
| | | | | | | | | The --log-stdout option was compromised by the log file descriptors being closed once the file process forked. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systemsJeremy Allison2011-07-192-9/+9
| | | | | | | | | | Remove int toupper_ascii(int c); int tolower_ascii(int c); int isupper_ascii(int c); int islower_ascii(int c); and replace with their _m equivalents, as they are identical.
* s3-smbd: Pass event and messaging context to smbd_parent_housekeeping().Andreas Schneider2011-07-141-3/+5
|
* s3-smbd: Pass ev_ctx to remove_child_pid().Andreas Schneider2011-07-141-3/+5
|
* s3-smbd: Pass msg_ctx to smbd_accept_connection.Andreas Schneider2011-07-141-4/+8
|
* s3-smbd: Pass ev_ctx to smbd_setup_sig_chld_handler().Andreas Schneider2011-07-141-5/+5
|
* s3-smbd: Pass ev_ctx and msg_ctx to smbd_accept_connection().Andreas Schneider2011-07-141-3/+13
|
* s3-smbd: Pass ev_ctx and msg_ctx to open_sockets_smbd().Andreas Schneider2011-07-141-7/+9
|
* s3-smbd: Pass ev_ctx to smbd_parent_loop().Andreas Schneider2011-07-141-3/+4
|
* s3-smbd: Create ev_ctx and msg_ctx and use it.Andreas Schneider2011-07-141-26/+38
|
* s3:smbd: s/SMBkeepalive/NBSSkeepaliveStefan Metzmacher2011-07-122-12/+12
| | | | metze
* s3:smbd: use PROTOCOL_SMB2_02 instead PROTOCOL_SMB2Stefan Metzmacher2011-07-123-3/+3
| | | | metze
* s3:smb2_create: use smbd_calculate_access_mask() instead of ↵Stefan Metzmacher2011-07-111-1/+6
| | | | | | | | | smbd_check_open_rights() metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Jul 11 22:45:01 CEST 2011 on sn-devel-104
* s3:smb2_tcon: return the correct maximal_access on the shareStefan Metzmacher2011-07-111-1/+1
| | | | metze
* s3:smbd: return the real share access mask in the SMBtconX responseStefan Metzmacher2011-07-111-3/+1
| | | | metze
* s3:smbd: use smbd_calculate_access_mask() also for fake_filesStefan Metzmacher2011-07-111-0/+13
| | | | metze
* s3:smbd: check the share level access mask in smbd_calculate_access_mask()Stefan Metzmacher2011-07-111-0/+17
| | | | | | | | | I think we should reject invalid access early, before we might create new files. Also smbd_check_open_rights() is only called if the file existed. metze
* s3:smbd: make smbd_calculate_access_mask() non-staticStefan Metzmacher2011-07-112-14/+20
| | | | metze
* s3:smbd/msdfs: let create_conn_struct() check the share security descriptorStefan Metzmacher2011-07-111-0/+30
| | | | metze
* Move smbd_smb2_request_check_tcon() smbd_smb2_request_check_session() next ↵Jeremy Allison2011-07-084-121/+130
| | | | | | | to their only user and make them static. Add comments. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jul 8 21:01:40 CEST 2011 on sn-devel-104
* s3:smb2_server: add some comments about change_to_user() and ↵Stefan Metzmacher2011-07-081-2/+98
| | | | | | | | | change_to_root_user() metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Jul 8 13:45:46 CEST 2011 on sn-devel-104
* lib/param: Merge struct loadparm_service into commonAndrew Bartlett2011-07-081-1/+1
| | | | | | | | | | | | | | | | | This is handled by a common header and a .c file that is included into both loadparm.c files. In the process, _lp functions were renamed to lp__ to allow the common function definition declarations to be used by source3 and source4 (which have different macro definitions). The only parameter to change type is 'strict_locking' which was a bool, and is now an int, to accommodate the 'Auto' value from source3. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Jul 8 12:35:56 CEST 2011 on sn-devel-104
* lib/util Move bitmap.c to lib/utilAndrew Bartlett2011-07-084-0/+4
|
* Fix bug #8293 - SMB2 doesn't rotate the log files often enough.Jeremy Allison2011-07-083-3/+21
| | | | | | | | | | Move the num_requests field out of the smb1 struct into the generic struct smbd_server_connection struct. Use it to count SMB2 requests as well as SMB1 and ensure that check_log_size() is called every 50 SMB2 requests. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jul 8 01:14:53 CEST 2011 on sn-devel-104
* s3:smb2_server: call change_to_root_user() or smbd_smb2_request_check_tcon()Stefan Metzmacher2011-07-071-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | For all requests which don't operate on a tcon, we should call change_to_root_user(), to match the SMB1 behavior. For SMB1 we do the following operations without AS_USER: /* 0x70 */ { "SMBtcon",reply_tcon,0}, /* 0x71 */ { "SMBtdis",reply_tdis,DO_CHDIR}, /* 0x72 */ { "SMBnegprot",reply_negprot,0}, /* 0x73 */ { "SMBsesssetupX",reply_sesssetup_and_X,0}, /* 0x74 */ { "SMBulogoffX",reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */ /* 0x75 */ { "SMBtconX",reply_tcon_and_X,0}, ... /* 0x2b */ { "SMBecho",reply_echo,0}, ... /* 0xa4 */ { "SMBntcancel",reply_ntcancel, 0 }, For SMB2tdis we still call smbd_smb2_request_check_tcon() as close_cnum() calls change_to_root_user() when needed. metze Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:smbd fix a compile warning on AIX 5.3Christian Ambach2011-07-051-1/+1
| | | | | | | use the correct alias instead of FD directly Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Tue Jul 5 19:51:42 CEST 2011 on sn-devel-104
* s3: Fix bug 8102Volker Lendecke2011-07-051-0/+8
| | | | | | | | | | We can't allow open with access that has been denied via the share security descriptor Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Jul 5 16:21:54 CEST 2011 on sn-devel-104
* s3: Calculate&store the maximum share access maskVolker Lendecke2011-07-051-22/+15
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Return "granted" from share_access_checkVolker Lendecke2011-07-052-10/+14
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2 fix smbd crash on premature end of smb2 conn (Bug 8286)Christian Ambach2011-07-041-3/+3
| | | | | | | | | | | | | when smbd tries to clean up locks after a premature end of a smb2 connection, lock_db has already been freed and so it crashes this patch changes the order in which items are freed so that lock_db is still around when it is needed Jeremy, Metze, please check Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Mon Jul 4 20:00:26 CEST 2011 on sn-devel-104
* s3:smb2_server: there's no reason to check the session id twice on a ↵Stefan Metzmacher2011-07-041-5/+0
| | | | | | | | | smb2_tcon request metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Jul 4 17:34:13 CEST 2011 on sn-devel-104
* s3:smb2_create: call 'return' after smbd_server_connection_terminate()Stefan Metzmacher2011-07-041-0/+1
| | | | | | | This is not strictly needed in the fork process model, but we hopefully support other models in future. metze
* s3-lib Move event_add_idle() to source3/lib/events.cAndrew Bartlett2011-07-042-87/+0
| | | | | | This allows libauth not to depend on smbd_base. Andrew Bartlett
* s3-smbd: Remove client_address from smbd_server_connection struct.Andreas Schneider2011-07-041-1/+0
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbd: Remove obsolete smbd_set_server_fd().Andreas Schneider2011-07-042-36/+6
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbd: Replace client_id in smbd session setup.Andreas Schneider2011-07-042-2/+3
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbd: Replace client_id in smbd session.Andreas Schneider2011-07-041-7/+9
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbd: Replace client_id in smbd service.Andreas Schneider2011-07-041-6/+21
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbd: Replace client_id in smbd reply.Andreas Schneider2011-07-041-1/+10
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbd: Exit cleanly if we can't create an address string.Andreas Schneider2011-07-041-1/+3
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbd: Replace client_id in smbd connection.Andreas Schneider2011-07-041-1/+9
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbd: Replace client_id in smbd process.Andreas Schneider2011-07-042-6/+33
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>