| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function returns the path to the local software base directory, by
default "/usr/local" (or the value of _PATH_LOCALBASE in include/paths.h
when building the world).
The value returned can be overridden by 2 methods:
- the LOCALBASE environment variable (ignored by SUID programs)
- else a non-default user.localbase sysctl value
Reviewed by: hps (earlier version)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D27236
Notes:
svn path=/head/; revision=367813
|
|
|
|
|
|
|
| |
hashed out.
Notes:
svn path=/head/; revision=367711
|
|
|
|
|
|
|
|
|
| |
escaped prior testing, but it should be better now.
Reported by: lots
Notes:
svn path=/head/; revision=367689
|
|
|
|
|
|
|
|
|
|
|
| |
unify the retrieval of the various ways that the local software base directory,
typically "/usr/local", is expressed in the system.
Reviewed by: se
Differential Revision: https://reviews.freebsd.org/D27022
Notes:
svn path=/head/; revision=367686
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
data from /etc/passwd rather than /etc/master.passwd.
The libc getpwent(3) and related functions automatically read master.passwd
when run by root, or passwd when run by a non-root user. When run by non-
root, getpwent() copes with the missing data by setting the corresponding
fields in the passwd struct to known values (zeroes for numbers, or a
pointer to an empty string for literals). When libutil's pw_scan(3) was
used to parse a line without the root-accessible data, it was leaving
garbage in the corresponding fields.
These changes rename the static pw_init() function used by getpwent() and
friends to __pw_initpwd(), and move it into pw_scan.c so that common init
code can be shared between libc and libutil. pw_scan(3) now calls
__pw_initpwd() before __pw_scan(), just like the getpwent() family does, so
that reading an arbitrary passwd file in either format and parsing it with
pw_scan(3) returns the same results as getpwent(3) would.
This also adds a new pw_initpwd(3) function to libutil, so that code which
creates passwd structs from scratch in some manner that doesn't involve
pw_scan() can initialize the struct to the values expected by lots of
existing code, which doesn't expect to encounter NULL pointers or garbage
values in some fields.
Notes:
svn path=/head/; revision=336746
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326219
|
|
|
|
|
|
|
|
| |
Reviewed by: des, emaste
Differential Revision: https://reviews.freebsd.org/D11690
Notes:
svn path=/head/; revision=322054
|
|
|
|
| |
Notes:
svn path=/head/; revision=283984
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of ongoing work on sbin/pw
M libutil.h
M gr_util.c
Approved by: theraven
Notes:
svn path=/head/; revision=247919
|
|
|
|
|
|
|
|
|
| |
- Fix tinderbox error
Submitted by: db
Notes:
svn path=/head/; revision=244739
|
|
|
|
|
|
|
|
|
| |
into an existing group.
Submitted by: db
Notes:
svn path=/head/; revision=244736
|
|
|
|
|
|
|
|
|
| |
are lined up, then any * after a long type should appear after the
type instead of being in front of the function name on the following
line.
Notes:
svn path=/head/; revision=230601
|
|
|
|
|
|
|
|
|
| |
format).
Requested by bde
Notes:
svn path=/head/; revision=230600
|
|
|
|
|
|
|
| |
Requested by bde.
Notes:
svn path=/head/; revision=230599
|
|
|
|
|
|
|
|
|
| |
Fix header comments for each section of constants.
Fix whitespace in #define lines.
Fix unnecessary parenthesis in constants.
Notes:
svn path=/head/; revision=230233
|
|
|
|
|
|
|
|
|
|
|
|
| |
for pidfh in libutil.h in its place.
This allows us to hide the contents of the pidfh structure, and also
allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the
pidfile_* function prototypes.
Suggested by pjd.
Notes:
svn path=/head/; revision=230037
|
|
|
|
|
|
|
|
|
| |
and namespace fix for property_find() prototype.
Provided by bde.
Notes:
svn path=/head/; revision=230011
|
|
|
|
|
|
|
| |
Requested by bde.
Notes:
svn path=/head/; revision=229988
|
|
|
|
|
|
|
|
|
| |
Add missing prototype parameter names.
Requested by bde.
Notes:
svn path=/head/; revision=229986
|
|
|
|
|
|
|
| |
Requested by bde.
Notes:
svn path=/head/; revision=229985
|
|
|
|
| |
Notes:
svn path=/head/; revision=229951
|
|
|
|
|
|
|
| |
pidfile.
Notes:
svn path=/head/; revision=229937
|
|
|
|
|
|
|
|
|
| |
while here, fix missing parentheses of the return statement of pw_make.
Approved by: des (mentor)
Notes:
svn path=/head/; revision=229572
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- if pw is NULL and oldpw is not NULL then the oldpw is deleted
- if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid
then it renames the user
add new gr_* functions so now gr_util API is similar to pw_util API,
this allow to manipulate groups in a safe way.
Reviewed by: des
Approved by: des
MFC after: 1 month
Notes:
svn path=/head/; revision=228545
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Notes:
svn path=/head/; revision=221502
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
prefixes (Ki, Mi, Gi...) for humanize_number(3).
Note that applications has to pass HN_IEC_PREFIXES to use this
feature for backward compatibility reasons.
Reviewed by: arundel
MFC after: 2 weeks
Notes:
svn path=/head/; revision=220582
|
|
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=219344
|
|
|
|
|
|
|
|
|
|
| |
switch. Since expand_number() does not accept negative numbers, switch
from int64_t to uint64_t; this makes it easier to check for overflow.
MFC after: 3 weeks
Notes:
svn path=/head/; revision=211304
|
|\
| |
| |
| | |
Notes:
svn path=/projects/quota64/; revision=204708
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are several reasons why it didn't work:
- It was missing <sys/cdefs.h> for __BEGIN_DECLS.
- It uses various primitive types that were not declared.
Notes:
svn path=/head/; revision=200035
|
| |
| |
| |
| |
| |
| |
| | |
old 32-bit and the new 64-bit formats.
Notes:
svn path=/projects/quota64/; revision=201144
|
| |
| |
| |
| | |
Notes:
svn path=/projects/quota64/; revision=199328
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
in an associated quotafile. Needed by repquota.
Bug fix in quota_read.
Notes:
svn path=/projects/quota64/; revision=198265
|
| |
| |
| |
| | |
Notes:
svn path=/projects/quota64/; revision=197532
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
quotactl(2) interface and inactive quotas by accessing the quota
files directly.
Update the edquota program to use this new interface as proof of
concept.
Notes:
svn path=/projects/quota64/; revision=188604
|
| |
| |
| |
| | |
Notes:
svn path=/projects/quota64/; revision=188598
|
| |
| |
| |
| | |
Notes:
svn path=/projects/quota64/; revision=188568
|
|/
|
|
| |
Notes:
svn path=/projects/quota64/; revision=187914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
this by hand in userland utilities.
MFC after: 1 month
Notes:
svn path=/head/; revision=180161
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
be called with a const without the compiler grisling.
Notes:
svn path=/head/; revision=173719
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
that I make stupid fundamental mistakes like this when I don't.
Notes:
svn path=/head/; revision=169450
|
|
|
|
|
|
|
|
|
| |
flopen(3) function which reliably opens and locks a file.
MFC after: 3 weeks
Notes:
svn path=/head/; revision=169446
|
|
|
|
|
|
|
| |
and loading it.
Notes:
svn path=/head/; revision=155804
|