Question about hardening build flags

2013-04-13 Thread Jérémie Courrèges-Anglas
According to my limited testing, ''-z relro'' doesn't seem to change the executable (''readelf -d ... | grep BIND_NOW'' yields no output), whereas ''-z now'' seems to. I'd appreciate any advice. Regards, [1] http://marc.info/?l=o

Re: Question about hardening build flags

2013-04-14 Thread Jérémie Courrèges-Anglas
Philip Guenther writes: > On Sat, Apr 13, 2013 at 8:17 AM, Jérémie Courrèges-Anglas > wrote: >> I'm trying to port mosh[1] on OpenBSD; its build system tries to enable >> several compile and build flags. Most of those seem on by default, where >> suitable, on Ope

Re: Question about hardening build flags

2013-04-14 Thread Jérémie Courrèges-Anglas
Philip Guenther writes: > On Sun, Apr 14, 2013 at 2:02 PM, Jérémie Courrèges-Anglas > wrote: >> Philip Guenther writes: > ... >>> As for -z now: yeah, it works on OpenBSD; what problem are they trying >>> to solve by using it? >> >> -z now seems

[UPDATE] Sendmail 8.14.7 released

2013-04-21 Thread Jérémie Courrèges-Anglas
.ps trimmed): http://wxcvbn.org/~jca/tmp/sendmail-8.14.7-tarball.diff Regards, -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: add nl(1)

2013-04-30 Thread Jérémie Courrèges-Anglas
Arto Jonsson writes: > Taken from netbsd with minor modifications. Comments? I think that would be nice since: - cat -n is clunky - nl is specified by posix - I know at least one port that needs a patch because we lack it [...] -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 0

accept(2) - mention ECONNABORTED in CAVEATS

2013-04-30 Thread Jérémie Courrèges-Anglas
Hi, as cvs log shows, accept(2) can error out with errno set to ECONNABORTED, and it is easy to forget that this shouldn't be a fatal error. I suggest the following diff or something similar. Index: accept.2 === RCS file: /cvs/src/l

Re: [UPDATE] Sendmail 8.14.7 released

2013-04-30 Thread Jérémie Courrèges-Anglas
Ping. -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: accept(2) - mention ECONNABORTED in CAVEATS

2013-04-30 Thread Jérémie Courrèges-Anglas
New diff with .Pp suggested by jmc (which was ok otherwise - thanks). -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 Index: accept.2 === RCS file: /cvs/src/lib/libc/sys/accept.2

Re: [UPDATE] Sendmail 8.14.7 released

2013-04-30 Thread Jérémie Courrèges-Anglas
endmail port I have sent to ports@, but an update for the in-base version. I asked gilles@ and replacing sendmail with smtpd is not planned for 5.4 (right?), but the code is the same so problem reports for the sendmail port would still be useful. -- Jérémie Courrèges-Anglas PGP Key Fingerprin

Re: accept(2) - mention ECONNABORTED in CAVEATS

2013-04-30 Thread Jérémie Courrèges-Anglas
is is an improvement. I guess you're not talking about the .Pp... if so, may I ask why? -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: accept(2) - mention ECONNABORTED in CAVEATS

2013-04-30 Thread Jérémie Courrèges-Anglas
Ted Unangst writes: > On Tue, Apr 30, 2013 at 22:11, Jérémie Courrèges-Anglas wrote: >> Mark Kettenis writes: >> >>>> From: j...@wxcvbn.org (=?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges-Anglas?=) >>>> Date: Tue, 30 Apr 2013 20:53:36 +0200 >>>>

Re: faster fast grep

2013-04-30 Thread Jérémie Courrèges-Anglas
e latter happens to become stricter. Regress passes; does it seem OK? -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 Index: util.c === RCS file: /cvs/src/usr.bin/grep/util.c,v retrieving

gdb hardware-assisted watchpoints

2013-05-05 Thread Jérémie Courrèges-Anglas
x27;s needed to implement i386 support. It *seems* that OpenBSD doesn't know about the debug registers on this architecture. Ciao, -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: gdb hardware-assisted watchpoints

2013-05-06 Thread Jérémie Courrèges-Anglas
ng with architecture-specific issues and limited functionality, but I only have a vague understanding of the mechanism. Is there an existing implementation out there? Regards, -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: add nl(1)

2013-05-10 Thread Jérémie Courrèges-Anglas
gt; + break; What about a default case here, to make WARNINGS=Yes shut up? > + } > + > + if (donumber) { > + consumed = snprintf(intbuffer, intbuffersize, format, > + width, line); > + (void)printf("%s", > + intbuffer + max(0, consumed - width)); > + line += incr; > + } else { > + (void)printf("%*s", width, ""); > + } > + (void)printf("%s%s", sep, buffer); > + > + if (ferror(stdout)) > + err(EXIT_FAILURE, "output error"); > +nextline: > + ; > + } > + > + if (ferror(stdin)) > + err(EXIT_FAILURE, "input error"); > +} > + > +/* > + * Various support functions. > + */ > + > +static void > +parse_numbering(const char *argstr, int section) > +{ > + int error; > + char errorbuf[NL_TEXTMAX]; > + > + switch (argstr[0]) { > + case 'a': > + numbering_properties[section].type = number_all; > + break; > + case 'n': > + numbering_properties[section].type = number_none; > + break; > + case 't': > + numbering_properties[section].type = number_nonempty; > + break; > + case 'p': > + /* If there was a previous expression, throw it away. */ > + if (numbering_properties[section].type == number_regex) > + regfree(&numbering_properties[section].expr); > + else > + numbering_properties[section].type = number_regex; > + > + /* Compile/validate the supplied regular expression. */ > + if ((error = regcomp(&numbering_properties[section].expr, > + &argstr[1], REG_NEWLINE|REG_NOSUB)) != 0) { > + (void)regerror(error, > + &numbering_properties[section].expr, > + errorbuf, sizeof (errorbuf)); > + errx(EXIT_FAILURE, > + "%s expr: %s -- %s", > + numbering_properties[section].name, errorbuf, > + &argstr[1]); > + } > + break; > + default: > + errx(EXIT_FAILURE, > + "illegal %s line numbering type -- %s", > + numbering_properties[section].name, argstr); > + } > +} > + > +static __dead void > +usage(void) > +{ > + extern char *__progname; > + > + (void)fprintf(stderr, "usage: %s [-p] [-b type] [-d delim] [-f type] " > + "[-h type] [-i incr] [-l num]\n\t[-n format] [-s sep] " > + "[-v startnum] [-w width] [file]\n", __progname); > + exit(EXIT_FAILURE); > +} > -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: emacs fails to build after switching to 5.3

2013-05-10 Thread Jérémie Courrèges-Anglas
is problem? I don't have a 64 bits host to repeat it. Please make it clear that the very last version of this file doesn't solve the issue. (Commit message: unexelf.c: Don't assume ElfW (Half) fits in int.) > # Han -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: add nl(1)

2013-05-15 Thread Jérémie Courrèges-Anglas
ARNINGS=Yes shut up? > > I think that would be a mistake. All the possible enum values are > already listed in the switch. Omitting a default: label allows the > compiler to warn when a new value is added to the enum that is not > handled by the switch. Indeed, I hadn't thought about this. > - todd -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

call for testing: MSI for msk(4)

2013-05-16 Thread Jérémie Courrèges-Anglas
, rev. 0 Other systems all seem to use MSI, but it would be cool if people with different chips could test it. -- Jérémie Courrèges-Anglas PGP Key Fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 Index: if_msk.c === RCS

Re: accept(2) - mention ECONNABORTED in CAVEATS

2013-05-16 Thread Jérémie Courrèges-Anglas
j...@wxcvbn.org (Jérémie Courrèges-Anglas) writes: > Ted Unangst writes: > >> On Tue, Apr 30, 2013 at 22:11, Jérémie Courrèges-Anglas wrote: >>> Mark Kettenis writes: >>> >>>>> From: j...@wxcvbn.org >>>>> (=?utf-8?Q?J=C3=A9r=C3=A9mie

Re: Somewhat important ACPI diff

2013-05-21 Thread Jérémie Courrèges-Anglas
Hi, No problem here on a samsung NC10, including suspend/resume. No dmesg change. -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 OpenBSD 5.3-current (GENERIC) #29: Tue May 21 10:48:51 CEST 2013 j...@shannon.wxcvbn.org:/usr/src/sys/arch

Re: [UPDATE] Sendmail 8.14.7 released

2013-06-09 Thread Jérémie Courrèges-Anglas
It would be really nice to have reports before this goes in (probably on wednesday). j...@wxcvbn.org (Jérémie Courrèges-Anglas) writes: > Hi, > > a new Sendmail release has been published: > > http://marc.info/?l=sendmail-announce&m=136655938302597&w=2 > >

Re: fsck vs fsck_ffs WHAT'S THE DIFFERENCE?

2013-06-18 Thread Jérémie Courrèges-Anglas
(5) file or on the command line for consistency. [...] fsck_ffs(8): [...] DESCRIPTION fsck_ffs performs interactive file system consistency checks and repairs for each file system specified. It is normally invoked from fsck(8). [...] > Thanks, Max Power. YOU'RE WELCOME! --

Re: help X11 performance: make sigprocmask(2) SY_NOLOCK

2013-06-19 Thread Jérémie Courrèges-Anglas
n 2013 13:10:19 - 1.133 > +++ kern/syscalls.master 19 Jun 2013 09:49:57 - > @@ -123,7 +123,7 @@ > const struct sigaction *nsa, \ > struct sigaction *osa); } > 47 STD { gid_t sys_getgid(void); } > -48 STD { int sys_sigprocmask(int how, sigset_t mask); } > +48 STD NOLOCK { int sys_sigprocmask(int how, sigset_t mask); } > 49 STD { int sys_getlogin(char *namebuf, u_int namelen); } > 50 STD { int sys_setlogin(const char *namebuf); } > #ifdef ACCOUNTING > -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: SSLHonorCipherOrder for OpenBSD's httpd

2013-07-07 Thread Jérémie Courrèges-Anglas
httpd (subversion) Does that mean that the code is constrained by the Apache 2.0 licence? -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: man.conf(5) _subdir search order

2013-07-13 Thread Jérémie Courrèges-Anglas
nn >> +_subdir{cat,man}1 {cat,man}8 {cat,man}6 {cat,man}2 >> {cat,man}3 {cat,man}5 {cat,man}7 {cat,man}4 {cat,man}9 {cat,man}3p >> {cat,man}3f {cat,man}n >> >> # Files typed by suffix and their commands. >> # Note the order: .Z must come after .[1-9n].Z, or it will match first. >> > -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: ldd.c - plug memleak

2013-07-14 Thread Jérémie Courrèges-Anglas
David Hill writes: > Hello - Hi, > doit() was not free()'ing memory or close()'ing the file descriptor if > realpath() failed or dlopen() returned NULL. > > This diff just moves close() and free() up once we are done using them. Makes sense. ok? > Index: ldd/ldd.c > =

Re: ldconfig/prebind.c - remove dead assignments

2013-07-14 Thread Jérémie Courrèges-Anglas
David Hill writes: > remove unused variables. Makes sense. ok? > Index: ldconfig/prebind.c > === > RCS file: /cvs/src/libexec/ld.so/ldconfig/prebind.c,v > retrieving revision 1.20 > diff -u -p -r1.20 prebind.c > --- ldconfig/prebi

awk(1) update

2013-07-14 Thread Jérémie Courrèges-Anglas
This diff updates awk to the 20121220 upstream version, with a few fixups. ok? Index: FIXES === RCS file: /cvs/src/usr.bin/awk/FIXES,v retrieving revision 1.16 diff -u -p -r1.16 FIXES --- FIXES 28 Sep 2011 19:27:18 -

Re: ldconfig/prebind.c - remove dead assignments

2013-07-14 Thread Jérémie Courrèges-Anglas
Kenneth R Westerback writes: > On Sun, Jul 14, 2013 at 09:23:53AM +0200, J??r??mie Courr??ges-Anglas wrote: >> David Hill writes: >> >> > remove unused variables. >> >> Makes sense. ok? >> [...] >> >lseek(fd, -((off_t)sizeof(struct prebind_footer)), SEEK_END); >> > - len = read(fd, &f

Re: add nl(1)

2013-07-14 Thread Jérémie Courrèges-Anglas
"Todd C. Miller" writes: > On Mon, 20 May 2013 12:43:19 +0300, Arto Jonsson wrote: > >> Updated diff. I removed the int width handling and modified the >> separator printing based on your comment. > > That looks good to me. > > - todd I propose to import it. ok? (+ a note about NetBSD and Open

Re: ldconfig/prebind.c - remove dead assignments

2013-07-14 Thread Jérémie Courrèges-Anglas
Kenneth R Westerback writes: > On Sun, Jul 14, 2013 at 03:13:32PM +0200, J??r??mie Courr??ges-Anglas wrote: >> Kenneth R Westerback writes: >> >> > On Sun, Jul 14, 2013 at 09:23:53AM +0200, J??r??mie Courr??ges-Anglas >> > wrote: >> >> David Hill writes: >> >> >> >> > remove unused variables

Re: ldconfig/prebind.c - remove dead assignments

2013-07-14 Thread Jérémie Courrèges-Anglas
Kenneth R Westerback writes: > On Sun, Jul 14, 2013 at 05:56:46PM +0200, J??r??mie Courr??ges-Anglas wrote: >> Kenneth R Westerback writes: >> >> > On Sun, Jul 14, 2013 at 03:13:32PM +0200, J??r??mie Courr??ges-Anglas >> > wrote: >> >> Kenneth R Westerback writes: >> >> >> >> > On Sun, Jul 1

Re: ldconfig/prebind.c - remove dead assignments

2013-07-14 Thread Jérémie Courrèges-Anglas
j...@wxcvbn.org (Jérémie Courrèges-Anglas) writes: [...] >>> len = read(fd, &footer, sizeof(struct prebind_footer)); >>> + if (len >= -1 && len < sizeof(struct prebind_footer)) { >> >> I think this condition is incorrect. > > It chec

Re: awk(1) update

2013-07-14 Thread Jérémie Courrèges-Anglas
ed. I've just mailed upstream, maybe there is a reason I fail to see for this change. Let's see if this leads to failures in the bulk build currently running. > GNU awk seems to treat them differently. See > > > <http://www.gnu.org/software/gawk/manual/html_node/Unexpected-Results.html#Unexpected-Results> Yup. > Cheers, > > Mark Regards, -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: add nl(1)

2013-07-16 Thread Jérémie Courrèges-Anglas
j...@wxcvbn.org (Jérémie Courrèges-Anglas) writes: > "Todd C. Miller" writes: > >> On Mon, 20 May 2013 12:43:19 +0300, Arto Jonsson wrote: >> >>> Updated diff. I removed the int width handling and modified the >>> separator printing base

Re: Fix of sysctl.c rev. 1.191 related bug and unbreak diskless(8)

2013-07-16 Thread Jérémie Courrèges-Anglas
54:38 - 1.192 > +++ sysctl.c15 Jul 2013 03:43:27 - > @@ -1200,7 +1200,7 @@ sysctl_vfsgen(char *string, char **bufpp > > mib[1] = VFS_GENERIC; > mib[2] = VFS_CONF; > - mib[3] = indx; > + mib[3] = indx + 1; > size = sizeof vfc; >

Re: ksh global PWD env variable

2013-07-21 Thread Jérémie Courrèges-Anglas
eal use case right now). But the fact is that all shells I've tested (bash, ksh93, dash) do export PWD by default (ok, not ksh88...). Do we really ant to be different from almost other shells? -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: acpi global lock diff that needs testing

2013-08-09 Thread Jérémie Courrèges-Anglas
Mark Kettenis writes: > On amd64/i386 there is this nasty thing called SMM mode. This allows > BIOS writers to run code behind the back of the OS to do all sorts of > crazy stuff like simulating a legacy PC keyboard controller on systems > that don't have one, or spin up the fan in your laptop w

Re: test diff: unmap needs flags

2012-04-18 Thread Jérémie Courrèges-Anglas
Hi. It has survived a system build and daily use so far. kern.version=OpenBSD 5.1-current (GENERIC) #0: Mon Apr 16 02:24:16 CEST 2012 j...@moo.wxcvbn.org:/usr/src/sys/arch/i386/compile/GENERIC

Re: cwm tiling

2012-06-08 Thread Jérémie Courrèges-Anglas
Antoine Jacoutot writes: > I for one would love cwm to have tiling management. > I don't care avout the alternative, they are not in base. Same here. -- Jérémie Courrèges-Anglas GPG fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

tmux and login shells

2012-06-20 Thread Jérémie Courrèges-Anglas
GS=Yes), but since the format string it trivial, I thought it wasn't such a big problem. Please don't hesitate to bash me if I've missed something important. :P Regards. -- Jérémie Courrèges-Anglas GPG fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 (Replaces la

Re: tmux and login shells

2012-06-21 Thread Jérémie Courrèges-Anglas
nce you that we need an option to *disable* spawning login shells, but that not spawning login shells should be the default. Users that *want* tmux to spawn login shells can already use the -l switch or set tmux as their login shell, my diff does take care of not clobbering this feature, I think. Regards. -- Jérémie Courrèges-Anglas GPG fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

Re: tmux and login shells

2012-06-21 Thread Jérémie Courrèges-Anglas
Nicholas Marriott writes: > On Thu, Jun 21, 2012 at 10:21:08AM +0200, Jérémie Courrèges-Anglas wrote: >> Nicholas Marriott writes: >> >> > I think it is correct and better to spawn login shells by default, these >> > are not child shells of some shell process,

Re: tinyscheme + mg

2012-06-28 Thread Jérémie Courrèges-Anglas
gt; +retval = sc->F; > + } > + } > + } > + else { > + retval = sc -> F; > + } > + > + return(retval); > +} > + > +static void make_filename(const char *name, char *filename) { > + (void)strlcpy(filename,name,sizeof(filename)); > + (void)strlcat(filename,SUFFIX,sizeof(filename)); This looks wrong. > +} > + > +static void make_init_fn(const char *name, char *init_fn) { > + const char *p=strrchr(name,'/'); > + if(p==0) { > + p=name; > + } else { > + p++; > + } > + (void)strlcpy(init_fn,"init_",sizeof(init_fn)); > + (void)strlcat(init_fn,p,sizeof(init_fn)); Same here. > +} > + > + > +/* > +Local variables: > +c-file-style: "k&r" > +End: > +*/ [...] -- Jérémie Courrèges-Anglas GPG fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494

<    1   2   3