summaryrefslogtreecommitdiff
path: root/source3/auth
AgeCommit message (Collapse)AuthorFilesLines
2011-07-20auth: Split out make_user_info_SamBaseInfo and add authenticated argumentAndrew Bartlett1-13/+5
This will allow the source3 auth code to call this without needing to double-parse the SIDs Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use the common auth_session_infoAndrew Bartlett5-40/+40
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 Bartlett1-7/+20
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 reimplement copy_session_info via NDR pull/pushAndrew Bartlett1-57/+23
This ensures we do not miss elements. Pattern copied from auth_netlogond. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Remove pointless destructorAndrew Bartlett1-10/+0
All the users of this structure allocate info3 on the session_info Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Avoid redundant copies in create_local_token()Andrew Bartlett1-20/+20
These values were not read before being overwritten again. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Add comments to copy_session_info_serverinfo_guest()Andrew Bartlett1-2/+5
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth inline copy_serverinfo_session_info into only callerAndrew Bartlett1-72/+56
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth use a cached auth_serversupplied_info in make_server_info_guest()Andrew Bartlett1-11/+19
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth remove extra from auth3_session_infoAndrew Bartlett1-4/+5
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Clarify inputs and ouptuts by using elements from server_infoAndrew Bartlett1-5/+5
This allows us not the put all of these elements into the auth3_session_info if they are only used as inputs to these functions. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth assert that security_token is present in the copy, and explain why ↵Andrew Bartlett1-7/+16
nss_token can be skipped Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth: Remove unused lm_session_key from auth3_session_infoAndrew Bartlett1-10/+5
The long term authorization state needs only the final, negotiated session key, and not the original LM key that may possibly have been an input. The special case of the guest account simply needs both values filled back in with the zeros to avoid changing behaviour in the cached server_info. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth remove unused copy_serverinfoAndrew Bartlett2-61/+0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use system boolean in auth_user_info_unixAndrew Bartlett1-6/+4
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use guest boolean in auth_user_info_unixAndrew Bartlett1-7/+10
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett1-18/+34
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 Bartlett2-38/+56
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 Bartlett4-24/+33
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-20s3-auth Add struct auth3_session_info to aid transition to auth_session infoAndrew Bartlett3-0/+217
This will allow a gradual conversion of the required elements from the current struct auth_serversupplied_info. This commit adds the structure definition and some helper functions to copy between the two structures. At this stage these structures and functions are IDENTICAL to the existing code, and so show the past history of that code. The plan is to slowly modify them over the course of the patch series, so that the changes being made a clear. By using a seperate structure to auth_serversupplied_info we can remove elements that are not needed after the authentication, and we can choose a layout that best reflects the needs of runtime users, rather than the internals of the authentication subsystem. By eventually using the auth_session_info from auth.idl, we will gain a single session authorization structure across the whole codebase, allowing more code to be shared, and a much more transparent process for forwarding authorization credentials over the named pipe proxy. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Add const to indicate input elementsAndrew Bartlett2-4/+4
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20auth: Preserve guest flag on transition via netr_SamInfo3Andrew Bartlett1-0/+2
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Restore nss_token behaviour by reading from server_infoAndrew Bartlett1-1/+1
The implementation of copy_serverinfo(), used to copy server_info into session_info never copied the nss_token variable, and so 17d8f0ad30847bb940f645ee1817d782ddaaee74 introduced this regression. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20Add my copyrightAndrew Bartlett1-1/+1
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 Allison1-2/+2
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-13s3-auth: Fix account check over ncalrpc.Andreas Schneider2-10/+18
2011-07-11s3:auth_server: use cli_echo() to check if the server is aliveStefan Metzmacher1-5/+10
This works over port 139 and also 445. send_keepalive() would only work on port 139. metze
2011-07-11s3:auth_server: make use of cli_state_is_connected()Stefan Metzmacher1-3/+3
metze
2011-07-08s3:auth_server: use cli->is_guestlogin instead of parsing cli->inbuf.Stefan Metzmacher1-1/+1
cli->inbuf is not the valid response buffer of the session setup response. metze
2011-07-08s3:auth: remove unused variableStefan Metzmacher1-1/+0
metze
2011-07-08s3:auth_unix: remove unused varStefan Metzmacher1-1/+0
metze
2011-07-04s3-build allow_undefined_symbols=False is the default nowAndrew Bartlett1-1/+0
2011-07-04s3-auth libauth no longer requires undefined symbolsAndrew Bartlett1-3/+1
2011-07-04s3-auth: Remove global smbd_server_conn from auth_unix.c.Andreas Schneider1-2/+10
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-auth: Pass the remote_address down to user_info.Andreas Schneider6-19/+86
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-auth: Added remote_address to ntlmssp server.Andreas Schneider2-2/+12
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04s3-auth: Only reload the config file.Andreas Schneider1-1/+1
We only need to reload the config file. This removes a dependency to smbd. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-03s3: Remove a use of cli_errstrVolker Lendecke1-2/+3
All code above that might have failed sets result
2011-07-03s3-build Prepare to require fully defined modulesAndrew Bartlett1-3/+5
This specifies some more deps for our modules, and ensures that the subsystem that it links against is in fact a library, which will avoid issues with introducing duplicate symbols. Andrew Bartlett
2011-06-21lib/util Remove samba-util-common!Andrew Bartlett1-7/+7
All of this code is now in common, so we don't need the second '-common' library any more! Andrew Bartlett
2011-06-15s3: Add debug level 0 warnings to make_new_server_info_guestVolker Lendecke1-2/+6
I've got a backtrace where this must have failed, but it is not clear why. If this fails, we should really complain because we can't start up. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Jun 15 15:20:49 CEST 2011 on sn-devel-104
2011-06-15s3: Fix the return of make_new_server_info_guestVolker Lendecke1-1/+1
2011-06-09s3-param Remove special case for global_myname(), rename to lp_netbios_name()Andrew Bartlett6-15/+15
There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
2011-06-09s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett13-17/+17
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2-5/+5
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
2011-06-09s3:auth/auth_samba4.c - remove unused variableMatthias Dieter Wallnöfer1-1/+0
Reviewed-by: Tridge
2011-06-07s3-auth Use loadparm_init_s3() to get an lp_ctx for auth_samba4Andrew Bartlett1-15/+2
This avoids loading the smb.conf twice. Andrew Bartlett
2011-05-31s3:auth/proto.h: add _AUTH_PROTO_H_ guardMichael Adam1-0/+5
2011-05-31s3:auth/proto.h: add GPL/Copyright headerMichael Adam1-0/+31