summaryrefslogtreecommitdiff
path: root/source3/utils/net_status.c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-19s3:net_status_shares: use connections_forall_read for a read only traversalGregor Beck1-3/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-21s3:util: rename procid_equal() to serverid_equal()Michael Adam1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-06s3:smb: introduce a name TID_FIELD_INVALID for the invalid value for a cnum/tidMichael Adam1-2/+2
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-06-05s3:lib: split things into a conn_tdb.hStefan Metzmacher1-0/+1
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Jun 5 19:28:35 CEST 2012 on sn-devel-104
2011-03-30s3-messages: only include messages.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-02s3-sessionid: avoid global include of sessionid.hGünther Deschner1-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
2010-03-01s3: Abstract access to sessionid.tdb, similar to conn_tdb.cVolker Lendecke1-46/+17
2010-03-01s3: Add connections_forall_read()Volker Lendecke1-3/+2
In a cluster, this makes a large difference: For r/w traverse, we have to do a fetch_locked on every record which for most users of connections_forall is just overkill.
2010-01-19s3 net: Fix compile warningsKai Blin1-6/+10
2010-01-18s3/net: split up some printable stings to ease i18nBjörn Jacke1-4/+4
If we put strings like "Usage:" into separate _() macros and not the whole "Usage:..." string we can cover much more messages by only one single translation. The drawback is that the message in the sources looks less pretty.
2009-08-11s3 net: i18n support for net statusKai Blin1-32/+34
2008-12-16s3:net_status: use dbwrap to open sessionid.tdbStefan Metzmacher1-24/+20
metze
2008-06-10net: Rename functable3 to functable, get rid of old functablesKai Blin1-2/+2
(This used to be commit bb7c5fc4ec77db4073d3beccf12af12910b6bd07)
2008-06-10net: Make "net status" use functable3Kai Blin1-6/+39
(This used to be commit e4b4fb4c39f251b0675b1c1dcec14f20135f876b)
2008-05-20net: Move help for "net status" to net_status.cKai Blin1-3/+13
(This used to be commit d26681b169a533f838f74d48af072b57afc9f8df)
2008-05-20net: Use true/false instead of True/False.Kai Blin1-4/+4
(This used to be commit a8b567aac3b0e39cfe67fb97167b10312ca5e73a)
2008-05-10net: more whitespace cleanupKai Blin1-8/+8
(This used to be commit ef0184d580500734fc7af51e1c790b075180a3d0)
2008-05-10net: Remove globalsKai Blin1-8/+8
(This used to be commit 1e9319cf88b65a2a8d4f5099a1fe5297e405ed2e)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-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)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23171: Convert connections.tdb to dbwrapVolker Lendecke1-2/+2
(This used to be commit 80a1f43825063bbbda896175d99700ede5a4757a)
2007-10-10r22761: This introduces lib/conn_tdb.c with two main functions: ↵Volker Lendecke1-53/+19
connections_traverse and connections_forall. This centralizes all the routines that did individual tdb_open("connections.tdb") and direct tdb_traverse. Volker (This used to be commit e43e94cda1ad8876b3cb5d1129080b57fa6ec214)
2007-10-10r22751: Next step for the cluster merge: sessionid.tdb should contain a 'structVolker Lendecke1-8/+8
server_id' instead of a 'uint32 pid' (This used to be commit be7bac55c37676a8137c59a22dfb2e4c4821ac21)
2007-10-10r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke1-1/+1
patch. This changes "struct process_id" to "struct server_id", keeping both is just too much hassle. No functional change (I hope ;-)) Volker (This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
2007-10-10r22282: Fix last few name -> servicename changes.Jeremy Allison1-2/+2
Jeremy. (This used to be commit f5c22f26f7ec7e8139fbf11a75820336db3d55c0)
2007-10-10r21714: Change the VFS interface to use struct timespecJeremy Allison1-2/+2
for utimes - change the call to ntimes. This preserves nsec timestamps we get from stat (if the system supports it) and only maps back down to usec or sec resolution on time set. Looks bigger than it is as I had to move lots of internal code from using time_t and struct utimebuf to struct timespec. Jeremy. (This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875)
2007-10-10r16230: Fix Klocwork #861 and others. localtime and asctimeJeremy Allison1-2/+2
can return NULL. Ensure we check all returns correctly. Jeremy. (This used to be commit 6c61dc8ed6d84f310ef391fb7700e93ef42c4afc)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-0/+4
realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy. (This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r12986: Use d_fprintf(stderr, ...) for any error message in net.Lars Müller1-8/+8
All 'usage' messages are still printed to stdout. Fix some compiler warnings for system() calls where we didn't used the return code. Add appropriate error messages and return with the error code we got from system() or NT_STATUS_UNSUCCESSFUL. (This used to be commit f650e3bdafc4c6bcd7eb4bcf8b6b885b979919eb)
2007-10-10r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison1-2/+2
of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-7/+8
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-2/+1
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid ofTim Potter1-1/+1
'..' from all #include preprocessor commands. This fixes bugzilla #1880 where OpenVMS gets confused about the '.' characters. (This used to be commit 7f161702fa4916979602cc0295919b541912acd6)
2003-12-01I needed a decently parseable format of smbstatus. Looking at smbstatus codeVolker Lendecke1-0/+257
tells me that this should not be expanded, so I implemented net status [sessions|shares] [parseable] Volker (This used to be commit 63d877c6b4786dcddf5f389842f798857be282c0)