summaryrefslogtreecommitdiff
path: root/source3/utils/status.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbstatus: Use cmdline_messaging_contextChristof Schmitt2018-10-101-22/+3
| | | | | | | | | | | Use cmdline_messaging_context to initialize a messaging context instead of open coding the same steps. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit d7fa3815a83a50fd9e3d78cac0d5ef3eb79235e5)
* smbd: remove unused tevent_context argument from notify_initStefan Metzmacher2018-06-181-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* smbstatus: Fix CID 1128560 Dereference null return valueVolker Lendecke2018-03-291-1/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Pass "file_id" through share_entry_forallVolker Lendecke2018-02-131-0/+1
| | | | | | | It's also in the share_entry, but that is redundant and will go Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: correctly denote not fully authenticated sessionsRalph Boehme2017-11-271-27/+34
| | | | | | | | | | | | | Currently for sessions where authentication is still in progress we print uid and gid as -1. With this change we nicely list them like this: PID Username Group Machine Protocol Version .... 6604 (auth in progress) 127.0.0.1 (ipv4:127.0.0.1:47930) SMB3_11 .... Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/smbstatus: add a NULL checkRalph Boehme2017-11-271-1/+11
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add lib/util/server_id.hVolker Lendecke2017-01-221-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* smbd: Pass "sconn" via notify to notify_callback()Volker Lendecke2016-07-201-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: There's only one notify_callbackVolker Lendecke2016-07-201-1/+1
| | | | | | | | We do not have different callbacks per notify, put the callback function into the notify context Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: add support for SMB1 signing and CIFS UNIX extensions encryptionRalph Boehme2016-01-221-0/+12
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Jan 22 11:06:05 CET 2016 on sn-devel-144
* smbstatus: show signing state of sessions and tconsRalph Boehme2016-01-221-8/+35
| | | | | | | | | Show the signing state of sesssions tcons in smbstatus. This is SMB2/3 only. SMB1 support will be added in a later commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: show encrpytion state of tree connectsRalph Boehme2016-01-221-5/+24
| | | | | | | | | Show the encrpytion state of tcons in smbstatus. This is SMB3 only. CIFS UNIX extensions encryption will be added in a later commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: align tree connect header and outputRalph Boehme2016-01-221-5/+12
| | | | | | | | | Align output and use timestring() instead of time_to_asc(). The latter calls asctime() which forces a \n into the time string. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: show encrpytion state of sessionsRalph Boehme2016-01-221-5/+37
| | | | | | | | | Show the encrpytion state of sessions in smbstatus. This is SMB3 only. CIFS UNIX extensions encryption will be added in a later commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: align session list header and ouputRalph Boehme2016-01-221-4/+14
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: pass talloc context to traverse_connectionsRalph Boehme2016-01-221-2/+3
| | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: pass talloc context to traverse_sessionidRalph Boehme2016-01-221-1/+2
| | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: rework connection dialect printingRalph Boehme2016-01-221-1/+31
| | | | | | | | | | | In a later change I want to print the signing cipher which depends upon the connection dialect. So let's store the connection dialect in the sessionid struct and move the code that maps dialect integers to strings to smbstatus. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: remove obsolete verbose messageRalph Boehme2016-01-221-11/+0
| | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: always initialize a messaing contextRalph Boehme2015-11-101-22/+9
| | | | | | | | | | Recent changes (b542ce7db394de3023b95288b0c40c4533c02cb1) to serverid code made serverid_exists() call messaging_dgm_get_unique() which means we depend on a valid messaging context that initializes global_dgm_context. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbstatus: add stream name to share_entry_forall()Ralph Boehme2015-10-121-1/+5
| | | | | | | | | | Add stream name argument to share_entry_forall machinery so smbstatus can print the stream name of a file. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11550 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: Set internal log level to 0Christof Schmitt2015-07-101-0/+1
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify: Re-add notify_walk()Volker Lendecke2015-07-071-21/+23
| | | | | | | | This used to be a tdb traverse wrapper. Now we get the notify db from notifyd via messages. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove server_id_str()Volker Lendecke2015-04-281-4/+3
| | | | | | | | | | Call server_id_str_buf instead Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Apr 28 20:48:01 CEST 2015 on sn-devel-104
* lib: Remove procid_str_staticVolker Lendecke2015-04-281-4/+9
| | | | | | | | Replace all callers with direct calls to server_id_str_buf without talloc_tos() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: load_case_tables() -> smb_init_locale()Volker Lendecke2015-03-241-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: Tell the user that smbstatus can only be run as root.Andreas Schneider2014-12-161-0/+7
| | | | | | | | | | | | | | | In the meantime smbstatus tries to collection information from tdb's which are only accessible by root as they contain sensitive information like session keys and other secrets. This means smbstatus can no longer be executed as a user. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11012 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Dec 16 18:54:41 CET 2014 on sn-devel-104
* s3:open_files.idl: add data structures for SMB2.1 and SMB3.0 leases.Stefan Metzmacher2014-12-041-0/+9
| | | | | | | Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-smbstatus: Fix exit code of profile output.Andreas Schneider2014-11-241-2/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10961 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Nov 24 21:13:51 CET 2014 on sn-devel-104
* s3:smbprofile: Make "status_profile.h" a proper headerVolker Lendecke2014-11-191-3/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbstatus: fix return value in print_share_mode()Stefan Metzmacher2014-11-071-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbstatus: check for lock_path talloc failuresDavid Disseldorp2014-11-041-4/+21
| | | | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Nov 4 02:07:35 CET 2014 on sn-devel-104
* s3:locking: allow early return for share_entry_forall()Volker Lendecke2014-10-311-5/+7
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: Rename share_mode_forall->share_entry_forallVolker Lendecke2014-10-311-1/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* locking: use correct conversion specifier for printing variablesRalph Boehme2014-06-131-2/+2
| | | | | | | | | | | | Fix several occurences of using printf conversion to fload when printing offset and count variables in locking debug messages and smbstatus. Conversion to float may lead to wrong results with very large values. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Add protocol version to smbstatus outputMathias Dietz2014-05-221-4/+4
| | | | | | | | | Signed-off-by: Mathias Dietz <mdietz@de.ibm.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu May 22 18:37:27 CEST 2014 on sn-devel-104
* s3:utils: avoid argv related const warningsStefan Metzmacher2014-04-021-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dbwrap: add a dbwrap_flags argument to db_open()Michael Adam2014-02-071-1/+1
| | | | | | | | | | This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-smbstatus: display [u|g]id of -1 as "-1" in connection listBjörn Baumbach2013-07-101-4/+20
| | | | | | | | | | | | | In order to avoid displayed uid or gid of "4294967295" instead of "-1", we need to fetch the special case -1. The id can be -1 if we are reading e.g. incomplete session information. Signed-off-by: Björn Baumbach <bb@sernet.de> 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): Wed Jul 10 01:18:30 CEST 2013 on sn-devel-104
* s3:smbstatus do not print orphaned share entriesChristian Ambach2013-04-191-0/+6
| | | | | | Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:utils: make use of samba_tevent_context_init()Stefan Metzmacher2013-02-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbstatus add --fast optionChristian Ambach2012-07-181-4/+11
| | | | | | this option skips all checks if the process for the record is still there using it gives a huge performance benefit on busy systems and clusters while it might display stale data if a smbd crashed
* s3:smbstatus don't check if process exists twiceChristian Ambach2012-07-181-4/+0
| | | | is_valid_share_mode_entry() already calls serverid_exists which calls process_exists()
* s3:smbstatus rename a function to make its purpose more clearChristian Ambach2012-07-181-4/+4
| | | | traverse_fn1 does not really intuitively make clear that it is used to traverse connections
* s3:smbstatus fix a compiler warningChristian Ambach2012-07-181-1/+1
| | | | about comparison of signed with unsigned
* s3:util: rename procid_equal() to serverid_equal()Michael Adam2012-06-211-1/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbstatus: use procid_equal() instead of equivalent cluster_id_equal()Michael Adam2012-06-211-1/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb: introduce a name TID_FIELD_INVALID for the invalid value for a cnum/tidMichael Adam2012-06-061-1/+1
| | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:utils: use smbd/smbd.h instead of just smbd/proto.hStefan Metzmacher2012-06-061-1/+1
| | | | | | This fixes compiler warnings regarding incomplete types. metze
* s3:lib: split things into a conn_tdb.hStefan Metzmacher2012-06-051-0/+1
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Jun 5 19:28:35 CEST 2012 on sn-devel-104