Merge "sysctl: enable strict writes"
This commit is contained in:
commit
f6e3e8bba4
2 changed files with 8 additions and 9 deletions
|
@ -850,14 +850,13 @@ via the /proc/sys interface:
|
|||
Each write syscall must fully contain the sysctl value to be
|
||||
written, and multiple writes on the same sysctl file descriptor
|
||||
will rewrite the sysctl value, regardless of file position.
|
||||
0 - (default) Same behavior as above, but warn about processes that
|
||||
perform writes to a sysctl file descriptor when the file position
|
||||
is not 0.
|
||||
1 - Respect file position when writing sysctl strings. Multiple writes
|
||||
will append to the sysctl value buffer. Anything past the max length
|
||||
of the sysctl value buffer will be ignored. Writes to numeric sysctl
|
||||
entries must always be at file position 0 and the value must be
|
||||
fully contained in the buffer sent in the write syscall.
|
||||
0 - Same behavior as above, but warn about processes that perform writes
|
||||
to a sysctl file descriptor when the file position is not 0.
|
||||
1 - (default) Respect file position when writing sysctl strings. Multiple
|
||||
writes will append to the sysctl value buffer. Anything past the max
|
||||
length of the sysctl value buffer will be ignored. Writes to numeric
|
||||
sysctl entries must always be at file position 0 and the value must
|
||||
be fully contained in the buffer sent in the write syscall.
|
||||
|
||||
==============================================================
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ extern int no_unaligned_warning;
|
|||
#define SYSCTL_WRITES_WARN 0
|
||||
#define SYSCTL_WRITES_STRICT 1
|
||||
|
||||
static int sysctl_writes_strict = SYSCTL_WRITES_WARN;
|
||||
static int sysctl_writes_strict = SYSCTL_WRITES_STRICT;
|
||||
|
||||
static int proc_do_cad_pid(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
|
Loading…
Add table
Reference in a new issue