| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The return value from popen() is a normal standard I/O stream in all
respects save that it must be closed with pclose() rather than
fclose(3).
Solves the following warning when compiled with -Wmismatched-dealloc:
errno.c: In function ‘search_all’:
errno.c:126:5: warning: ‘fclose’ called on pointer returned from a
mismatched allocation function
[-Wmismatched-dealloc]
126 | fclose(f);
| ^~~~~~~~~
errno.c:113:9: note: returned from ‘popen’
113 | f = popen("locale -a", "r");
| ^~~~~~~~~~~~~~~~~~~~~~~
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As recently seen in fail2ban's security hole (CVE-2021-32749),
piping user controlled input to mail is exploitable,
since a line starting with "~! foo" in the input will run command foo.
A core file named like that is not impossible, so guard against it in this
example.
Sponsored-by: Jack Hill on Patreon
|
|
|
|
| |
Thanks, meator
|
| |
|
|
|
|
|
|
|
|
| |
Since that header is output to stdout, make sure it is output before
outputting the actual stderr, so the header does not appear after the
stderr.
Thanks to Adam Sjøgren for reporting the problem and making the patch.
|
|
|
|
|
|
| |
vipe: When no output is piped into vipe, and stdin is connected to the
terminal, don't read from stdin before opening the editor. This allows eg:
vipe | command Thanks, Florian Pensec
|
|
|
|
|
|
| |
I was thinking about using my package manager instead of managing the
source myself, but that would have meant manually unlinking all the
files!
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Exit ifdata with an error code if '-ph' (print hardware address) is
given but no hardware address is available for the given network device.
Previously, ifdata printed the invalid hardware address
00:00:00:00:00:00 in such cases and exited as if this was the real
hardware address.
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
|
|
|
|
|
|
| |
abut -> about
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
|
| |
|
| |
|
|
|
|
|
|
| |
Teaching vipe --suffix makes the underlying temporary file have a given
file extension to enable editors to understand the context in which they
are opened.
|
| |
|
| |
|
|
|
|
|
|
| |
getloadavg is not implemented.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch applied, you should be able to do:
kubectl logs --timestamps | ts -r
and receive relative timestamps in your output.
---
Review by Joey: This fixes the year to have 4 digits,
which seems obviously right.
It also allows a trailing Z, for dates in UTC.
Other dates already matched by this regexp can
have time zones, and ts just ignores time zones
and assumes it's in the local time zone. I don't know
if that's really a good idea, but accepting "Z"
does not open a new can of worms.
|
| |
|
|
|
|
|
|
| |
This patch fixes a minor typo in parallel.c, detected by lintian.
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
|
|
|
|
|
|
|
|
| |
Allow propagating compiler and linker flags via overrides of CFLAGS and
LDFLAGS variables. This allows enabling of hardening flags w/o
modification of the original Makefile.
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
|
| |
|
|
|
|
|
|
|
|
| |
Occurred when the temp file is located on a different filesystem.
It seems that append mode was put in on that file open without realizing
the consequences of it. Bug has been present since the first -a patch.
This commit was sponsored by Peter on Patreon.
|
|
|
|
|
|
| |
Previously cursory reading of the manpage suggested that the default format
changes for -s only. But it actually changes for -s or -i, and the reworking
makes that clear.
|
| |
|
|
|
|
|
| |
I.e. 'ts -m %.s' now does reasonable things. There was a bug in the handling of
the offset between the normal and hi-res clocks
|
|
|
|
| |
The -m option was already supported, but the manpage omitted it
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Compiler warning from this as it's deprecated. gcc suggested
_DEFAULT_SOURCE, but I think that's on by default? It seems to compile
ok without it.
|
| |
|
|
|
|
|
| |
Previously pee buffered the data processed which may cause unwanted delays.
This change makes it so that data written to pee gets written out immediately.
|
|
|
|
|
|
|
|
|
|
| |
As complained in #885221, the 'file' arguments were not described as
much as it might be necessary. This patch attempts to reword the man
page to cover the actual argument handling of vidir more completely.
Thanks to Daniel Shahaf.
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
|
|
|
|
|
|
| |
Thanks to Daniel Shahaf.
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without ignoring SIGPIPE, any command run by 'pee' that exits early will
close the pipe to 'pee' and thus cause a SIGPIPE that terminates 'pee'.
The more convinient (and possible less surprising) way is probably to
simply ignore the SIGPIPE and let all other commands issued by 'pee'
continue without any harm.
The same argumentation goes for ignoring write errors, as any early
exiting child of 'pee' is closing the pipe and thus causing a write
error.
With this patch examples like
seq 100000 | pee 'head -n1' 'tail -n1'
echo foo | pee cat 'echo bar' cat cat
do output the expected lines, in contrast to
seq 100000 | pee --no-ignore-sigpipe --no-ignore-write-errors 'head -n1' 'tail -n1'
echo foo | pee --no-ignore-sigpipe --no-ignore-write-errors cat 'echo bar' cat cat
.
Thanks to Ole Jørgen Brønner.
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
|
|
|
|
| |
Thanks, Matt Koscica
|
|
|
|
|
|
|
| |
The mono clock is relative to some arbitrary start time, which led to a
display of a date typically close to the epoch. Fix that by getting the
current time at startup, and applying the delta between that and the
mono time.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The new '-m' option will retrieve the monotonic clock rather than the
realtime clock.
Sometimes it is required that the timer being used not change even when
the user updates the system time. The monotonic clock guarantees a
monotonically increasing time value which may not be adjusted.
Signed-off-by: Ben Leinweber <bleinweb@gmail.com>
|
|
|
|
|
|
| |
This reverts commit d4592ac408f2086a3ed305c3fccf9107763e2be4.
Seems he sent the wrong patch version
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The new '-m' option will retrieve the monotonic clock rather than the
realtime clock.
Sometimes it is required that the timer being used not change even when
the user updates the system time. The monotonic clock guarantees a
monotonically increasing time value which may not be adjusted.
Signed-off-by: Ben Leinweber <bleinweb@gmail.com>
|
| |
|