| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Fixes instances where a mount point uses the nodev and nosuid options
but another file system mounted inside that hierarchy does not.
OK schwarze@
|
| |
|
|
|
|
| |
so stop looking for them in mount(8) output;
no functional change intended;
OK millert@
|
| |
|
|
|
|
|
|
|
|
|
| |
for SUID, SGID, and device files, implementing an idea that deraadt@
came up with based on a somewhat similar idea from millert@ after
a loosely related comment from Rupert Gallagher on misc@.
While here, minimally simplify the way mount options are parsed,
hoping to make the parsing more readable and also more robust.
OK millert@ deraadt@
|
| | |
|
| |
|
|
|
|
| |
ignore *.lock files, to avoid pointless warning mails
reported by Philippe Meunier <meunier at ccs dot neu dot edu>;
OK florian@ jca@
|
| |
|
|
|
|
|
|
|
|
|
| |
users can't mount a DOS attack against security(8), and for additional
safety against race attacks, make sure they are regular files after
opening and before actually reading them.
Issue originally hinted at by Sevan Janiyan <venture37 at
geeklan dot com dot uk> based on a NetBSD commit message,
then commented on by tedu@, problem finally confirmed by guenther@,
who also provided feedback on the actual patch.
|
| |
|
|
|
|
|
|
| |
In that particular case, refrain from printing "diff: exit code 1"
because that exit status doesn't indicate an error condition.
Issue noticed by and patch OK'ed by ajacoutot@.
"I agree with the goal, and I suspect the diff actually achieves it" guenther@.
|
| |
|
|
|
| |
two characters "on", which can for example happen for NFS mounts.
Patch from Lauri Tirkkonen <lotheac at iki dot fi> on bugs@.
|
| |
|
|
|
|
|
| |
home directory field, warn explicitly rather than stumbling
into Perl "uninitialized value" warnings.
Issue reported by Denis Lapshin <deniza at mindall dot org>.
OK afresh1@
|
| |
|
|
|
|
| |
very special shell, so do not complain about that particular combination.
Idea originally brought up by landry@ five years ago, repeatedly forgotten.
Using feedback from sthen@ millert@ halex@; OK landry@ ajacoutot@.
|
| |
|
|
|
|
|
| |
so do not complain when it is absent.
issue found by and patch ok by ajacoutot@
"I don't do perl, but seems ok" deraadt@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
not even for calling three particular functions, as that carries a risk
of hiding serious errors in the security(8) script itself: otto@ found
and reported a bug (already fixed by now) where that hurt him.
Instead, only do the redirection where it is really needed, that is,
inside the forked csh(1) child process. The csh(1) "eval" builtin is
required because the csh(1) "source" builtin apparently ignores
redirections.
No objections came up when showing this diff on tech@.
|
| |
|
|
|
|
|
|
|
| |
provides information from wait(2), which needs careful inspection
in order to not hide errors.
Problem identified by florian@ after a bug report from otto@.
Fix based on a patch from florian@, considerably tweaked by me.
OK florian@
|
| |
|
|
|
|
|
|
|
|
|
| |
functions since that is going to kill the Perl interpreter.
While here, do not attempt to parse $PATH or $ENV when undefined.
Crash found the hard way with a dubious /root/.login file by otto@ who
declares himself unable to read perl code even though he can apparently
debug it with ktrace(1) - thanks for the excellent bug report!
Feedback and ok florian@.
|
| |
|
|
| |
ok henning@ deraadt@
|
| | |
|
| |
|
|
|
|
| |
i.e. don't check for hosts.equiv anymore.
input/ok schwarze@, ok sthen@
|
| | |
|
| |
|
|
|
| |
the format string to be dropped, causing the year to be printed instead of
the filename, as reported by ajacoutot. ok espie@
|
| |
|
|
|
|
|
|
|
| |
reference. This diff from espie@ after we worked through a few alternatives.
(Background: with perl's taint mode, any operation other than RE+backref, even
just taking a length of a tainted [user-supplied/untrusted] string, results in
a tainted variable. Perl 5.14 improves the checks in format strings to sprintf
which triggers with this script).
|
| |
|
|
| |
"I don't even see how this could work before" and ok espie@
|
| |
|
|
| |
assumed anyway, but recent versions of Perl deprecate this. ok espie@
|
| |
|
|
|
|
|
| |
taking advantage of naddy@'s recent mtree(8) modernization.
While here, do not provide an example protecting a home directory
from file changes; protect some system binaries instead.
ok naddy@ jmc@
|
| |
|
|
| |
ok schwarze@
|
| |
|
|
|
|
|
|
| |
be stat(2)'ed, but do not complain about those that were just removed,
because removing files is not a security risk in itself.
Sorry, i can't remember the original reporter of the issue;
reported again by mk@; patch looks good to Andrew Fresh.
|
| |
|
|
|
| |
with trailing spaces; ugliness spotted by daniel dot c dot sinclair at
gmail dot com, fix from Andrew Fresh.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
by the recent security(8) rewrite.
While here:
1) Skip relative paths in changelist(5), and complain about them.
2) Skip file names ending in a tilde ('~') unless the tilde is
explicitly specified in the changelist(5). That is, trailing
wildcards will not match trailing tildes, as suggested by matthew@.
Bug reported by both mk@ and matthew@.
OK Andrew Fresh, also tested by and "move forward" mk@
|
| |
|
|
|
|
|
|
| |
such that security(8) would output garbage on stderr.
One reported by <RD at thrush dot com>, the other found by code audit.
While here, remove dead code in two other places: stat(_) uses cashed
data and cannot fail, not even if the file is removed in between.
ok Andrew Fresh
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
that abbreviated syntax is explicitly allowed by group(5). While here,
warn if it isn't the last line in the group file.
Regression reported, fix tested and ok miod@, and seems good to ajacoutot@.
Note: I'm not removing the advice to put "+\n" at the end of the group file
right now because i'm not 100% sure that advice is pointless, even though
guenther@ looked at the code an came to the conclusion OpenBSD libc ought
to cope. And i'd rather have the manuals and the syntax checker be
consistent. In case this really annoys people, it can be carefully tested
and changed later.
|
| |
|
|
|
|
|
|
|
|
| |
undefined data got used.
Fix this by reporting the UID/GID numerically in that case.
Problem reported and patch provided by rd at thrush dot com.
While here, use // rather than || everywhere to detect get*id failure,
as suggested by RD Thrush. The edge case where it matters - a username
of "0" - is rather insane, but the // is more precise anyway.
|
| |
|
|
|
|
|
| |
>> "return if !%changed;" in check_filelist would never return
because just above "for @{$changed{xxx}}" autovivifys $changed{xxx} = []
if it is not set already. <<
I hate autovivification, and it hates me.
|
| | |
|
| |
|
|
|
|
| |
user %s mailbox is %s, group %s
This is easy because we now have the strmode() function.
From Andrew Fresh, minimally tweaked myself.
|
| |
|
|
|
|
| |
keep the format of the "Block device changes:" output exactly the same
as it was in the past. As a bonus, this also avoids lies in variable
names, making it more obvious what is actually being compared here.
|
| | |
|
| |
|
|
|
|
|
| |
heavily based on code written by Andrew Fresh,
but with considerable tweaking, mainly for simplicity;
lightly tested - there are probably still bugs, but auditing and
fixing it in the tree will be easier than with floating diffs
|
| |
|
|
|
|
| |
* include the colon into $check_title, where needed
* always use the same style for stat calls
* and a few minor points
|
| |
|
|
|
| |
heavily based on code written by Andrew Fresh;
tweaked in team-work
|
| |
|
|
| |
large parts from a submission by Andrew Fresh <andrew at afresh1 dot com>
|
| | |
|
|
|
Main design goals:
1. Safely handle untrusted file names and file content.
2. Output compatibility with current security(8) to please people
parsing the output with scripts (except when improving functionality
right away saves considerable implementation effort). Substantial
functional enhancements are for later.
Prodding to do this in Perl by deraadt@.
Using some feedback from espie@.
Agree to put this in now and at this place even though only about
one third of the functionality is ready, to complete it in the tree:
beck@ espie@ millert@ deraadt@
|