| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
because it is the originator of various const strings and knows that they
came from malloc.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
preparing to edit it.
PR: bin/50563
|
|
|
|
|
|
|
| |
or the tty, just block selected signals in the parent like system(3) does.
Many thanks to bde for his assistance in finding the correct solution.
PR: bin/50679
|
|
|
|
|
|
|
|
| |
proper way to fix this. The way this works is to prepend "exec " to
the editor command to eliminate the "shell in the middle" which prevents
us from properly reawakening the editor after a SIGTSTP.
PR: bin/50679
|
|
|
|
|
|
|
| |
variable.
PR: 48748
Reviewed by: mike (mentor)
|
|
|
|
| |
Submitted by: joerg
|