ding to the types specified in the
source code takes place.
-RVP
wildcards in the spec., as reqd. per the man-page. Give it a try.
-RVP
centry->flags |= flags;
set(next, centry);
if (root == NULL) {
```
-RVP
-K/-k:
```
mtree -R md5,size -C < /etc/mtree/set.base | mtree -ep /
```
-RVP
# fgrep httpd /etc/ttys
"""/usr/libexec/httpd -fqX /tmp"unknown on
qemu# ps -Au | fgrep httpd
root27217 0.0 0.0 17528 3524 ? I 8:10AM 0:00.01 /usr/libexec/httpd -fqX /tmp
root22911 0.0 0.0 11900 1392 ttyE0 O+8:11AM 0:00.00 fgrep httpd
qemu#
```
-RVP
ignal SIGSEGV, Segmentation fault.
#0 0x00405454 in CHadd (p=0x7f7fe2d0, cs=0x7f7ff7a90058, ch=-39)
at /usr/src/lib/libc/regex/regcomp.c:1769
1769cs->bmp[(unsigned)ch >> 3] |= 1 << (ch & 7);
(gdb)
```
This is just PR bin/58092 (AKA lib/58910).
-RVP
>> 3] & (1 << (ch & 7))) !=
0) ^
cs->invert);
else if (cs->icase)
Thanks! This patch seems to fix PR bin/58092 at least; but, can't provoke
the crash in regcomp() as shown...
-RVP
On Tue, 1 Oct 2024, RVP wrote:
Ugly, but, works--after a fashion:
- Only for DIRs in the CWD.
- no `/' allowed in DIR.
- if CMD with the same name as DIR is found in $PATH, that will be executed.
(I tried defining a command_not_found_handle function but that doesn't
seem to w
t, works--after a fashion:
- Only for DIRs in the CWD.
- no `/' allowed in DIR.
- if CMD with the same name as DIR is found in $PATH, that will be executed.
(I tried defining a command_not_found_handle function but that doesn't
seem to work if the command that is not found is a directory).
Ayup, dunno what's up with that.
-RVP
$ gcc13/gcc ...
$ clang-18/cc ...
etc,... but, what should be done for: {base,dir}name(), {get,set}progname(),
and err*()/warn*()? And, of course, realpath() (add a `-m' to the binary?).
-RVP
trary programs, then I have no clue, Thierry :).
But, for POSIX (Bourne) shells, they should set `i' in `$-'. Not sure why
one would additionally want to examine $SHELL here. (I've not read all the
emails in this thread, so may have missed that part.)
-RVP
.
SHELL=/bin/ksh
...
$ sh -i
$ printenv
...
SHELL=/bin/ksh
...
and the same result with "sh -l" (supposed to be considered a login
shell).
So how can the test be reliable in all circumstances?
Set SHELL explicitly?
```
$ echo $SHELL
/bin/bash
$ env SHELL=/bin/dash dash
$ echo $SHELL
/bin/dash
$
```
-RVP
x27;s /bin/sh (and dash) which doesn't allow it.
(Mixed up my Qemu instances--sorry!)
-RVP
oo
$ if "$foo"; then echo set; else echo unset; fi
```
or, to create (mildly) obfuscated fork-bombs:
```
''(){ ''|''&};''
```
-RVP
= , , 5= , , 6= , , *=, , @=,
$ cmp <(bash ./x.sh) <(dash ./x.sh)
```
whereas dash-0.5.12 substitutes a naked `$@' with a space (which seems wrong
to me--not even sure if a bare `$@' makes sense--as opposed to `"$@"' which is
well defined).
The thing to realise in your script is that only 1 string is passed to the
a() function. The other 2 `$*' are elided since they're not in quotes and
empty. And, `"$*"' ends up (ie. as $1) to a() as `original 3 args ($1, $2, $3) are empty with only the 2 separators in between
'em.
-RVP
On Tue, 24 Sep 2024, RVP wrote:
| if "${___SHRC:-:}"
A syntax error of yours?
No, that becomes `if ":" ...' $___SHRC is undefined or empty. You need to
write it that way, else it's a syntax error.
Sorry, I meant to say a "command not found" error
ycode 31 = s S a A
keycode 33 = f F d D
keycode 35 = h H g G
keycode 38 = l L k K
keycode 49 = n N m M
keycode 52 = period greater slash question
keycode 219 = Mode_switch
EoF
$
```
You produce the broken keys using Win+adjacent-to-broken key.
(Why is the script called `qey.sh' instead of `key.sh'? Because the `k' key is
broken :))
-RVP
orld
```
Of course, if you add/delete/rename commands (or dirs. in PATH), you'll have
to recreate the functions again (`hash -r` equiv.).
-RVP
correct)
result, and then passes this to printf().
Try again with -O and/or -fno-builtin, or a different compiler for more fun.
Also here:
https://www.unitedbsd.com/d/1427-long-double-trouble
-RVP
lity mode is off, all commands associated with a
target are executed in a single shell invocation as opposed to
the traditional one shell invocation per line.
So, in non-compat mode, make runs the shell with `-s' instead of `-c' and
therefore, here-docs will work.
-RVP
!= cat /usr/src/sys/kern/*.c
main: .PHONY
make -V X | wc -c
$ make
4938515
$
-RVP
"
.Sh DESCRIPTION
This
.Fn signal
```
(the `cm' string is for nroff only)
-RVP
er->rdevmajor)));
+ archive_entry_set_rdevminor(entry, (dev_t)
+ tar_atol(header->rdevminor, sizeof(header->rdevminor)));
+ }
+
tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining);
return (err);
}
```
-RVP
On Wed, 30 Aug 2023, Christos Zoulas wrote:
Why don't we make next and end unsigned char so that all instances are fixed?
:) My original attempt did just that, but then I had to cast to char in a lot
more places to get libc to build.
-RVP
G_EESCAPE);
cc = GETNEXT();
```
-RVP
yway). Only
lightly tested. Tell me if there are any problems (apart from `-pie -fPIE'
which doesn't work with `-static -pg' in any case).
-RVP--- gcc-std.spec2023-07-05 21:45:17.067947887 +
+++ gcc-pg.spec 2023-07-05 21:49:25.062647745 +
@@ -53,7 +53,7 @@
%{!s
al/gpl3/gcc/dist/gcc/config/netbsd.h
/usr/src/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h
/usr/src/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h
(I had to fiddle with them to get `-pg' working with shared
libs...)
-RVP
On Tue, 4 Jul 2023, RVP wrote:
I think lld(1) does things differently. I'll check this later...
And I was right! On Linux (what I have at hand now):
```
$ clang -fuse-ld=lld -Wl,-Map=map.txt -static -s -o foo foo.c -L. -lmm
$ fgrep -A3 ./libmm.a map.txt
[...]
--
2
On Tue, 4 Jul 2023, Joerg Sonnenberger wrote:
On Tue, Jul 04, 2023 at 08:38:22AM +, RVP wrote:
b) the alloc functions in libc.a not being marked as being "weak".
This doesn't really matter at all, in fact, it is likely going to make
the situation *worse*.
You
On Tue, 4 Jul 2023, RVP wrote:
So, we should:
a) collapse the newly added functions back into a single file.
Ah, looks like this patch will need a free_aligned_sized() to free
the aligned memory. Regular free(), realloc() won't work here (as-is).
-RVP
6420 W aligned_alloc
64d0 W calloc
5d50 T free
55f0 T malloc
7470 W posix_memalign
5fd0 T realloc
$
```
HTH,
-RVP
On Mon, 3 Jul 2023, RVP wrote:
Somebody should maybe add calloc() to bsdmalloc.
And posix_memalign() (any others?) too, else you end up with 2
different arenas and free()/realloc() operating on the wrong one.
-RVP
er.
Yes, except this doesn't work (as expected) with bsdmalloc because it
doesn't implement calloc(), so the linker will get that (and all the je_*
stuff now) from libc.a again. :)
Somebody should maybe add calloc() to bsdmalloc.
-RVP
On Sun, 2 Jul 2023, Emmanuel Dreyfus wrote:
On Sat, Jul 01, 2023 at 02:25:03PM +, RVP wrote:
Not to forget the code for C++ support. And, of course even static
binaries may call dlopen() and friends. So that dl*() and the ELF bits
right there.
At least in 9.3, dlopen() in a static binary
t in either.
Even in the default C/POSIX locale that all programs start in, libc
loads the appropriate shared lib from /usr/lib/i18n/ in order to
handle standard things like LC_CTYPE, LC_NUMERIC, etc.
-RVP
e i18n and NSS
on an as-needed basis.
-RVP
riends. So that dl*() and the ELF bits
right there.
If you want to slim your static binary down, use a different libc first :)
-RVP
[+-]N'.
You can ditch every other compat as far as I'm concerned. You
can even remove obsolete() entirely and I wouldn't shed any tears.
-RVP
Couple of ways to do that:
```
$ printf '\0777' | hexdump -C
3f 37 |?7|
0002
$ printf '\77\067'
3f 37 |?7|
0002
$
```
-RVP
7).
(my emphasis)
What's good for the goose is also good for the gander, I say.
Cheers!
-RVP
te values, shouldn't \777 be interpreted as
'\77' octal then the digit 7; \677 -> \67 octal then 7 etc. ?
Better to do what the C compiler does: try converting up to 3 digits, and
if the result of the conversion is > 255, complain.
-RVP
functionally the same as the ones in your log file.
-RVP
tch/libfetch.a
file itself?
-RVP
ust be the default behaviour.
-RVP
malloc/internal/jemalloc_internal_defs.h
-RVP
with a much less
intrusive change.
Try libtickit--that uses callbacks (I think):
https://www.leonerd.org.uk/code/libtickit/
-RVP
", "vi", NULL);
err(1, "exec /usr/bin/vi failed");
}
```
But, vi, at least, fails to run like this. So, I think using a pty is
the simplest, not to say standard, solution here...
-RVP
NetBSD source for usages, and found only about half-a-dozen instances,
and most of them "safe": either not exec()ing binaries or only relying
on setreuid() if _POSIX_SAVED_IDS is not available. But, of course, you
guys would already know all this...
-RVP
stdout);
if (setreuid(uid, uid) != 0)
err(1, "setreuid(%d, %d) failed", uid, uid);
printf("%s: UID=%d, EUID=%d\n", *argv, getuid(), geteuid());
return 0;
}
---END y.c---
-RVP
:CPPFLAGS+=-D_OPENBSD_SOURCE
/usr/src/tools/mandoc/Makefile:HOST_CPPFLAGS+= -D_OPENBSD_SOURCE
/usr/src/usr.bin/sdiff/Makefile:CPPFLAGS+=-D_OPENBSD_SOURCE
/usr/src/usr.sbin/gpioctl/Makefile:CPPFLAGS+=-D_OPENBSD_SOURCE
/usr/src/usr.sbin/pf/Makefile.inc:CPPFLAGS+= -D_OPENBSD_SOURCE
$
```
-RVP
or the heavy lifting; and, FreeBSD's fgrep is just
regcomp(REG_NOSPEC) :).
-RVP
On Sat, 3 Sep 2022, Martin Husemann wrote:
How about fixing the bsd version we have in tree instead? Maybe FreeBSD or
OpenBSD already did that and we can borrwo?
There is also the home-grown agcre in othersrc which looks (mostly)
feature-complete...
-RVP
On Fri, 2 Sep 2022, Thomas Klausner wrote:
I'd like the change the behaviour to match what GNU grep does.
Comments?
FreeBSD's and OpenBSD's grep (both non-GNU) do the same thing, so it makes
sense to harmonize NetBSD's (old GNU) grep -r behaviour too.
-RVP
again.)
-RVP
On Mon, 15 Aug 2022, Hauke Fath wrote:
On Sun, 14 Aug 2022 09:04:21 + (UTC), RVP wrote:
Linux has a pam_env.so which reads /etc/environment and
/etc/environment.d/* for this kind of thing. I was looking
for something like that on NetBSD a while back...
login.conf(5) can set PATH.
Yeah
Linux has a pam_env.so which reads /etc/environment and
/etc/environment.d/* for this kind of thing. I was looking
for something like that on NetBSD a while back...
-RVP
*/
/* and easier cleanup */
- ctx.out = (uint8_t *)ebuf;
- ctx.outlen = sizeof(ebuf);
-
ctx.out = (uint8_t *)encodebuf;
ctx.outlen = sizeof(encodebuf);
---END---
Thanks,
-RVP
the repositioning of the file descriptor after
fflush() on streams open for read() is not mandated by
POSIX.1-2017.
but, fflush() causing an underlying seek seems useful. I'll see what
I can do this weekend.
-RVP
On Tue, 2 Nov 2021, Christos Zoulas wrote:
In article ,
RVP wrote:
This looks like a useful behaviour to add to the libc close routines.
I agree!
A first cut is something like this:
---START PATCH---
diff -urN stdio.orig/fclose.c stdio/fclose.c
--- stdio.orig/fclose.c 2012-03-15 18:22
ur to add to the libc close routines.
-RVP
' when hwloc is compiled
on NetBSD?
2. Does a `make check' of hwloc on NetBSD pass?
-RVP
never defined [233]
Add `-z' for those.
I also usually add `-nu' because /usr/libdata/llib-lc.ln is MIA
in 9.1_STABLE.
-RVP
On Thu, 14 Jan 2021, nia wrote:
On Thu, Jan 14, 2021 at 09:43:44PM +, RVP wrote:
Is this OK (or, it is hopelessly insecure)?:
If you have the same secure randomness as everyone else you don't have
secure randomness.
True, generally, but I was thinking of a) the hopeless cases, b
k out random bits from a truely random
file.
The random file is generated anew each time an distrib. image is built.
If one needs 256 bits to seed /dev/random, then a 32K random file should
suffice.
The other alternative is the user mashing the keyboard and moving a mouse
for a few minutes.
-RVP
On Wed, 23 Dec 2020, Martin Husemann wrote:
On Wed, Dec 23, 2020 at 06:56:31AM +, RVP wrote:
/usr/sbin/wsmoused has been non-working since slightly
before 9.1 was released. Specifically, any button click
or release generates:
Can you narrow down the pullup that broke it?
I was mis
-current?
Yes.
-RVP
On Wed, 23 Dec 2020, Michael van Elst wrote:
If you had multiple wsdisplay* instances, there would be some
corresponding ttyE* that you could send the ioctl to.
Hmm: wsdisplay0 at intelfb0; wsdisplay1 at nouveaufb0 ?
What about multiple multiple monitors connected to
the same card?
-RVP
/wsmoused.c 2020-10-21 06:17:38.666544347 +
@@ -71,7 +71,7 @@
static int X_Console = -1;
static int X_Console_Delay = 5;
-#ifdef WSMOUSED_SELECTION_MODE
+#ifdef WSMOUSED_ACTION_MODE
extern struct mode_bootstrap Action_Mode;
#endif
#ifdef WSMOUSED_SELECTION_MODE
---END---
Thanks,
-RVP
randr unavailable.
-RVP
nually typing set -o emacs each time, but
that is...less than satisfactory.
Use "su -l" and add that emacs option to /root/.shrc
-RVP
70 matches
Mail list logo