Re: [patch] security(8) and spamd blacklist

2017-06-29 Thread Fritjof Bornebusch
On Thu, Jun 29, 2017 at 10:06:56PM +0100, Stuart Henderson wrote: > On 2017/06/29 21:37, Fritjof Bornebusch wrote: > > Hi, > > > > security(8) iterates over /var/mail and check is the files belong to the > > owner of the same name. So far so good, but spamd.con

[patch] security(8) and spamd blacklist

2017-06-29 Thread Fritjof Bornebusch
Hi, security(8) iterates over /var/mail and check is the files belong to the owner of the same name. So far so good, but spamd.conf.5 says: override:\ :white:\ :method=file:\ :file=/var/mail/override.txt: myblack:\ :black:\

ftpd(8) bin folder

2016-04-10 Thread fritjof
I tried to find out how the ~/ftp/bin folder is used? But after implementing ls(1) by Art internally: - http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/libexec/ftpd/popen.c#rev1.10 it looks like the bin folder becomes some kind of obsolete: - the function that executes a certain program is:

[patch] ftpd: unused include

2016-04-06 Thread fritjof
Looks like monitor.h doesn't need to be included in monitor_fdpass.c. Mentioned by att...@stalphonsos.com. --f. Index: monitor_fdpass.c === RCS file: /cvs/src/libexec/ftpd/monitor_fdpass.c,v retrieving revision 1.7 diff -u -r1.7

[patch] ftpd: ptr == NULL

2016-04-05 Thread fritjof
Hi, cmd is a ptr. --f. Index: ftpd.c === RCS file: /cvs/src/libexec/ftpd/ftpd.c,v retrieving revision 1.213 diff -u -r1.213 ftpd.c --- ftpd.c 16 Mar 2016 15:41:10 - 1.213 +++ ftpd.c 5 Apr 2016 18:12:20 - @@

Re: [patch] ftpd: pledge(2)

2016-04-03 Thread fritjof
On Sun, Apr 03, 2016 at 06:51:47PM +0200, Theo Buehler wrote: > > > + if (pledge("stdio rpath getpw proc wpath cpath > > > inet ioctl sendfd recvfd", > > > +NULL) == -1) { > > > + fatalx("pledge"); > > > +

Re: [patch] ftpd: pledge(2)

2016-04-03 Thread fritjof
On Sun, Apr 03, 2016 at 06:51:47PM +0200, Theo Buehler wrote: > > > + if (pledge("stdio rpath getpw proc wpath cpath > > > inet ioctl sendfd recvfd", > > > +NULL) == -1) { > > > + fatalx("pledge"); > > > +

Re: [patch] ftpd: pledge(2)

2016-04-03 Thread fritjof
On Sun, Apr 03, 2016 at 07:07:27PM +0200, frit...@alokat.org wrote: > - sendfd / recvfd are for active ftp > - ioctl is e.g. used for "ls" after ftp(1) established a connection > I'm not exactly sure why, as there is no ioctl(2) call, but maybe > in one underlaying library. > - proc for fork

Re: [patch] ftpd: pledge(2)

2016-04-03 Thread fritjof
On Sun, Apr 03, 2016 at 06:51:47PM +0200, Theo Buehler wrote: > > > + if (pledge("stdio rpath getpw proc wpath cpath > > > inet ioctl sendfd recvfd", > > > +NULL) == -1) { > > > + fatalx("pledge"); > > > +

Re: [patch] ftpd: pledge(2)

2016-04-03 Thread fritjof
On Sun, Apr 03, 2016 at 06:28:21PM +0200, Sebastien Marie wrote: > On Sun, Apr 03, 2016 at 06:09:21PM +0200, frit...@alokat.org wrote: > > On Sat, Apr 02, 2016 at 04:38:10PM +0200, frit...@alokat.org wrote: > > > Hi, > > > > > > this adds pledge(2) to ftpd(8). > > > > > > --f. > > > > > > >

Re: [patch] ftpd: pledge(2)

2016-04-03 Thread fritjof
On Sat, Apr 02, 2016 at 04:38:10PM +0200, frit...@alokat.org wrote: > Hi, > > this adds pledge(2) to ftpd(8). > > --f. > With help from semarie@ the original diff was changed a little bit. The following processes are pledged: - [priv post-auth] - User-privileged slave - Unprivileged slave As

[patch] ftpd: no pid_t to long cast

2016-04-02 Thread fritjof
Is it really necessary to cast pid_t values to long, only for printing? --f. Index: ftpd.c === RCS file: /cvs/src/libexec/ftpd/ftpd.c,v retrieving revision 1.213 diff -u -r1.213 ftpd.c --- ftpd.c 16 Mar 2016 15:41:10 -

[patch] ftpd: UINT_MAX -> UID_MAX

2016-04-02 Thread fritjof
Maybe it's better to use UID_MAX instead of UINT_MAX to indicate the max value is the max possible user id and not the max possible unsigned int value, even if they are the same at the end of the day. --f. Index: ftpd.c === RCS

[patch] ftpd: pledge(2)

2016-04-02 Thread fritjof
Hi, this adds pledge(2) to ftpd(8). Unfortunately, the main process and its children "[priv pre-auth]" need a lot of rights. The unprivileged process is better to pledge, as it does not need that much rights. But, I try to find other strategic points where pledge(2) could take place. Maybe it's

Re: [patch] login_yubikey: delete keys

2016-03-31 Thread fritjof
On Thu, Mar 31, 2016 at 10:17:45PM +0200, Sebastian Benoit wrote: > Hi Fritjof, > > frit...@alokat.org(frit...@alokat.org) on 2016.03.31 11:43:58 +0200: > > Wipe out the key from "user.key". > > > > --f. > > > The while loop above has return(AUTH_

[patch] login_yubikey: delete keys

2016-03-31 Thread fritjof
Wipe out the key from "user.key". --f. Index: login_yubikey.c === RCS file: /cvs/src/libexec/login_yubikey/login_yubikey.c,v retrieving revision 1.10 diff -u -p -u -r1.10 login_yubikey.c --- login_yubikey.c 16 Jan 2015 06:39:50

[patch] ftpd: close dirp

2016-03-29 Thread fritjof
The "dirp" pointer is not closed if goto inside the while loop is called. This diff: - closes the dirp object - moves the jump mark "out" a bit higher to clean the file pointer as well as the descriptor if the goto statement is called, and reset global variables The "send_file_list" function

Re: [patch] ps: atol(3) -> strtonum(3)

2016-03-08 Thread fritjof
On Tue, Mar 08, 2016 at 01:31:47PM -0700, Todd C. Miller wrote: > On Tue, 08 Mar 2016 09:32:25 -0700, Theo de Raadt wrote: > > > atol maps to strtol. Which can accept hex or octal. > > atol() maps to strtol(str, (char **)NULL, 10) so this is a good > place to use strtonum(). The max value

[patch] ps: atol(3) -> strtonum(3)

2016-03-08 Thread fritjof
--F. Index: ps.c === RCS file: /cvs/src/bin/ps/ps.c,v retrieving revision 1.63 diff -u -r1.63 ps.c --- ps.c16 Jan 2015 06:39:32 - 1.63 +++ ps.c8 Mar 2016 14:15:34 - @@ -99,6 +99,7 @@ int all, ch,

[patch] telnet: stored value never read

2016-03-06 Thread fritjof
Hi tech@, the value stored in "old" is never read. --F. Index: sys_bsd.c === RCS file: /cvs/src/usr.bin/telnet/sys_bsd.c,v retrieving revision 1.31 diff -u -r1.31 sys_bsd.c --- sys_bsd.c 29 Nov 2015 14:18:40 - 1.31 +++

memory leak in libc

2015-12-25 Thread fritjof
Hi tech@, it looks like there is a memory leak in libc. In file "src/lib/libc/stdio/makebuf.c" line 62 malloc(3) is called, but never freed, when printf(3) is called. --F. $ valgrind --leak-check=full --show-leak-kinds=all /usr/sbin/apm ==29572== Memcheck, a memory error detector ==29572==

[patch] basename(1) tweaks

2015-12-24 Thread fritjof
Hi tech@, here are some basename(1) tweaks: - remove (void) cast for puts(3) and fprintf(3) - activate stack protector - put includes in correct order --F. Index: basename.c === RCS file: /cvs/src/usr.bin/basename/basename.c,v

[patch] uname(1) tweaks

2015-12-24 Thread fritjof
Hi tech@, here are some tweaks about uname(1): - change the parameter order to the same order as in the manpage - change err(1, NULL) to errx(1, "uname") - change statements like: if (condition) statement if (condition) statement - activate the stack protector --F. Index: uname.c

Re: [patch] return instead of exit(3) in src/bin/

2015-11-08 Thread Fritjof Bornebusch
On Mon, Aug 31, 2015 at 10:59:36PM +0200, Fritjof Bornebusch wrote: Ping > On Sun, Aug 30, 2015 at 08:01:02PM +0200, Fritjof Bornebusch wrote: > > As suggested by deraadt@ and tobias@ it might be better to use the *return* > > statement instead of exit(3) > > insid

Re: [patch]rcs: usage functions above the main ones

2015-11-08 Thread Fritjof Bornebusch
On Mon, Jun 15, 2015 at 11:42:10AM +0100, Nicholas Marriott wrote: Ping ... > > this seems fine to me > > > On Sun, Jun 14, 2015 at 10:38:40PM +0200, Fritjof Bornebusch wrote: > > Hi tech@, > > > > most of the tools implements the *usage* function above th

[frit...@alokat.org: Re: [patch] lpr atoi -> strtonum]

2015-11-08 Thread Fritjof Bornebusch
- Forwarded message from Fritjof Bornebusch <frit...@alokat.org> - Date: Sat, 26 Sep 2015 22:00:58 +0200 From: Fritjof Bornebusch <frit...@alokat.org> To: Michael Reed <m.r...@mykolab.com> Cc: tech@openbsd.org Subject: Re: [patch] lpr atoi -> strtonum On Fri, Sep 2

Re: [patch]rcs: mark unlink as (void)

2015-11-08 Thread Fritjof Bornebusch
On Mon, Jun 15, 2015 at 09:56:18PM +0200, Fritjof Bornebusch wrote: Ping ... > Hi tech@, > > mark this unlink(2) call as *(void)*, as there is no need to check the return > value. > This makes it more consistent to all other unlink(2) calls, since they are > marked as

Re: [patch]apmd ? sign

2015-11-08 Thread Fritjof Bornebusch
On Wed, May 20, 2015 at 05:08:21PM +0200, Fritjof Bornebusch wrote: Ping > > Index: apmd.c > === > RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v > retrieving revision 1.75 > diff -u -p -r1.75 apmd.c > --- ap

Re: [patch]diff: uninitialized values

2015-11-08 Thread Fritjof Bornebusch
On Wed, Jun 17, 2015 at 09:19:28PM +0200, Fritjof Bornebusch wrote: > On Wed, Jun 17, 2015 at 08:53:57PM +0200, Fritjof Bornebusch wrote: > > Hi tech@, > > > > *edp1* and *edp2* could be used uninitialized, if *goto closem;* is called. > > > > Such initialize

Re: [patch] lpr atoi -> strtonum

2015-09-26 Thread Fritjof Bornebusch
On Fri, Sep 25, 2015 at 02:23:21PM -0400, Michael Reed wrote: > Hi Fritjof, > Hi Michael, > I left one comment inline. > thanks. > On 09/25/15 08:18, Fritjof Bornebusch wrote: > > Hi, > > > > change atoi(3) -> strtonum(3) in lpr(1) and lprm(1).

[patch] lpr style

2015-09-25 Thread Fritjof Bornebusch
Hi, this diff changes the following: - exit(3) to return at the end of main functions - use /* NOTREACHED */ were it belongs according to style(9) - lpc.c and lpd.c lack a return at the end of the main functions, as the main loops exists the program. I'm not sure if this is a "coders choise"

[patch] lpr atoi -> strtonum

2015-09-25 Thread Fritjof Bornebusch
Hi, change atoi(3) -> strtonum(3) in lpr(1) and lprm(1). lprm(1) avoids negative numbers to be the first argument by using getopt(3), but supported values like 2.2. --F. Index: lpr/lpr.c === RCS file:

Re: [patch]diff: uninitialized values

2015-09-18 Thread Fritjof Bornebusch
On Wed, Jun 17, 2015 at 09:19:28PM +0200, Fritjof Bornebusch wrote: > On Wed, Jun 17, 2015 at 08:53:57PM +0200, Fritjof Bornebusch wrote: > > Hi tech@, > > > > *edp1* and *edp2* could be used uninitialized, if *goto closem;* is called. > > > > Such initialize

Re: [patch]rcs: mark unlink as (void)

2015-09-18 Thread Fritjof Bornebusch
On Mon, Jun 15, 2015 at 09:56:18PM +0200, Fritjof Bornebusch wrote: > Hi tech@, > > mark this unlink(2) call as *(void)*, as there is no need to check the return > value. > This makes it more consistent to all other unlink(2) calls, since they are > marked as *(void)* as &g

Re: [patch]rcs: usage functions above the main ones

2015-09-18 Thread Fritjof Bornebusch
On Mon, Jun 15, 2015 at 11:42:10AM +0100, Nicholas Marriott wrote: > > this seems fine to me > Ping ... > > On Sun, Jun 14, 2015 at 10:38:40PM +0200, Fritjof Bornebusch wrote: > > Hi tech@, > > > > most of the tools implements the *usage* function above th

Re: [patch] return instead of exit(3) in src/bin/

2015-09-17 Thread Fritjof Bornebusch
On Mon, Aug 31, 2015 at 10:59:36PM +0200, Fritjof Bornebusch wrote: > On Sun, Aug 30, 2015 at 08:01:02PM +0200, Fritjof Bornebusch wrote: > > As suggested by deraadt@ and tobias@ it might be better to use the *return* > > statement instead of exit(3) > > inside the *m

Re: [patch] return instead of exit(3) in src/bin/

2015-08-31 Thread Fritjof Bornebusch
On Sun, Aug 30, 2015 at 08:01:02PM +0200, Fritjof Bornebusch wrote: > As suggested by deraadt@ and tobias@ it might be better to use the *return* > statement instead of exit(3) > inside the *main* function, to let the stack protector do its work. > > This diff removes such calls

Re: [patch]rcs: mark unlink as (void)

2015-06-23 Thread Fritjof Bornebusch
On Mon, Jun 15, 2015 at 09:56:18PM +0200, Fritjof Bornebusch wrote: Ping Hi tech@, mark this unlink(2) call as *(void)*, as there is no need to check the return value. This makes it more consistent to all other unlink(2) calls, since they are marked as *(void)* as well. Regards

Re: [patch]rcs: usage functions above the main ones

2015-06-23 Thread Fritjof Bornebusch
On Mon, Jun 15, 2015 at 11:42:10AM +0100, Nicholas Marriott wrote: this seems fine to me Ping On Sun, Jun 14, 2015 at 10:38:40PM +0200, Fritjof Bornebusch wrote: Hi tech@, most of the tools implements the *usage* function above the *main* function. This patch makes it more

Re: [patch]rcs: rlog manpage typo

2015-06-18 Thread Fritjof Bornebusch
On Thu, Jun 18, 2015 at 10:49:32PM +0200, Pablo Méndez Hernández wrote: Hi, El 18/6/2015 22:46, Fritjof Bornebusch frit...@alokat.org escribiA^3: Hi tech@, *logins is omitted* sounds a little strange, doesn't it? logins as a keyword? Yes, but if you read

[patch]rcs: merge typo

2015-06-18 Thread Fritjof Bornebusch
What about this comma. I saw a few manpages, having it at this location. Regards, --F. Index: merge.1 === RCS file: /cvs/src/usr.bin/rcs/merge.1,v retrieving revision 1.3 diff -u -p -r1.3 merge.1 --- merge.1 28 Oct 2010

Re: [patch]rcs: ci manpage typo

2015-06-18 Thread Fritjof Bornebusch
On Thu, Jun 18, 2015 at 09:48:23PM +0100, Jason McIntyre wrote: On Thu, Jun 18, 2015 at 10:33:53PM +0200, Fritjof Bornebusch wrote: Hi tech@, isn't there a comma missing? depends how you like your commas. if i were writing it, i'd have the comma. but many wouldn;t, and it's

[patch]rcs: ci manpage typo

2015-06-18 Thread Fritjof Bornebusch
Hi tech@, isn't there a comma missing? Regards, --F. Index: ci.1 === RCS file: /cvs/src/usr.bin/rcs/ci.1,v retrieving revision 1.38 diff -u -p -r1.38 ci.1 --- ci.112 Aug 2013 14:19:53 - 1.38 +++ ci.118 Jun

[patch]rcs: rlog manpage typo

2015-06-18 Thread Fritjof Bornebusch
Hi tech@, *logins is omitted* sounds a little strange, doesn't it? Regards, --F. Index: rlog.1 === RCS file: /cvs/src/usr.bin/rcs/rlog.1,v retrieving revision 1.24 diff -u -p -r1.24 rlog.1 --- rlog.1 3 Sep 2010 11:09:29 -

Re: [patch]rcs: rlog manpage typo

2015-06-18 Thread Fritjof Bornebusch
On Thu, Jun 18, 2015 at 09:57:13PM +0100, Jason McIntyre wrote: On Thu, Jun 18, 2015 at 10:44:07PM +0200, Fritjof Bornebusch wrote: Hi tech@, *logins is omitted* sounds a little strange, doesn't it? it does, because in your head you're thinking of logins as being the plural of login

[patch]diff: xstrdup wrappes strdup(3)

2015-06-17 Thread Fritjof Bornebusch
Hi tech@, as requested by nicm@, xstrdup calls strdup(3) now. Regards, --F. Index: xmalloc.c === RCS file: /cvs/src/usr.bin/diff/xmalloc.c,v retrieving revision 1.6 diff -u -p -r1.6 xmalloc.c --- xmalloc.c 29 Apr 2015 04:00:25

[patch]diff: uninitialized values

2015-06-17 Thread Fritjof Bornebusch
Hi tech@, *edp1* and *edp2* could be used uninitialized, if *goto closem;* is called. Regards, --F. Index: diffdir.c === RCS file: /cvs/src/usr.bin/diff/diffdir.c,v retrieving revision 1.43 diff -u -p -r1.43 diffdir.c ---

Re: [patch]diff: uninitialized values

2015-06-17 Thread Fritjof Bornebusch
On Wed, Jun 17, 2015 at 08:53:57PM +0200, Fritjof Bornebusch wrote: Hi tech@, *edp1* and *edp2* could be used uninitialized, if *goto closem;* is called. Such initializers hiding a false positive, cause the compiler does not understand this case can never happen. - warning: 'edp1' may

[patch]file: xstrdup just wrappes strdup(3)

2015-06-17 Thread Fritjof Bornebusch
Hi tech@, as requested by nicm@, xstrdup calls strdup(3) now. Regards, --F. Index: xmalloc.c === RCS file: /cvs/src/usr.bin/file/xmalloc.c,v retrieving revision 1.1 diff -u -p -r1.1 xmalloc.c --- xmalloc.c 24 Apr 2015 16:24:11

[patch]ssh: xstrdup wrappes strdup(3)

2015-06-17 Thread Fritjof Bornebusch
Hi tech@, as requested by nicm@, xstrdup just wrappes strdup(3). Regards, --F. Index: xmalloc.c === RCS file: /cvs/src/usr.bin/ssh/xmalloc.c,v retrieving revision 1.32 diff -u -p -r1.32 xmalloc.c --- xmalloc.c 24 Apr 2015

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-17 Thread Fritjof Bornebusch
who should answer that question. ;) Regards, --F. On Mon, Jun 15, 2015 at 10:00:01AM +0200, Fritjof Bornebusch wrote: Hi, thanks for the hint. This one should do the trick. Index: xmalloc.c === RCS file

[patch]rcs: no null check before free(3)

2015-06-17 Thread Fritjof Bornebusch
Hi tech@, just saw I missed removing the null check before calling free(3), sorry. Regards, --F. Index: ci.c === RCS file: /cvs/src/usr.bin/rcs/ci.c,v retrieving revision 1.220 diff -u -p -r1.220 ci.c --- ci.c13 Jun 2015

[patch]rcs: mark unlink as (void)

2015-06-15 Thread Fritjof Bornebusch
Hi tech@, mark this unlink(2) call as *(void)*, as there is no need to check the return value. This makes it more consistent to all other unlink(2) calls, since they are marked as *(void)* as well. Regards, --F. Index: co.c ===

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-15 Thread Fritjof Bornebusch
Hi, thanks for the hint. This one should do the trick. Index: xmalloc.c === RCS file: /cvs/src/usr.bin/rcs/xmalloc.c,v retrieving revision 1.9 diff -u -p -r1.9 xmalloc.c --- xmalloc.c 13 Jun 2015 20:15:21 - 1.9 +++

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-15 Thread Fritjof Bornebusch
On Sun, Jun 14, 2015 at 05:02:05PM -0600, Theo de Raadt wrote: But I am not sure about this change. xmalloc.c came from ssh (and is also used by file and diff). Would it be better to keep it in sync? How portable is strdup? strdup is extremely portable. The last mainstream operating

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-14 Thread Fritjof Bornebusch
On Wed, Jun 10, 2015 at 07:37:57PM +0200, Fritjof Bornebusch wrote: On Wed, May 20, 2015 at 10:55:34AM +0200, Fritjof Bornebusch wrote: On Tue, May 19, 2015 at 08:57:06PM +0200, Fritjof Bornebusch wrote: Hi, xstrdup just wrappes strdup, so there is no need to call xmalloc

[patch]rcs: usage functions above the main ones

2015-06-14 Thread Fritjof Bornebusch
Hi tech@, most of the tools implements the *usage* function above the *main* function. This patch makes it more consistent to these tools and where the different *usage* functions are implemented in rcs in general. Any comments? Regards, --F. Index: co.c

Re: [patch]rcs: remove xfree

2015-06-13 Thread Fritjof Bornebusch
On Sat, Jun 13, 2015 at 09:33:59AM +0100, Nicholas Marriott wrote: Hi. You missed date.y: date.y: In function 'yyerror': date.y:497: error: implicit declaration of function 'xfree' Ups, sorry. That should do the trick. On Sat, Jun 13, 2015 at 12:43:29AM +0200, Fritjof Bornebusch wrote

[patch]rcs: remove xfree

2015-06-12 Thread Fritjof Bornebusch
Hi tech@, Without PGP / SMIME stuff, sorry. a couple of months ago I removed the if condition in the *xfree* function, but tedu@ suggested that it would be better to remove the *xfree* function entirely instead. If've seen there are *efree* functions in some tools, that just wrappes

[patch]rcs: remove xfree

2015-06-12 Thread Fritjof Bornebusch
Hi tech@, a couple of months ago I removed the if condition in the *xfree* function, but tedu@ suggested that it would be better to remove the *xfree* function entirely instead. If've seen there are *efree* functions in some tools, that just wrappes the free(3) function call. I'm not quite

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-10 Thread Fritjof Bornebusch
On Wed, May 20, 2015 at 10:55:34AM +0200, Fritjof Bornebusch wrote: On Tue, May 19, 2015 at 08:57:06PM +0200, Fritjof Bornebusch wrote: Hi, xstrdup just wrappes strdup, so there is no need to call xmalloc and strlcpy instead. Ping Use err() instead of errx(), so errno

Re: [patch]rcs: xstrdup just wrappes strdup

2015-05-20 Thread Fritjof Bornebusch
On Tue, May 19, 2015 at 08:57:06PM +0200, Fritjof Bornebusch wrote: Hi, xstrdup just wrappes strdup, so there is no need to call xmalloc and strlcpy instead. Use err() instead of errx(), so errno will be printed additionally. Thanks to Tim. Regards, --F. Regards, --F. Index

Re: [patch]apmd ? sign

2015-05-20 Thread Fritjof Bornebusch
On Wed, May 20, 2015 at 09:35:03PM +0200, Alexander Hall wrote: On May 20, 2015 5:08:21 PM GMT+02:00, Fritjof Bornebusch frit...@alokat.org wrote: Hi, for what is the ? sign for? fallthrough to usage() But why is this necessary, haven't seen this in other deamons? BTW: isn't

[patch]apmd ? sign

2015-05-20 Thread Fritjof Bornebusch
Hi, for what is the ? sign for? Regards, --F. Index: apmd.c === RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v retrieving revision 1.75 diff -u -p -r1.75 apmd.c --- apmd.c 6 Feb 2015 08:16:50 - 1.75 +++ apmd.c 20

[patch]rcs: xstrdup just wrappes strdup

2015-05-19 Thread Fritjof Bornebusch
Hi, xstrdup just wrappes strdup, so there is no need to call xmalloc and strlcpy instead. Regards, --F. Index: xmalloc.c === RCS file: /cvs/src/usr.bin/rcs/xmalloc.c,v retrieving revision 1.8 diff -u -p -r1.8 xmalloc.c ---

Re: [patch]sudo: punctuation fixes

2015-02-25 Thread Fritjof Bornebusch
On Wed, Dec 24, 2014 at 01:48:44PM +0100, Fritjof Bornebusch wrote: Ping .. Hi tech@, looks like there are some missing periods regarding the sudo wrong password messages. fritjof Index: ins_csops.h === RCS file: /cvs

[patch] siphash static functions

2015-01-16 Thread Fritjof Bornebusch
Hi tech@, aren't these functions supposed to be static? fritjof Index: siphash.c === RCS file: /cvs/src/sys/crypto/siphash.c,v retrieving revision 1.1 diff -u -p -r1.1 siphash.c --- siphash.c 4 Nov 2014 03:01:14 - 1.1

[patch] remove atoi(3) from keynote

2015-01-16 Thread Fritjof Bornebusch
Hi tech@, this diff removes the atoi(3) call from keynote(1). fritjof Index: keynote-keygen.c === RCS file: /cvs/src/lib/libkeynote/keynote-keygen.c,v retrieving revision 1.21 diff -u -p -r1.21 keynote-keygen.c --- keynote

[patch]sudo: punctuation fixes

2014-12-24 Thread Fritjof Bornebusch
Hi tech@, looks like there are some missing periods regarding the sudo wrong password messages. fritjof Index: ins_csops.h === RCS file: /cvs/src/usr.bin/sudo/ins_csops.h,v retrieving revision 1.5 diff -u -p -r1.5 ins_csops.h

[patch]rcs: correct error message after renaming realloc

2014-12-01 Thread Fritjof Bornebusch
fritjof Index: xmalloc.c === RCS file: /cvs/src/usr.bin/rcs/xmalloc.c,v retrieving revision 1.6 diff -u -p -r1.6 xmalloc.c --- xmalloc.c 1 Dec 2014 21:58:46 - 1.6 +++ xmalloc.c 1 Dec 2014 23:59:50 - @@ -60,7 +60,7

[patch]rcs: comment typo

2014-11-29 Thread Fritjof Bornebusch
Hi tech, it's NULL not NUL. fritjof Index: diff3.c === RCS file: /cvs/src/usr.bin/rcs/diff3.c,v retrieving revision 1.33 diff -u -p -r1.33 diff3.c --- diff3.c 4 Mar 2012 04:05:15 - 1.33 +++ diff3.c 29 Nov 2014 13

Re: [patch]rcs: comment typo

2014-11-29 Thread Fritjof Bornebusch
On Sat, Nov 29, 2014 at 05:27:00AM -0800, Claus Assmann wrote: On Sat, Nov 29, 2014, Fritjof Bornebusch wrote: it's NULL not NUL. Not in this case... NULL: is a pointer (usually 0) NUL: is a character ('\0') Ahh I see, thank you. pgpMkIwf4S_cz.pgp Description: PGP signature

Re: [patch]rcs: comment typo

2014-11-29 Thread Fritjof Bornebusch
On Sat, Nov 29, 2014 at 04:53:28PM +0100, Otto Moerbeek wrote: On Sat, Nov 29, 2014 at 02:22:25PM +0100, Fritjof Bornebusch wrote: Hi tech, it's NULL not NUL. You're touching a big controversy here. Many developers say that NUL is the right term when rferring to chars

Re: [Patch]rcs: use rcsnum_cmp

2014-11-28 Thread Fritjof Bornebusch
On Fri, Nov 28, 2014 at 04:14:50PM +0100, Otto Moerbeek wrote: On Sun, Nov 23, 2014 at 05:19:16PM +0100, Fritjof Bornebusch wrote: Hi tech, like the XXX comment says, rcsnum_cmp() can be used instead of a *for* loop. The following shows the original behavior: $ co -r1.2 foo.txt,v

[Patch]rcs: use rcsnum_cmp

2014-11-23 Thread Fritjof Bornebusch
. fritjof Index: co.c === RCS file: /cvs/src/usr.bin/rcs/co.c,v retrieving revision 1.119 diff -u -p -r1.119 co.c --- co.c10 Oct 2014 08:15:25 - 1.119 +++ co.c23 Nov 2014 15:40:30 - @@ -265,18 +265,14

[PATCH]rcs: write usage function pointer always the same way

2014-11-20 Thread Fritjof Bornebusch
Hi tech, I think it's more readable if the usage() function pointer will always be written the same way. fritjof Index: rlog.c === RCS file: /cvs/src/usr.bin/rcs/rlog.c,v retrieving revision 1.69 diff -u -p -r1.69 rlog.c

[patch]rcs: memcmp against 0

2014-10-13 Thread Fritjof Bornebusch
Hi, it's better to compare memcmp against 0, for clarity. fritjof Index: diff3.c === RCS file: /cvs/src/usr.bin/rcs/diff3.c,v retrieving revision 1.33 diff -u -p -r1.33 diff3.c --- diff3.c 4 Mar 2012 04:05:15 - 1.33

Re: [patch]lock and unlock like GnuRCS

2014-10-07 Thread Fritjof Bornebusch
On Tue, Oct 07, 2014 at 03:10:44AM -0400, Daniel Dickman wrote: Fritjof, have you let the gnu rcs project know about the segfault? Maybe see how they choose to fix things and then follow their lead? No, I have not. I hope they follow the tech@ mailing list. :) On Mon, Oct 6, 2014 at 10:47

Re: [patch]lock and unlock like GnuRCS

2014-10-07 Thread Fritjof Bornebusch
On Tue, Oct 07, 2014 at 09:34:33AM +0200, Otto Moerbeek wrote: On Tue, Oct 07, 2014 at 03:10:44AM -0400, Daniel Dickman wrote: Fritjof, have you let the gnu rcs project know about the segfault? Maybe see how they choose to fix things and then follow their lead? That will only slow things

Re: [patch]lock and unlock like GnuRCS

2014-10-07 Thread Fritjof Bornebusch
On Tue, Oct 07, 2014 at 03:11:28PM +0200, Otto Moerbeek wrote: On Tue, Oct 07, 2014 at 02:56:07PM +0200, Fritjof Bornebusch wrote: On Tue, Oct 07, 2014 at 09:34:33AM +0200, Otto Moerbeek wrote: On Tue, Oct 07, 2014 at 03:10:44AM -0400, Daniel Dickman wrote: Fritjof, have you let

Re: [Patch] use exit() directly in usage()

2014-10-01 Thread Fritjof Bornebusch
On Sat, Sep 27, 2014 at 07:10:01PM +0200, Fritjof Bornebusch wrote: Hi, Hi, after usage() was called, there is no where you can go. as suggested by otto@ and @nicm, the usage() functions are marked as __dead. fritjof fritjof Index: ci.c

Re: [Patch] use exit() directly in usage()

2014-10-01 Thread Fritjof Bornebusch
On Wed, Oct 01, 2014 at 06:41:25PM +0100, Nicholas Marriott wrote: Looks good but you have missed out ident.c and rcsprog.c Ups, sorry. On Wed, Oct 01, 2014 at 11:19:29AM +0200, Fritjof Bornebusch wrote: On Sat, Sep 27, 2014 at 07:10:01PM +0200, Fritjof Bornebusch wrote: Hi, Hi

[patch]lock and unlock like GnuRCS

2014-10-01 Thread Fritjof Bornebusch
:), but GnuRCS does not lock and unlock a file by using the same command like OpenRCS. I think the different implementations of RCS should share the same behaviour: $ rcs -l1.1 -u1.1 foo.txt RCS file: foo.txt,v 1.1 locked done $ rcs -u1.1 -l1.1 foo.txt RCS file: foo.txt,v 1.1 unlocked done fritjof Index

[Patch] avoid typecast

2014-09-27 Thread Fritjof Bornebusch
Hi, there is no need for the typecast. fritjof Index: xmalloc.c === RCS file: /cvs/src/usr.bin/rcs/xmalloc.c,v retrieving revision 1.4 diff -u -p -r1.4 xmalloc.c --- xmalloc.c 7 Jun 2009 08:39:13 - 1.4 +++ xmalloc.c

Re: [Patch]openrcs: atoi to strtonum

2014-09-26 Thread Fritjof Bornebusch
On Wed, Sep 24, 2014 at 10:31:17PM +0200, Otto Moerbeek wrote: Hi, On Wed, Sep 24, 2014 at 05:13:47PM +0200, Fritjof Bornebusch wrote: Hi, I changed atoi to strtonum in order to avoid overflows. One concern: atoi() does not mind trailing stuff, while strtonum() does. Did you verify

[Patch]openrcs: atoi to strtonum

2014-09-24 Thread Fritjof Bornebusch
Hi, I changed atoi to strtonum in order to avoid overflows. fritjof Index: rcstime.c === RCS file: /cvs/src/usr.bin/rcs/rcstime.c,v retrieving revision 1.4 diff -u -p -r1.4 rcstime.c --- rcstime.c 29 Apr 2014 07:44:19 -

Re: [PATCH] rcs: don't use lock and unlock in the same command

2014-08-16 Thread Fritjof Bornebusch
On Sun, Aug 03, 2014 at 06:00:45PM +0200, Fritjof Bornebusch wrote: Ping? Hi tech, the OpenRCS rcs command produces the following output if -l and -u is used in the same command: $ rcs -l1.1 -u1.1 foo.txt RCS file: foo.txt,v 1.1 locked 1.1 unlocked $ rcs -u1.1 -l1.1 foo.txt RCS

Re: [PATCH]unnecessary typecast in rcs xmalloc

2014-08-16 Thread Fritjof Bornebusch
On Wed, Jul 30, 2014 at 10:23:00PM +0200, Fritjof Bornebusch wrote: Ping? Hi tech, there is an unnecessary typecast in xmalloc.c of rcs. fritjof Index: xmalloc.c === RCS file: /cvs/src/usr.bin/rcs/xmalloc.c,v retrieving

Re: [PATCH]unused NULL check before calling free

2014-08-16 Thread Fritjof Bornebusch
On Sat, Aug 02, 2014 at 10:35:43PM +0200, Fritjof Bornebusch wrote: Ping? On Fri, Aug 01, 2014 at 08:03:58AM -0400, Ted Unangst wrote: Half true. :) The behavior is intended. I don't really know why they care about freeing null, but the intention is clearly to check for it; otherwise

Re: [PATCH] Better overflow handling in rcstime.c

2014-08-16 Thread Fritjof Bornebusch
On Wed, Jul 30, 2014 at 10:19:19PM +0200, Fritjof Bornebusch wrote: Ping? Hi tech, remove the atoi calls, in order to avoid overflows. fritjof Index: rcstime.c === RCS file: /cvs/src/usr.bin/rcs/rcstime.c,v retrieving

Re: [PATCH]delete xfree() from sndiod

2014-08-16 Thread Fritjof Bornebusch
On Sun, Aug 03, 2014 at 02:56:25PM +0200, Fritjof Bornebusch wrote: Ping? Hi tech, during my search after other xfree() implementations, I saw that xfree() in sndiod is just a wrapper for free() without any other conditions, like NULL check. fritjof Index: abuf.c

[PATCH]delete xfree() from sndiod

2014-08-03 Thread Fritjof Bornebusch
Hi tech, during my search after other xfree() implementations, I saw that xfree() in sndiod is just a wrapper for free() without any other conditions, like NULL check. fritjof Index: abuf.c === RCS file: /cvs/src/usr.bin/sndiod

[PATCH] rcs: don't use lock and unlock in the same command

2014-08-03 Thread Fritjof Bornebusch
unlocked done fritjof Index: rcsprog.c === RCS file: /cvs/src/usr.bin/rcs/rcsprog.c,v retrieving revision 1.151 diff -u -p -r1.151 rcsprog.c --- rcsprog.c 12 Jul 2011 21:00:32 - 1.151 +++ rcsprog.c 3 Aug 2014 15:42:34 -

Re: [PATCH]unused NULL check before calling free

2014-08-02 Thread Fritjof Bornebusch
option, though, to malloc.conf doesn't check NULL to free. It just makes malloc abort instead of returning null. I don't think it's a useful option either way. Don't use it. Based on Teds suggestion, this diff deletes xfree() entirely. fritjof Index: xmalloc.h

Re: [PATCH] Better overflow handling in rcstime.c

2014-08-02 Thread Fritjof Bornebusch
On Wed, Jul 30, 2014 at 09:26:54PM +0100, Dimitris Papastamos wrote: On Wed, Jul 30, 2014 at 10:19:19PM +0200, Fritjof Bornebusch wrote: + tzone = (int)strtonum(h, -23, 23, errstr); The explicit cast is not needed here. That's maybe true, but I don't like implicit casts

Re: [PATCH]unused NULL check before calling free

2014-07-31 Thread Fritjof Bornebusch
On Wed, Jul 30, 2014 at 07:37:29PM -0700, patrick keshishian wrote: On Wed, Jul 30, 2014 at 10:14:54PM +0200, Fritjof Bornebusch wrote: Hi tech, there is an unnecessary NULL check before calling free. fritjof Index: xmalloc.c

Re: [PATCH]unused NULL check before calling free

2014-07-31 Thread Fritjof Bornebusch
On Thu, Jul 31, 2014 at 10:32:07AM -0400, sven falempin wrote: On Thu, Jul 31, 2014 at 6:39 AM, Fritjof Bornebusch frit...@alokat.org wrote: On Wed, Jul 30, 2014 at 07:37:29PM -0700, patrick keshishian wrote: On Wed, Jul 30, 2014 at 10:14:54PM +0200, Fritjof Bornebusch wrote: Hi tech

[PATCH]unused NULL check before calling free

2014-07-30 Thread Fritjof Bornebusch
Hi tech, there is an unnecessary NULL check before calling free. fritjof Index: xmalloc.c === RCS file: /cvs/src/usr.bin/rcs/xmalloc.c,v retrieving revision 1.4 diff -u -p -r1.4 xmalloc.c --- xmalloc.c 7 Jun 2009 08:39:13 -

[PATCH] Better overflow handling in rcstime.c

2014-07-30 Thread Fritjof Bornebusch
Hi tech, remove the atoi calls, in order to avoid overflows. fritjof Index: rcstime.c === RCS file: /cvs/src/usr.bin/rcs/rcstime.c,v retrieving revision 1.4 diff -u -p -r1.4 rcstime.c --- rcstime.c 29 Apr 2014 07:44:19 -

[PATCH]unnecessary typecast in rcs xmalloc

2014-07-30 Thread Fritjof Bornebusch
Hi tech, there is an unnecessary typecast in xmalloc.c of rcs. fritjof Index: xmalloc.c === RCS file: /cvs/src/usr.bin/rcs/xmalloc.c,v retrieving revision 1.4 diff -u -p -r1.4 xmalloc.c --- xmalloc.c 7 Jun 2009 08:39:13 -

  1   2   >