aboutsummaryrefslogtreecommitdiff
path: root/lib/libutil/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Stop exporting __pw_scan and __pw_initpwd as freebsd-private libc functionsIan Lepore2018-07-271-2/+4
| | | | | | | | | | for use in libutil, and instead compile the small amount of common code directly into libutil with a .PATH reachover. Discussed with: kib@ Notes: svn path=/head/; revision=336779
* Use __SCCSID() for SCCS IDs.John Baldwin2018-05-231-1/+1
| | | | | | | | | - Define NO__SCCSID in CFLAGS to preserve existing behavior of omitting SCCS IDs by default. - While here, fix the $FreeBSD$ in pw_util.c to use __FBSDID. Notes: svn path=/head/; revision=334106
* MFhead@r322057Enji Cooper2017-08-041-0/+1
|\ | | | | | | Notes: svn path=/projects/make-check-sandbox/; revision=322058
| * Introduce the flopenat(3) function.Mariusz Zaborski2017-08-041-0/+1
| | | | | | | | | | | | | | | | Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D11690 Notes: svn path=/head/; revision=322054
* | Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-021-0/+1
|/ | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
* Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-021-3/+1
| | | | | | | | | | | | | | directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Notes: svn path=/head/; revision=321912
* Correct MLINKS for sbuf_hexdump(9)Enji Cooper2017-03-031-1/+0
| | | | | | | | | | | | | sbuf_hexdump(9) should be linked to sbuf(9), not hexdump(3). Another review will be posted to deduplicate the sbuf_hexdump reference in in hexdump(3) or at the very least make the information less duplicative. MFC after: 1 week X-MFC with: r313437 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314587
* Clean up trailing and leading whitespace for variables to make itEnji Cooper2017-02-081-5/+5
| | | | | | | | | | | consistent with the rest of the file and style.Makefile(9) a bit more MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313438
* Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describesEnji Cooper2017-02-081-0/+1
| | | | | | | | | | sbuf_hexdump(9)'s behavior MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=313437
* Use SRCTOP-relative paths to other directories instead of .CURDIR-relative onesEnji Cooper2017-01-201-1/+1
| | | | | | | | | | This implifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=312470
* First pass through library packaging.Glen Barber2016-02-041-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295278
* List kinfo_getfile.c only once.Brooks Davis2015-06-101-1/+1
| | | | | | | | MFC after: 3 days Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=284225
* revert r283969,283970 not needed anymore after r283981Baptiste Daroussin2015-06-041-1/+0
| | | | Notes: svn path=/head/; revision=283984
* Add a pw_mkdb2(3) function which does the same thing as pw_mkdb(3) exceptBaptiste Daroussin2015-06-031-0/+1
| | | | | | | | | | | it takes a new argument allowing to specify the endianness of the database to generate Differential Revision: https://reviews.freebsd.org/D2730 Reviewed by: ian Notes: svn path=/head/; revision=283969
* Export a list of VM objects in the system via a sysctl. The list can beJohn Baldwin2015-05-271-2/+4
| | | | | | | | | | | | | examined via 'vmstat -o'. It can be used to determine which files are using physical pages of memory and how much each is using. Differential Revision: https://reviews.freebsd.org/D2277 Reviewed by: alc, kib MFC after: 2 weeks Sponsored by: Norse Corp, Inc. (forward porting to HEAD/10) Notes: svn path=/head/; revision=283624
* Integrate lib/libutil into the build/kyuaEnji Cooper2014-08-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the .t wrappers Rename all of the TAP test applications from test-<test> to <test>_test to match the convention described in the TestSuite wiki page humanize_number_test.c: - Fix -Wformat warnings with counter variables - Fix minor style(9) issues: -- Header sorting -- Variable declaration alignment/sorting in main(..) -- Fit the lines in <80 columns - Fix an off by one index error in the testcase output [*] - Remove unnecessary `extern char * optarg;` (this is already provided by unistd.h) Phabric: D555 Approved by: jmmv (mentor) MFC after: 2 weeks Obtained from: EMC / Isilon Storage Division [*] Submitted by: Casey Peel <cpeel@isilon.com> [*] Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=269904
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* Document the pw_util(3) functionsBaptiste Daroussin2012-10-301-1/+14
| | | | | | | Reviewed by: des, gjb Notes: svn path=/head/; revision=242381
* Finally nuke auth.conf, nine years after it was deprecated. The onlyDag-Erling Smørgrav2012-06-121-3/+2
| | | | | | | | | | | | | | | | | | | | | thing it was still used for was to set the "global default" password hash. Since the stock auth.conf contained nothing but comments, the global default was actually the first algorithm in crypt(3)'s list, which happens to be DES; I take the fact that nobody noticed as proof that it was not used outside of crypt(3). The only other use in our tree was in the Kerberos support code in in tinyware's passwd(1). I removed that code in an earlier commit; it would not have compiled anyway, as it only supported Kerberos IV. The auth_getval() function is now a stub that always returns NULL, which has the same effect as a functional auth_getval() with an empty auth.conf. MFC after: 3 weeks Notes: svn path=/head/; revision=236965
* Fix disorder in MAN and MLINKS lists.Guy Helmer2012-01-121-37/+37
| | | | | | | Requested by bde. Notes: svn path=/head/; revision=230016
* Add link for pidfile_fileno.3 to pidfile.3 - thanks again pjd!Guy Helmer2012-01-101-1/+2
| | | | Notes: svn path=/head/; revision=229943
* - Commit work from libprocstat project. These patches add support for runtimeStanislav Sedov2011-05-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | file and processes information retrieval from the running kernel via sysctl in the form of new library, libprocstat. The library also supports KVM backend for analyzing memory crash dumps. Both procstat(1) and fstat(1) utilities have been modified to take advantage of the library (as the bonus point the fstat(1) utility no longer need superuser privileges to operate), and the procstat(1) utility is now able to display information from memory dumps as well. The newly introduced fuser(1) utility also uses this library and able to operate via sysctl and kvm backends. The library is by no means complete (e.g. KVM backend is missing vnode name resolution routines, and there're no manpages for the library itself) so I plan to improve it further. I'm commiting it so it will get wider exposure and review. We won't be able to MFC this work as it relies on changes in HEAD, which was introduced some time ago, that break kernel ABI. OTOH we may be able to merge the library with KVM backend if we really need it there. Discussed with: rwatson Notes: svn path=/head/; revision=221807
* IFH@204581Dag-Erling Smørgrav2010-03-041-7/+5
|\ | | | | | | Notes: svn path=/projects/quota64/; revision=204708
| * Remove login(3), logout(3) and logwtmp(3) from libutil.Ed Schouten2010-01-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | These functions only apply to utmp(5). They cannot be kept intact when moving towards utmpx. The login(3) function would break, because its argument is an utmp structure. The logout(3) and logwtmp(3) functions cannot be used, since they provide a functionality which partially overlaps. Increment SHLIB_MAJOR to 9 to indicate the removal. Notes: svn path=/head/; revision=202216
| * Build lib/ with WARNS=6 by default.Ed Schouten2010-01-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway. Notes: svn path=/head/; revision=201381
* | Further extend the quotafile API.Dag-Erling Smørgrav2009-09-261-1/+5
| | | | | | | | Notes: svn path=/projects/quota64/; revision=197532
* | Merge from headDag-Erling Smørgrav2009-09-171-1/+1
|\| | | | | | | Notes: svn path=/projects/quota64/; revision=197292
| * Bump the version of all non-symbol-versioned shared libraries inKen Smith2009-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson) Notes: svn path=/head/; revision=195767
* | Merge from head up to r188941 (last revision before the USB stack switch)Dag-Erling Smørgrav2009-09-171-1/+2
|\| | | | | | | Notes: svn path=/projects/quota64/; revision=197278
| * Add filler man pages for the kinfo functions I added recently.Peter Wemm2008-12-071-1/+2
| | | | | | | | | | | | | | While here, hook up the hexdump(3) man page which wasn't being installed. Notes: svn path=/head/; revision=185729
* | WIPDag-Erling Smørgrav2009-01-301-3/+7
|/ | | | Notes: svn path=/projects/quota64/; revision=187914
* Merge user/peter/kinfo branch as of r185547 into head.Peter Wemm2008-12-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes struct kinfo_filedesc and kinfo_vmentry such that they are same on both 32 and 64 bit platforms like i386/amd64 and won't require sysctl wrapping. Two new OIDs are assigned. The old ones are available under COMPAT_FREEBSD7 - but it isn't that simple. The superceded interface was never actually released on 7.x. The other main change is to pack the data passed to userland via the sysctl. kf_structsize and kve_structsize are reduced for the copyout. If you have a process with 100,000+ sockets open, the unpacked records require a 132MB+ copyout. With packing, it is "only" ~35MB. (Still seriously unpleasant, but not quite as devastating). A similar problem exists for the vmentry structure - have lots and lots of shared libraries and small mmaps and its copyout gets expensive too. My immediate problem is valgrind. It traditionally achieves this functionality by parsing procfs output, in a packed format. Secondly, when tracing 32 bit binaries on amd64 under valgrind, it uses a cross compiled 32 bit binary which ran directly into the differing data structures in 32 vs 64 bit mode. (valgrind uses this to track file descriptor operations and this therefore affected every single 32 bit binary) I've added two utility functions to libutil to unpack the structures into a fixed record length and to make it a little more convenient to use. Notes: svn path=/head/; revision=185548
* Fixed style issues with variable ordering and naming, spacing andSean Farley2008-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | parentheses. Fixed alignment issue in gr_dup() in its assignment of gr_mem using a struct to force alignment without performing alignment mathematics. This was noticed recently with libutil was built with WARNS=6 on platform such as sparc64. Added checks to gr_dup(), gr_equal() and gr_make() to prevent segfaults when examining struct group's with the struct members pointing to NULL's. With fix of alignment issue, restore WARNS?=6. Reviewed by: des MFC after: 1 week Notes: svn path=/head/; revision=185237
* Comment out WARNS. There are too many alignment issues in libutil.Dag-Erling Smørgrav2008-11-051-1/+1
| | | | Notes: svn path=/head/; revision=184677
* Disconnect gr_util.c from the build. It isn't documented or used anywhereDag-Erling Smørgrav2008-11-051-1/+1
| | | | | | | | in the tree, and due to unsafe pointer arithmetic, it will most likely crash on architectures with strict alignment requirements. Notes: svn path=/head/; revision=184676
* libutil now builds at WARNS level 6.Dag-Erling Smørgrav2008-11-041-0/+2
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=184635
* Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doingJohn Baldwin2008-07-011-3/+3
| | | | | | | | | this by hand in userland utilities. MFC after: 1 month Notes: svn path=/head/; revision=180161
* Add four utility functions related to struct grp processing modeled in-partSean Farley2008-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | after similar calls related to struct pwd in libutil/pw_util.c: - gr_equal() Perform a deep comparison of two struct grp's. It does a thorough, yet unoptimized comparison of all the members regardless of order. - gr_make() Create a string (see group(5)) from a struct grp. - gr_dup() Duplicate a struct grp. Returns a value that is a single contiguous block of memory. - gr_scan() Create a struct grp from a string (as produced by gr_make()). MFC after: 3 weeks Notes: svn path=/head/; revision=178431
* Implement expand_number(3), which is the opposite of humanize_number(3), ie.Pawel Jakub Dawidek2007-09-011-3/+3
| | | | | | | | | | | | | a number in human-readable form is converted to int64_t, for example: 123b -> 123 10k -> 10240 16G -> 17179869184 First version submitted by: Eric Anderson <anderson@freebsd.org> Approved by: re (bmah) Notes: svn path=/head/; revision=172029
* Bump library versions in preparation for 7.0.Daniel Eischen2007-05-211-1/+1
| | | | | | | Ok'd by: kan Notes: svn path=/head/; revision=169807
* I'm tired of seeing this done incorrectly and non-portably, so add aDag-Erling Smørgrav2007-05-101-6/+6
| | | | | | | | | flopen(3) function which reliably opens and locks a file. MFC after: 3 weeks Notes: svn path=/head/; revision=169446
* style.Makefile(5) is good for our eyes.Yaroslav Tykhiy2006-07-271-4/+8
| | | | Notes: svn path=/head/; revision=160745
* Specify default path for SHLIBDIR before bsd.own.mk does.Shunsuke Akiyama2006-06-111-1/+3
| | | | | | | This fix shared library installed correct place. Notes: svn path=/head/; revision=159503
* Don't build IPv6 support if we have choosen not to have it.Xin LI2006-06-091-0/+4
| | | | Notes: svn path=/head/; revision=159467
* Bump library majro version for gethostbyaddr(3).Hajimu UMEMOTO2006-05-211-1/+1
| | | | Notes: svn path=/head/; revision=158794
* Add utility functions for checking if a given kernel module is loaded,Dag-Erling Smørgrav2006-02-181-2/+3
| | | | | | | and loading it. Notes: svn path=/head/; revision=155804
* Add a family of functions for reliable pidfiles handling.Pawel Jakub Dawidek2005-08-241-3/+8
| | | | | | | | Idea from: jmg Discussed on: arch@ Notes: svn path=/head/; revision=149423
* Bump the shared library version number of all libraries that have notKen Smith2005-07-221-1/+1
| | | | | | | | | | been bumped since RELENG_5. Reviewed by: ru Approved by: re (not needed for commit check but in principle...) Notes: svn path=/head/; revision=148297
* Add humanize_number(3) to libutil for formating numbers into a humanPawel Jakub Dawidek2004-05-241-4/+4
| | | | | | | | | readable form. Obtained from: NetBSD Notes: svn path=/head/; revision=129677
* Back out the "clean_environment()" function from libutil.Tim Kientzle2004-02-291-4/+4
| | | | | | | | | | Further contemplation has convinced me that this was not going to really solve the problem of environment-poisoning without raising serious administrative headaches. There must be a better way... Notes: svn path=/head/; revision=126419