| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Add missing prototype parameter names.
Requested by bde.
|
|
|
|
| |
Requested by bde.
|
| |
|
|
|
|
| |
pidfile.
|
|
|
|
|
|
| |
while here, fix missing parentheses of the return statement of pw_make.
Approved by: des (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
MFC after: 5 days
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Replace it to avoid conflict.
MFC after: 3 weeks
|
|
|
|
|
|
| |
The problem with fcntl(2) locks is that they are not inherited by child
processes. This breaks pidfile(3), where the common idiom is to open
and lock the PID file before daemonizing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
MFC after: 3 weeks
|
|
|
|
| |
lock if the file is opened with O_RDONLY.
|
| |
|
|
|
|
| |
be part of the public API. Accordingly, add prototypes and document them.
|
|
|
|
| |
part of the public API. Accordingly, add a prototype and document it.
|
| |
|
|
|
|
| |
sessions to be pinned to cpus by login class.
|
|
|
|
|
|
| |
this by hand in userland utilities.
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
be called with a const without the compiler grisling.
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
Approved by: re (kensmith)
|
|
|
|
| |
Approved by: re (kensmith)
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
locked it.
MFC after: 3 weeks
|
|
|
|
| |
that I make stupid fundamental mistakes like this when I don't.
|
| |
|
|
|
|
| |
MFC after: 3 weeks
|
|
|
|
|
|
| |
flopen(3) function which reliably opens and locks a file.
MFC after: 3 weeks
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
(copy it silently, do not dereference NULL pointer).
PR: bin/102848
Reviewed by: security-officer (cperciva)
MFC after: 1 week
|
|
|
|
| |
and loading it.
|
|
|
|
|
| |
Idea from: jmg
Discussed on: arch@
|
| |
|
| |
|
|
|
|
|
|
| |
readable form.
Obtained from: NetBSD
|
|
|
|
|
|
| |
to variadic functions.
Approved by: das (mentor)
|
|
|
|
|
|
|
| |
arguments. The function has as a second argument a struct passwd * pointer,
not a directory name.
MFC after: 2 weeks
|
|
|
|
| |
MFC after: 2 weeks
|