summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2011-07-20s3-auth Remove seperate guest booleanAndrew Bartlett6-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>
2011-07-20s3-auth Use the common auth_session_infoAndrew Bartlett8-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>
2011-07-20s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_infoAndrew Bartlett6-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>
2011-07-20s3-auth Use guest boolean in auth_user_info_unixAndrew Bartlett6-14/+14
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett15-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>
2011-07-20s3-auth Use *unix_token rather than utok in struct auth3_session_infoAndrew Bartlett9-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>
2011-07-20s3-auth Use struct auth3_session_info outside the auth subsystemAndrew Bartlett8-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>
2011-07-20debug: log early messages to stdout, and keep it openAndrew Bartlett1-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>
2011-07-19First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systemsJeremy Allison2-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.
2011-07-14s3-smbd: Pass event and messaging context to smbd_parent_housekeeping().Andreas Schneider1-3/+5
2011-07-14s3-smbd: Pass ev_ctx to remove_child_pid().Andreas Schneider1-3/+5
2011-07-14s3-smbd: Pass msg_ctx to smbd_accept_connection.Andreas Schneider1-4/+8
2011-07-14s3-smbd: Pass ev_ctx to smbd_setup_sig_chld_handler().Andreas Schneider1-5/+5
2011-07-14s3-smbd: Pass ev_ctx and msg_ctx to smbd_accept_connection().Andreas Schneider1-3/+13
2011-07-14s3-smbd: Pass ev_ctx and msg_ctx to open_sockets_smbd().Andreas Schneider1-7/+9
2011-07-14s3-smbd: Pass ev_ctx to smbd_parent_loop().Andreas Schneider1-3/+4
2011-07-14s3-smbd: Create ev_ctx and msg_ctx and use it.Andreas Schneider1-26/+38
2011-07-12s3:smbd: s/SMBkeepalive/NBSSkeepaliveStefan Metzmacher2-12/+12
metze
2011-07-12s3:smbd: use PROTOCOL_SMB2_02 instead PROTOCOL_SMB2Stefan Metzmacher3-3/+3
metze
2011-07-11s3:smb2_create: use smbd_calculate_access_mask() instead of ↵Stefan Metzmacher1-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
2011-07-11s3:smb2_tcon: return the correct maximal_access on the shareStefan Metzmacher1-1/+1
metze
2011-07-11s3:smbd: return the real share access mask in the SMBtconX responseStefan Metzmacher1-3/+1
metze
2011-07-11s3:smbd: use smbd_calculate_access_mask() also for fake_filesStefan Metzmacher1-0/+13
metze
2011-07-11s3:smbd: check the share level access mask in smbd_calculate_access_mask()Stefan Metzmacher1-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
2011-07-11s3:smbd: make smbd_calculate_access_mask() non-staticStefan Metzmacher2-14/+20
metze
2011-07-11s3:smbd/msdfs: let create_conn_struct() check the share security descriptorStefan Metzmacher1-0/+30
metze
2011-07-08Move smbd_smb2_request_check_tcon() smbd_smb2_request_check_session() next ↵Jeremy Allison4-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
2011-07-08s3:smb2_server: add some comments about change_to_user() and ↵Stefan Metzmacher1-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
2011-07-08lib/param: Merge struct loadparm_service into commonAndrew Bartlett1-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
2011-07-08lib/util Move bitmap.c to lib/utilAndrew Bartlett4-0/+4
2011-07-08Fix bug #8293 - SMB2 doesn't rotate the log files often enough.Jeremy Allison3-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
2011-07-07s3:smb2_server: call change_to_root_user() or smbd_smb2_request_check_tcon()Stefan Metzmacher1-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>
2011-07-05s3:smbd fix a compile warning on AIX 5.3Christian Ambach1-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
2011-07-05s3: Fix bug 8102Volker Lendecke1-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
2011-07-05s3: Calculate&store the maximum share access maskVolker Lendecke1-22/+15
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-05s3: Return "granted" from share_access_checkVolker Lendecke2-10/+14
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-04s3:smb2 fix smbd crash on premature end of smb2 conn (Bug 8286)Christian Ambach1-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
2011-07-04s3:smb2_server: there's no reason to check the session id twice on a ↵Stefan Metzmacher1-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
2011-07-04s3:smb2_create: call 'return' after smbd_server_connection_terminate()Stefan Metzmacher1-0/+1
This is not strictly needed in the fork process model, but we hopefully support other models in future. metze
2011-07-04s3-lib Move event_add_idle() to source3/lib/events.cAndrew Bartlett2-87/+0
This allows libauth not to depend on smbd_base. Andrew Bartlett
2011-07-04s3-smbd: Remove client_address from smbd_server_connection struct.Andreas Schneider1-1/+0
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-smbd: Remove obsolete smbd_set_server_fd().Andreas Schneider2-36/+6
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-smbd: Replace client_id in smbd session setup.Andreas Schneider2-2/+3
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-smbd: Replace client_id in smbd session.Andreas Schneider1-7/+9
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-smbd: Replace client_id in smbd service.Andreas Schneider1-6/+21
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-smbd: Replace client_id in smbd reply.Andreas Schneider1-1/+10
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-smbd: Exit cleanly if we can't create an address string.Andreas Schneider1-1/+3
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-smbd: Replace client_id in smbd connection.Andreas Schneider1-1/+9
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-smbd: Replace client_id in smbd process.Andreas Schneider2-6/+33
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-auth: Pass the remote_address down to user_info.Andreas Schneider2-8/+20
Signed-off-by: Andrew Bartlett <abartlet@samba.org>