summaryrefslogtreecommitdiffstats
path: root/source3/smbd/session.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd/session: Added a routine find_sessions()Shekhar Amlekar2013-09-101-0/+28
| | | | | | | | this routine builds a list of sessions from a particular remote machine or user. Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd/session: add filters to gather_sessioninfo()Shekhar Amlekar2013-09-101-0/+19
| | | | | | | | added capability to filter sessions based on remote machine name and user name. Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: don't use (fill) sessionid.tdb in session_claim/yield any more.Gregor Beck2012-10-191-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>
* s3:smbd: use session_global_id as session number for pam and utmpGregor Beck2012-10-191-67/+9
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: remove smbd_server_connection argument from session_claim()Gregor Beck2012-10-191-2/+3
| | | | | | | 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>
* s3:smbd: pass smbXsrv_session instead of user_struct to session_claim() and ↵Gregor Beck2012-10-191-2/+4
| | | | | | | session_yield() Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd/utmp: remove ip address from utmp recordStefan Metzmacher2012-10-191-2/+0
| | | | | | | | | | | 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>
* s3:smbd: change user_struct->vuid to uint64_tStefan Metzmacher2012-06-061-3/+4
| | | | | | | | | | Only sconn->smb1.sessions.next_vuid remains as uint16_t, so that we do not generate larger values yet. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Jun 6 12:07:33 CEST 2012 on sn-devel-104
* s3:smbd: use 'struct user_struct' instead of typedef'ed 'user_struct'Stefan Metzmacher2012-06-061-2/+2
| | | | metze
* lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij2012-03-241-1/+1
| | | | | | | | | The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
* s3:smbd: avoid using sconn_server_id()Stefan Metzmacher2011-12-161-1/+2
| | | | metze
* s3:smbd: convert session.c to use dbwrap wrapper functions onlyMichael Adam2011-10-111-6/+12
| | | | Avoid direct use of the db_record and db_context structs.
* s3:sessionid: use dbwrap_travers_read() in sessionid_travers_read()Michael Adam2011-10-111-3/+3
| | | | | This also changes the return code of sessionid_traverse_read() to NTSTATUS. It also uses traverse_read instead of traverse.
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-291-1/+1
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
* s3-auth Remove seperate guest booleanAndrew Bartlett2011-07-201-1/+2
| | | | | | | | | | 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 guest boolean in auth_user_info_unixAndrew Bartlett2011-07-201-1/+1
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett2011-07-201-1/+1
| | | | | | | | 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-201-2/+5
| | | | | | | | | | | | | | | | 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-smbd: Replace client_id in smbd session.Andreas Schneider2011-07-041-7/+9
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* tdb_traverse/tdb_traverse_read: check returns for negative, not -1.Rusty Russell2011-06-201-1/+1
| | | | | | | | | | | TDB2 returns a negative error number on failure. This is compatible if we always check for < 0 instead of == -1. Also, there's no tdb_traverse_read in TDB2: we don't try to make traverse reliable any more, so there are no write locks anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett2011-06-091-1/+1
| | | | | | | Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
* s3-auth: smbd needs auth.hGünther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-sessionid: avoid global include of sessionid.hGünther Deschner2011-03-021-0/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Mar 2 12:58:12 CET 2011 on sn-devel-104
* s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_infoAndrew Bartlett2011-02-221-4/+4
| | | | | | | | | | | | | | | | | | | | | These variables, of type struct auth_serversupplied_info were poorly named when added into 2001, and in good consistant practice, this has extended all over the codebase in the years since. The structure is also not ideal for it's current purpose. Originally intended to convey the results of the authentication modules, it really describes all the essential attributes of a session. This rename will reduce the volume of a future patch to replaced these with a struct auth_session_info, with auth_serversupplied_info confined to the lower levels of the auth subsystem, and then eliminated. (The new structure will be the output of create_local_token(), and the change in struct definition will ensure that this is always run, populating local groups and privileges). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-build: use dbwrap.h only where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3: Use sconn->client_id in session_claimVolker Lendecke2010-08-201-10/+2
|
* s3: Remove smbd_server_fd() from session_claimVolker Lendecke2010-08-171-4/+5
|
* s3: Remove get_client_fd()Volker Lendecke2010-08-161-3/+3
|
* s3: Remove procid_self() from session_claim()Volker Lendecke2010-07-051-2/+1
|
* s3: Abstract access to sessionid.tdb, similar to conn_tdb.cVolker Lendecke2010-03-011-67/+16
|
* s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher2009-01-081-8/+7
| | | | | | The goal is to move all this variables into a big context structure. metze
* Fix bug 5691: SIGBUS on SolarisVolker Lendecke2008-10-131-1/+4
|
* Wrap the unix token info in a unix_user_token in auth_serversupplied_infoVolker Lendecke2008-06-191-2/+2
| | | | | No functional change, this is a preparation for more current_user ref removal (This used to be commit dcaedf345e62ab74ea87f0a3fa1e3199c75c5445)
* Remove "userdom_struct user" from "struct user_struct"Volker Lendecke2008-05-051-1/+1
| | | | (This used to be commit 420de035237bb08bc470c9eb820f3da2edaa6805)
* Remove "guest" from "struct user_struct"Volker Lendecke2008-05-051-1/+1
| | | | (This used to be commit 570a6b80feb5b0dc23213ba936c721e766cd4818)
* Remove the unix token info from "struct user_struct"Volker Lendecke2008-05-051-2/+2
| | | | (This used to be commit aa2299d42adf4d27e707ac755e07be70d0af1bb4)
* Remove most of the remaining globals out of lib/util_sock.c.Jeremy Allison2007-11-031-3/+4
| | | | | | | I have a plan for dealing with the remaining..... Watch this space. Jeremy. (This used to be commit 963fc7685212689f02b3adcc05b4273ee5c382d4)
* I can't get away without a 'length' arg. :-).Jeremy Allison2007-11-031-2/+2
| | | | | Jeremy. (This used to be commit 95d01279a5def709d0a5d5ae7224d6286006d120)
* Stop get_peer_addr() and client_addr() from using globalJeremy Allison2007-11-031-2/+3
| | | | | | statics. Part of my library cleanups. Jeremy. (This used to be commit e848506c858bd16706c1d7f6b4b032005512b8ac)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-3/+3
| | | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* Add const to the get_peer_addr() and get_socket_addr()Jeremy Allison2007-10-111-1/+1
| | | | | | calls. Use the IPv6 varient for get_peer_addr(). Jeremy. (This used to be commit baf1f52e34ae2465a7a34be1065da29ed97e7bea)
* [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter2007-10-101-4/+1
| | | | (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
* r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal withJeremy Allison2007-10-101-16/+9
| | | | | | | the ripple effects this causes. utmp has to change etc. Remove some global varables and store address/port in the unexpected db. Jeremy. (This used to be commit 18c6a2211d9e25233d01715b3f78977edcd6d869)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r23236: Another bad merge: Correctly free and unlock the session record inVolker Lendecke2007-10-101-1/+2
| | | | | | | | | session_claim. Jerry, this fixes the hanging smbstatus. Sorry for that, Volker (This used to be commit 86ff82a5df998045185682cf09b2db3d37f01004)
* r23220: Add traverse_read to dbwrapVolker Lendecke2007-10-101-1/+1
| | | | (This used to be commit b38dc5ffdfe9fdc2879c57dc181815f06b4747fe)
* r23173: Convert sessionid.tdb to ctdb. The 3.0.26 patch is a bit larger becauseVolker Lendecke2007-10-101-53/+118
| | | | | it brings across the tdb-based list_sessions (This used to be commit 0153386c1a3625b2f699863991893f399c40af48)
* r23172: Change shutdown_other_smbds to use connections_traverse instead ofVolker Lendecke2007-10-101-2/+3
| | | | | session_traverse. (This used to be commit ccb5eb245e962b0264b337c2d0275c22e2a36830)