summaryrefslogtreecommitdiff
path: root/source3/utils/status.c
AgeCommit message (Collapse)AuthorFilesLines
2000-01-16use GET_DENY_MODE() macroAndrew Tridgell1-2/+1
(This used to be commit d9c3e0e61f315ad4d9c3ea6bb6acc8500befe6b4)
2000-01-16added code to allow traversal of the byte range lock databaseAndrew Tridgell1-1/+29
this is used with "smbstatus -B" to dump the lock list (This used to be commit 5f022629146701e6d543f77007dc944e4277ab0c)
2000-01-02- added tdb_flags option to tdb_open()Andrew Tridgell1-4/+4
- added TDB_CLEAR_IF_FIRST flag to clear the database if this is the first attached process. Useful for non-persistent databases like our locking area (this will also make upgrades to new database layouts easier) - use lock_path() in a couple of places - leave connections database open while smbd running - cleaned up some tdb code a little, using macros for constants (This used to be commit 00e9da3ca577527db392aced62f02c69cfee8f4f)
1999-12-22improved error message in case the lock list is truncatedAndrew Tridgell1-1/+8
(This used to be commit f4ecc5a8e39ee69c59123b7b3ffbd081f69824ca)
1999-12-21changed message is connections.tdb doesn't existAndrew Tridgell1-1/+1
(This used to be commit 835b9881c0f04d766545d5e9d2926fbaf8bec904)
1999-12-21converted all our existing shared memory code to use a tdb databaseAndrew Tridgell1-24/+9
instead of either sysv or mmap shared memory or lock files. this means we can now completely remove locking_shm.c locking_slow.c shmem.c shmem_sysv.c and lots of other things also got simpler locking.c got a bit larger, but is much better compartmentalised now (This used to be commit e48c2d9937eea0667b8cd3332e49c06314ef31e7)
1999-12-21first cut at using the tdb code for the connections structure, theAndrew Tridgell1-192/+192
SWAT status page and smbstatus. It made the code _much_ simpler, I wish we'd done a database module a long time ago! (This used to be commit 4951755413c11d4c5b9af4699a6e622056d52433)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-66/+66
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-08-18patch from Michael Glauche to call get_status_connections() instead ofLuke Leighton1-52/+52
reading STATUS..LCK direct. (This used to be commit d794e2eb51b94a334ddb1d1b0775ebf4cef048db)
1999-04-01Ken McDonell from SGI was interested in adding some profilingAndrew Tridgell1-3/+31
capabilities to Samba so that Samba could talk to the SGI PCP (Performance Co-Pilot) apps. This change adds a profiling shared memory area and uses it to count two fairly trivial things, the number of uid switches and the number of SMB packets processes. To add more just edit include/profile.h and then increment it at the right place. I've also added a -P switch to smbstatus to dump the profile area. (This used to be commit ef3d61a80ad0b87c196a63ef2bd4fe8fc3863bd0)
1998-11-17Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1-1/+1
Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac)
1998-11-05check return value of locking_init()Andrew Tridgell1-10/+12
(This used to be commit 0efac70f756dce4c92744fc59b68b528f6984dee)
1998-09-28Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1-3/+1
Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
1998-08-15this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell1-1/+0
in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands. (This used to be commit b088c804f98908eb02f05ab2f2e8a61691a0a582)
1998-08-14this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1-2/+0
Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)
1998-08-10the rest of the binaries now compile and linkAndrew Tridgell1-33/+34
(This used to be commit 7fecc3d5a2fb641237f24a3f39c6556fde648a8a)
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell1-3/+1
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
1998-07-24Updates smbstatus to have a -S and -L flag.Richard Sharpe1-69/+87
Also updated the documentation :-) The code is ugly, we need to rewrite smbstatus someday. (This used to be commit a2a9f55a76fc16ef1d4656332ef6b1b455bb6259)
1998-07-22Fixed bug found by Richard Sharpe. After increasing files_struct size byJeremy Allison1-1/+1
MAX_OPEN_DIRECTORIES for nttrans I forgot to update the code that enumerates the array. Created new MAX_FNUMS in local.h, changed all code that iterates through the files_struct array to use this. (sorry Richard). Jeremy. (This used to be commit 339b10222269d71c7a493cc08b7b1bfd35fd55fc)
1998-05-30This change ensures that only the processes/locked files thatPaul Blackman1-20/+22
belong to -uUsername are printed when running 'smbstatus -uUsername' PaulB (This used to be commit da08e486871992043c2650e6aac304cd29ba693c)
1998-05-12This is a security audit change of the main source.Jeremy Allison1-4/+4
It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-03-22- added a check for broken RH5 include files. With the standard RH5Andrew Tridgell1-1/+1
includes (ie. unpatched RH5) Samba gets file corruption because of the incorrect definition of the shmid_ds structure. Updating your RH5 installation of glibc-devel fixes this. - don't try to fcntl_lock() a read-only fd in shmem.c - allow level 0 debug messages to get through in smbstatus (This used to be commit 45553771f90087a12db0153524146d42155d1d3f)
1998-03-15- added the ability to kill off individual connections from SWAT (fromAndrew Tridgell1-0/+1
the status page) - split the claim_connection() code into its own file - fixed the claim_connection() code to lock the file when manipulating it - always claim a null connection at startup - fixed a bug in the pidfile code (This used to be commit abd4a17e21d12be3d1747e94ceb1915abaf135e3)
1998-03-14another makeover of loadparm to support new stuff in swat andAndrew Tridgell1-1/+1
testparm. In particular I added: - ability to optionally save default values of all parameters when calling lp_load(). This can then be used to save only non-default parameters in lp_dump(). This makes the saved smb.conf (and viewed parameters in testparm) much shorter - ability to not load ipc share in lp_load() - separators in parm_table[] so parameters can be grouped logically. - flag to mark parameters that are local but which should be also viewed as global as far as parameters editing is concerned (This used to be commit f9af35da26e58fb0b644b5f0169f1c212230047a)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-1/+1
This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1997-10-29damn. We need root privilages to do semaphore operations even if weAndrew Tridgell1-0/+1
have done the semget() as root. The problem is that become_root() and unbecome_root() are so slow! I've provided two options. The default is to set the semaphores (but _not_ the shared memory) world writeable so that a become_root() isn't needed. Otherwise you can define SECURE_SEMAPHORES and pay the performance penalty. (This used to be commit 2bbd8d2cbc5cf1901859a181bc9ec29822995e51)
1997-10-27change the default file permissions on the SHARE_MEM_FILE* toAndrew Tridgell1-1/+1
0644. smbstatus now gets only read permission on the share files and does no locking. also get rid of some unnecessary umask(0) calls. smbd always runs with umask(0) (This used to be commit c6ac10170dbba57dfebc54c50d79cb29d13bb442)
1997-10-20a major share modes reorganisation.Andrew Tridgell1-263/+48
The shares modes code is now split into separate files. The shared memory implementation is in locking_shm.c. The slow implementation is in locking_slow.c It is all controlled by a struct share_ops structure that has function pointers to the implementation of all the functions needed by a share modes implementation. An initialisation function sets up this structure. This will make adding new implementations easy and clean. This also allowed me to get rid of the ugly code in smbstatus. Now status.c links to the locking code and calls methods in share_ops. I also renamed some things and generally organised things in a much cleaner fashion. Defines and structures specific to each implementation have been moved to the appropriate file and out of smb.h. (This used to be commit 65ab9adaa0d356b8041ed8a507ea52117f2a284e)
1997-10-06client.c: Changed shadowed variable.Jeremy Allison1-13/+2
locking.c: Removed USE_OPLOCKS - now the default. params.c: Removed unused variable. proto.h: Updated. reply.c: Removed USE_OPLOCKS - now the default. server.c: Removed USE_OPLOCKS - now the default. smb.h: Removed USE_OPLOCKS - now the default. smbparse.c: Changed shadowed variable. status.c: Removed USE_OPLOCKS - now the default. util.c: Removed USE_OPLOCKS - now the default. Jeremy (jallison@whistle.com) (This used to be commit b93509846d6291771787af457500eec8984ee6bd)
1997-10-01OPLOCK CHECK-IN - oplocks are now *OPERATIONAL* !!!!Jeremy Allison1-18/+43
Yipeee. At least as far as I can check in a short time :-). local.h: Changed OPLOCK_BREAK_TIMEOUT to 30 seconds. locking.c: Big changes to delete oplocks on a share mode entry. proto.h: updated. reply.c: Added oplock break code in lockingX reply & readbraw reply. server.c: Add batch oplock code. Force server shutdown if client fails to respond to oplock break. smb.h: Fix silly slow share mode oplock define bug. status.c: Add oplock status info. Jeremy (jallison@whistle.com) (This used to be commit 4c83d37239f15f855fc10f01d7b4bf4217fb9eda)
1997-09-05client.c: Made sure myhostname was initialised before substitutions.Jeremy Allison1-2/+2
status.c: Made sure myhostname was initialised before substitutions. server.c trans2.c: Moved OS/2 WPS fix. Jeremy (jallison@whistle.com) (This used to be commit 8a12b6a4f0feec712f5c4e02e21198c455b060ae)
1997-07-18charset.c: Split charset_initialise() into 2 - a charset_initialise() andSamba Release Account1-1/+1
a codepage_initialise(). Fixes problem with initialising dos map twice. charset.h: Changes to support charset changes. client.c: Changes to support charset changes. loadparm.c: follow symlinks parameter from David Clerc <David.Clerc@cui.unige.ch> nmbd.c: Changes to support charset changes. nmblookup.c:Changes to support charset changes. proto.h: Changes to support charset changes. reply.c: Don't call security=server with no user/no password guest. Fix from Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> server.c: follow symlinks code from David Clerc <David.Clerc@cui.unige.ch> smbpasswd.c:Changes to support charset changes. status.c: Changes to support charset changes. testparm.c: Changes to support charset changes. testprns.c: Changes to support charset changes. uid.c: Fixed log message with no \n. Jeremy (jallison@whistle.com) (This used to be commit 2a28a6e5e461aca7fe6c19cd01d287010056cffb)
1997-06-11Makefile: Added quoata changes for Linux from Thorvald NatvigSamba Release Account1-1/+1
Makefile.RPM: Added quoata changes for Linux from Thorvald Natvig charset.c: Large changes to add multiple client code pages. charset.h: Changed charset_initialise() proto. client.c: Fixed message sending bug. Changed charset_initialise(). ipc.c: Fixed #ifdef compile problems. loadparm.c: Added "client code page" option. nmbd.c: Changed charset_initialise(). Fixed lmhosts read. nmblookup.c: Changed charset_initialise(). proto.h: Added lp_client_code_page(void). quotas.c: Added quoata changes for Linux from Thorvald Natvig reply.c: Changed debug level. Made SMBecho ignore tid. server.c: Changed charset_initialise(). smb.h: Added DEFAULT_CLIENT_CODE_PAGE as 850. smbpasswd.c: Changed charset_initialise(). status.c: Changed charset_initialise(). testparm.c: Changed charset_initialise(). testprns.c: Changed charset_initialise(). Jeremy Allison (jallison@whistle.com) (This used to be commit 957025bace1bcff34d21a6caeca498e85abccb23)
1997-05-20dir.c: Fixed double slash issue.Samba Release Account1-83/+177
includes.h: Changed to ifdef FAST_SHARE_MODES. ipc.c: Changed lp_workgroup() to myworkgroup. loadparm.c: Added new shared mem parameters. Added Luke's fix. locking.c: Rewrite to do share modes better (both fast and slow modes). nameannounce.c: Changed lp_workgroup() to myworkgroup. Added Luke's fix. nameconf.c: Changed lp_workgroup() to myworkgroup. namedbname.c: Improved debug. namedbserver.c: Changed lp_workgroup() to myworkgroup. namedbsubnet.c: Added Luke's fix - rewritten somewhat. namedbwork.c: Changed lp_workgroup() to myworkgroup. nameelect.c: Added Luke's fix - rewritten somewhat. nameresp.c: Stoped shadowing global. nameserv.c: Added Luke's fix - Improved debug. nameservreply.c: Improved debug. namework.c: Changed lp_workgroup() to myworkgroup. nmbd.c: Added Luke's fix - Changed lp_workgroup() to myworkgroup. pipes.c: Changed lp_workgroup() to myworkgroup. proto.h: Added Luke's fix, added smb_shm_ proto's. reply.c: Changed lp_workgroup() to myworkgroup. server.c: Rewrite to do share modes better (both fast and slow modes). shmem.c: Rewrite to do share modes better (both fast and slow modes). smb.h: Rewrite to do share modes better (both fast and slow modes). status.c: Rewrite to do share modes better (both fast and slow modes). trans2.c: Fixed double slash issue. util.c: Tidied up, created myworkgroup. Jeremy Allison (jallison@whistle.com). (This used to be commit 2a1711eaaf08bb6776770cd3c96b3010f431a677)
1997-05-08status.c: Added brief option. Patch from ccctim@mailbox.ucdavis.eduSamba Release Account1-16/+77
client.c: Added translation of '/' characters to '\' characters. Suggested by friedl@mtndew.com (Stephen J. Friedl) charcn.c: Fix for iso8859-2 (Eastern European) conversions based on a patch from Miroslaw M. Maczka <elvisbze@polbox.com> (This used to be commit 27708a73cef690ea8aea0f3d82619eaed1fe476d)
1997-05-08'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)Samba Release Account1-1/+1
Wed May 7 1997: Update for 1.9.17alpha1 release - 'browsefix release' designed to make browsing across subnets work. byteorder.h: Updated copyright to 1997. charcnv.c: Updated copyright to 1997. charset.c Updated copyright to 1997. charset.h Updated copyright to 1997. client.c Updated copyright to 1997. clientutil.c Updated copyright to 1997. dir.c Updated copyright to 1997. fault.c Updated copyright to 1997. includes.h Updated copyright to 1997. interface.c Updated copyright to 1997. ipc.c Updated copyright to 1997. kanji.c Updated copyright to 1997. kanji.h Updated copyright to 1997. loadparm.c Updated copyright to 1997. locking.c Updated copyright to 1997. mangle.c Updated copyright to 1997. message.c Updated copyright to 1997. nameannounce.c Made use of WINS subnet explicit. Added reset_announce_timer() so announcement can be made immediately when we become a master. Expanded code to do sync with dmb. namebrowse.c Removed redundent checks for AM_MASTER in sync code. Made use of WINS subnet explicit. namedbname.c Made use of WINS subnet explicit. namedbresp.c Made use of WINS subnet explicit. namedbserver.c Made use of WINS subnet explicit. namedbsubnet.c Explicitly add workgroup to WINS subnet when we become a dmb. Made use of WINS subnet explicit. namedbwork.c Made use of WINS subnet explicit. Removed redundent check_work_servertype() function. nameelect.c Explicitly add workgroup to WINS subnet when we become a master browser. Made use of WINS subnet explicit. namelogon.c Updated copyright to 1997. namepacket.c Updated copyright to 1997. namequery.c Updated copyright to 1997. nameresp.c Made use of WINS subnet explicit. Made nmbd fail if configured as master browser and one exists already. nameserv.c Made use of WINS subnet explicit. Remove redundent logon server and domain master code. nameserv.h Add emumerate subnet macros. nameservreply.c Made use of WINS subnet explicit. nameservresp.c Updated copyright to 1997. namework.c Made use of WINS subnet explicit. Updated code to add sync browser entries to add subnet parameter. nmbd.c Added sanity check for misconfigured nmbd. nmblib.c Updated copyright to 1997. nmblookup.c Updated copyright to 1997. nmbsync.c Removed redundent AM_ANY_MASTER check. params.c Updated copyright to 1997. password.c Updated copyright to 1997. pipes.c Updated copyright to 1997. predict.c Updated copyright to 1997. printing.c Updated copyright to 1997. proto.h Changed protos for new nmbd code. quotas.c Updated copyright to 1997. replace.c Updated copyright to 1997. reply.c Updated copyright to 1997. server.c Updated copyright to 1997. shmem.c Updated copyright to 1997. smb.h Updated copyright to 1997. smbencrypt.c Updated copyright to 1997. smbpasswd.c Updated copyright to 1997. smbrun.c Updated copyright to 1997. status.c Updated copyright to 1997. system.c Updated copyright to 1997. testparm.c Updated copyright to 1997. testprns.c Updated copyright to 1997. time.c Updated copyright to 1997. trans2.c Updated copyright to 1997. trans2.h Updated copyright to 1997. uid.c Updated copyright to 1997. username.c Updated copyright to 1997. util.c Updated copyright to 1997. version.h Changed to 1.9.17alpha1. (This used to be commit cf23a155a1315f50d488794a2caf88402bf3e3e6)
1997-01-15locking.c proto.h shmem.c smb.h status.c :Samba Release Account1-16/+17
Changed shm_ prefixes to smb_shm_ prefixes as shm_ is a POSIX.4 prefix. Updated fd code in FAST_SHARE_MODE code to work with new fd indirection. quotas.c: Fixed #ifdef not on position zero. Jeremy. (jra@cygnus.com). (This used to be commit c9a9d56642cc34369a42f48a28116e466240d303)
1997-01-09Makefile: Changes to split Solaris into Solaris2.3 and previous, and 2.4 and ↵Samba Release Account1-8/+9
after from Paul Eggert. Makefile: Added AMIGA changes from Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk>. charset.c: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at> charset.h: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at> clitar.c: Patch to re-sync after read fail from (lost contributor name, sorry). includes.h: Patch for AMIGA from Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk> includes.h: Patch for SunOS atexit by Jeremy (jra@cygnus.com) interface.c: Patch for AMIGA from Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk> kanji.h: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at> locking.c: Patch to fix file locking from Jeremy (jra@cygnus.com) locking.c: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) pipes.c: Patch to fix file locking from Jeremy (jra@cygnus.com) proto.h: Patch to fix file locking from Jeremy (jra@cygnus.com) reply.c: Patch to fix file locking from Jeremy (jra@cygnus.com) server.c: Patch to fix file locking from Jeremy (jra@cygnus.com) server.c: Patch for FAST_SHARE_MODE fix from (lost contributor name, sorry). smb.h: Patch to fix file locking from Jeremy (jra@cygnus.com) smb.h: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) status.c: Patch to fix file locking from Jeremy (jra@cygnus.com) statuc.c: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com) system.c: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at> trans2.c: Patch to fix file locking from Jeremy (jra@cygnus.com) trans2.c: Patch to fix volume name reported to Win95 from Jeremy (jra@cygnus.com) util.c: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at> util.c: Patch to fix client_name from continuously returning UNKNOWN (from various contributors). version.h: Update to 1.9.16p10. (This used to be commit 03d28fa32eb094affa33133ebe2602fdb70f6361)
1996-08-17- made FAST_SHARE_MODES standard for LinuxAndrew Tridgell1-4/+4
- you can now press enter after a password prompt with "smbclient -L hostname" and it will use a blank username and password, the same as if you used -U% - changed the wins.dat store code to not go via a string variable (just use fprintf instead) - removed a "unsigned long" that luke put back in, changing it to uint32 to keep 64 bit machines happy. Naughtly luke! - allow guest non-connnected print queue listings so ms client 3 can work (This used to be commit 917160dee69bbc198985b6f3232ca2dcda809d8a)
1996-08-15- added FAST_SHARE_MODES codeAndrew Tridgell1-40/+137
- added some named pipe code from Jim (This used to be commit c94866e9e44ea1eb72da06bc65ef1c032ae8e0c9)
1996-06-10got rid of a lot of redundent header files as we now globally generateAndrew Tridgell1-5/+0
prototypes automatically using "make proto". This is much less prone to error than the old method of manually adding prototypes (This used to be commit b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc)
1996-06-04a huge pile of changes :-)Andrew Tridgell1-1/+1
The biggest thing is the integration of Lukes new nmbd. Its still largely untested, so we will really need some feedback I've also added auto prototype generation and cleaned up a lot of minor things as a result (This used to be commit 0d8dcfa13c527ec2c8aca39ba49c09e4e694b26c)
1996-05-31Lots of changes!Andrew Tridgell1-2/+3
- add faq info on NT printer handling - add "delete readonly" option to help rcs users - add stuff to man pages on new printer options - add "proxy name resolution" option - add "command string" -c option to smbclient (thanks Ken) - split time functions into time.c - rearrange the quotas stuff a bit and fix some bugs - complete rehash of the time handling code thanks to Paul Eggert - fix nmblookup output a bit - add plp print queue parsing from Bertrand Wallrich (This used to be commit 635b56f19c817527c52e9bbde31faa6a8a47777b)
1996-05-05- added hostname support to smbstatusAndrew Tridgell1-3/+7
- fix a bug where -s would not be recognised (This used to be commit 03744dc0cd49a54b4dd30645a2b77007c9d19bdc)
1996-05-04Initial version imported to CVS Samba Release Account1-0/+258
(This used to be commit 291551d80711daab7b7581720bcd9a08d6096517)