Re: [hackers] [slock] Unify how we check passwords between different OSes

2016-09-06 Thread FRIGN
On Tue, 6 Sep 2016 20:52:05 +0200 Quentin Rameau wrote: > I second this patch. As a side-note, this patch is necessary and gives the ground work for a patch by me that drops privileges after the getpw function. Previously on OpenBSD, slock would _never_ drop privileges, which is not a very sane

Re: [hackers] [ii] use pledge by default if compiled on openbsc and provide errno string || Nico Golde

2016-09-06 Thread Ali H. Fardan
eprint() is not declared in ii, be careful. Raiz diff --git a/ii.c b/ii.c index a32326d..51318aa 100644 --- a/ii.c +++ b/ii.c @@ -493,7 +493,7 @@ int main(int argc, char *argv[]) { #ifdef __OpenBSD__ /* OpenBSD pledge(2) support */ if (pledge("stdio rpath wpath cpat

Re: [hackers] [ii] add OpenBSD pledge support - thanks Gleydson Soares || Nico Golde

2016-09-06 Thread Nico Golde
Hi, * Ali H. Fardan [2016-09-04 20:40]: > Sorry, I can't quote your last message because I accidently deleted > it. anyways, as far as I know __OpenBSD__ is either defined by the compiler > (in openbsd) or the openbsd libc, so if the code being compiled under > openbsd __OpenBSD__ will be defined.

[hackers] [ii] use pledge by default if compiled on openbsc and provide errno string || Nico Golde

2016-09-06 Thread git
commit 584290f2642eeacbe1b24e7174e49139d6787252 Author: Nico Golde AuthorDate: Tue Sep 6 19:58:28 2016 +0200 Commit: Nico Golde CommitDate: Tue Sep 6 19:58:28 2016 +0200 use pledge by default if compiled on openbsc and provide errno string diff --git a/config.mk b/config.mk index 2c

Re: [hackers] [quark] Use sizeof() instead of magic constants || FRIGN

2016-09-06 Thread Evan Gates
On Mon, Sep 5, 2016 at 12:41 AM, FRIGN wrote: > but this only happens if you typedef your structs, which I think is bad > practice. > If you do a > #typedef struct hw homework > this is your own fault. Using > sizeof(struct hw) > shows clearly it's a type, whereas > sizeof(

Re: [hackers] [quark] Use sizeof() instead of magic constants || FRIGN

2016-09-06 Thread Evan Gates
On Sun, Sep 4, 2016 at 11:35 PM, Anselm R Garbe wrote: > See http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf 6.5.3 > for unary operator specification of the C language. 6.5.3 shows (the relevant parts) unary-expression: postfix-expression sizeof unary-expression siz

Re: [hackers] [quark] Use sizeof() instead of magic constants || FRIGN

2016-09-06 Thread Quentin Rameau
> I think using goto loops sometimes is good, depend on the use case. Obviously > For example in spt.c: > > run: > notify_send(timers[i].cmt); > > for (timecount = 0; timecount < timers[i].tmr; timecount += > inc) sleep(1); > > if (++i >= LEN(timers)) i = 0; /* i infinal

Re: [hackers] [quark] Use sizeof() instead of magic constants || FRIGN

2016-09-06 Thread Pickfire
On Mon, Sep 05, 2016 at 09:55:49AM +0200, Anselm R Garbe wrote: On 5 September 2016 at 09:52, FRIGN wrote: On Mon, 5 Sep 2016 09:48:34 +0200 Anselm R Garbe wrote: Using typedefs destroys this beautiful hierarchy. Beware! There have been zealots arguing that using goto is a bad practice for s