Ingo thank you for the instructions. In fact in did not test, just review the patch, sorry for the misunderstanding.
By the way, eventually I would like to use the SIM card in my Let's Note laptop (qualcomm snapdragon chip) in order to use LTE, so maybe I will write some patch myself some day! (I will post about this when I have more time) Kawashima 2019/01/13 20:27、Ingo Schwarze <[email protected]>のメール: > Hello Kawashima-san, > > kawashima_james wrote on Sun, Jan 13, 2019 at 01:43:42PM +0900: > >> indeed hyphens were OK, my programs are actually using underscores. >> Patch seems fine to me, thank you very much. > > Thank you very much for reporting and testing! > > I committed the patch and also updated the documentation, see below. > >> (I do not know how to submit patches so let me let competent people >> do it to not waste time) > > It is perfectly understood that many people are very short on time, > and reporting issues in such a clear way is appreciated even without > included patches. > > Then again, in case you ever *want* to learn submitting patches, > it will no longer be hard for you. It appears you are already able > to do the hardest part: testing patches. Once you know that, the > rest is no longer difficult: > > $ cd # to the source directory in question > $ cvs up -dP > $ vi # the file in question as needed > $ ... # compile and test thoroughly > $ cvs up -dP # again > $ cvs diff -Nup > tmp.patch > > and then include the patch verbatim into the mail body, for example > with the vi(1) :r command, *not* pasting it with a mouse. > > Yours, > Ingo > > > CVSROOT: /cvs > Module name: src > Changes by: [email protected] 2019/01/13 03:42:51 > > Modified files: > usr.sbin/syslogd: syslogd.c > > Log message: > When parsing log lines in order to select syslog.conf(5) line blocks, support > program names containing period ('.') and underscore ('_') ASCII characters. > Missing feature reported by and patch tested by > Kawashima underscore James at yahoo dot co dot jp. > "Makes sense." deraadt@ > >>> Index: syslogd.c >>> =================================================================== >>> RCS file: /cvs/src/usr.sbin/syslogd/syslogd.c,v >>> retrieving revision 1.257 >>> diff -u -p -r1.257 syslogd.c >>> --- syslogd.c 29 Nov 2018 21:10:51 -0000 1.257 >>> +++ syslogd.c 12 Jan 2019 17:35:14 -0000 >>> @@ -1796,7 +1796,8 @@ logline(int pri, int flags, char *from, >>> msglen--; >>> } >>> for (i = 0; i < NAME_MAX; i++) { >>> - if (!isalnum((unsigned char)msg[i]) && msg[i] != '-') >>> + if (!isalnum((unsigned char)msg[i]) && >>> + msg[i] != '-' && msg[i] != '.' && msg[i] != '_') >>> break; >>> prog[i] = msg[i]; >>> } > > > CVSROOT: /cvs > Module name: src > Changes by: [email protected] 2019/01/13 04:07:47 > > Modified files: > usr.sbin/syslogd: syslog.conf.5 > > Log message: > document how program names are extracted from log lines > in order to select syslog.conf(5) line blocks > > Index: syslog.conf.5 > =================================================================== > RCS file: /cvs/src/usr.sbin/syslogd/syslog.conf.5,v > retrieving revision 1.38 > diff -u -r1.38 syslog.conf.5 > --- syslog.conf.5 23 Jul 2018 19:02:49 -0000 1.38 > +++ syslog.conf.5 13 Jan 2019 11:03:33 -0000 > @@ -158,6 +158,15 @@ > the action specified in the > .Em action > field will be taken. > +In this context, > +.Xr ascii 7 > +letters, digits, hyphens > +.Pq Sq - , > +periods > +.Pq Sq \&. , > +and underscores > +.Pq Sq _ > +can be contained in a word; other bytes end the word. > .Pp > Multiple > .Em selectors
