Re: utrace(2)
On Tue, Jul 12, 2011 at 05:52:09PM +0200, Otto Moerbeek wrote: Hi, The diff below implements utrace(2), a syscall to introduce data into a ktrace stream from a userland program. The interface is taken from netbsd, freebsd also has a utrace(2) syscall, but lacks the label argument. You could uise this as a debugging aid, to get tarce information intermixed with sysclal info, or set more specific tracepoint and only see the utrace records. Do we want this? If so, this should be reviewed and tested. And a man page for utrace(2) should be written. Output of utrace(It is I, some data, 10) looks like: 24413 a.outCALL utrace(0x500a09,0x5009ff,0xa) 24413 a.outUSER It is I: 10 bytes some data\0 24413 a.outRET utrace 0 new diff, with comments incorporated and a manpage. Since the utrace(2) syscall always exists now, I've put it in sys_generic.c. Is that a right place? -0tto Index: lib/libc/sys/Makefile.inc === RCS file: /cvs/src/lib/libc/sys/Makefile.inc,v retrieving revision 1.92 diff -u -p -r1.92 Makefile.inc --- lib/libc/sys/Makefile.inc 3 Jul 2010 04:44:51 - 1.92 +++ lib/libc/sys/Makefile.inc 18 Jul 2011 09:28:15 - @@ -64,7 +64,7 @@ ASM= accept.o access.o acct.o adjfreq.o setuid.o shmat.o shmctl.o shmdt.o shmget.o shutdown.o sigaction.o \ sigaltstack.o socket.o socketpair.o stat.o statfs.o swapctl.o \ symlink.o sync.o sysarch.o umask.o unlink.o unmount.o \ - utimes.o wait4.o write.o writev.o nnpfspioctl.o __semctl.o \ + utimes.o utrace.o wait4.o write.o writev.o nnpfspioctl.o __semctl.o \ __syscall.o __sysctl.o __getcwd.o sched_yield.o getthrid.o \ thrsleep.o thrwakeup.o threxit.o thrsigdivert.o \ setrtable.o getrtable.o @@ -233,7 +233,7 @@ MAN+= accept.2 access.2 acct.2 adjfreq.2 shutdown.2 sigaction.2 sigaltstack.2 sigpending.2 sigprocmask.2 \ sigreturn.2 sigstack.2 sigsuspend.2 socket.2 socketpair.2 stat.2 \ statfs.2 swapctl.2 symlink.2 sync.2 sysarch.2 syscall.2 truncate.2 \ - umask.2 unlink.2 utimes.2 vfork.2 wait.2 write.2 + umask.2 unlink.2 utimes.2 utrace.2 vfork.2 wait.2 write.2 MAN+= msgctl.2 shmctl.2 shmat.2 semop.2 semget.2 semctl.2 msgsnd.2 msgrcv.2 \ msgget.2 shmget.2 Index: lib/libc/sys/ktrace.2 === RCS file: /cvs/src/lib/libc/sys/ktrace.2,v retrieving revision 1.20 diff -u -p -r1.20 ktrace.2 --- lib/libc/sys/ktrace.2 8 Jul 2011 19:30:32 - 1.20 +++ lib/libc/sys/ktrace.2 18 Jul 2011 09:28:15 - @@ -94,6 +94,8 @@ generate much output). .It Dv KTRFAC_EMUL Trace emulation changes. .It Dv KTRFAC_CSW Trace context switch points. .It Dv KTRFAC_STRUCT Trace various structs +.It Dv KTRFAC_USER Trace user data coming from +.Xr utrace 2 .It Dv KTRFAC_INHERIT Inherit tracing to future children. .El .Pp @@ -174,7 +176,8 @@ No process can be found corresponding to .El .Sh SEE ALSO .Xr kdump 1 , -.Xr ktrace 1 +.Xr ktrace 1 , +.Xr utrace 2 .Sh HISTORY A .Fn ktrace Index: lib/libc/sys/utrace.2 === RCS file: lib/libc/sys/utrace.2 diff -N lib/libc/sys/utrace.2 --- /dev/null 1 Jan 1970 00:00:00 - +++ lib/libc/sys/utrace.2 18 Jul 2011 09:28:15 - @@ -0,0 +1,93 @@ +.\$OpenBSD: utrace.2,v 1.13 2008/05/02 18:38:32 martin Exp $ +.\$NetBSD: utrace.2,v 1.13 2008/05/02 18:38:32 martin Exp $ +.\ +.\ Copyright (c) 2000 The NetBSD Foundation, Inc. +.\ All rights reserved. +.\ +.\ This code is derived from software contributed to The NetBSD Foundation +.\ by Gregory McGarry g.mcga...@ieee.org. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
Re: update to lynx2-8-7rel.2
I had a couple of queries about how to apply this patch. It's generated from a cvsgit mirror so I could check all the local patches more easily, so you need to: # cd /usr/src patch -p1 -E patchfile -anil On 18 Jul 2011, at 01:11, Anil Madhavapeddy wrote: Prodded by krw, here's an update to the latest Lynx release. It's quite a big patch (the configure script regen, mainly): http://www.recoil.org/~avsm/openbsd-lynx2-8-7.rel2-1.diff Most of our local patches have been merged upstream, so the kept ones are: - restore local lynx.cfg settings [avsm] - fix makefile races [espie] - read/write result checking fixes to avoid unsigned comparisons vs -1 [krw] - initialize all the InputFieldData members correctly [fgsch] - fix socklen_t test to include sys/types.h [miod] - fgets(3) returns NULL on error, not 0. No functional change [cloder] The patches that aren't needed any more are: - Use appropriate wait(2) macros to test for editor failure [ray] - fix off-by-one in page display [pirofti] - Fix the SSL error:host(blah)!=cert(*.blah)-Continue? (y) [fgsch] - reapply from mainline lynx, fix lost after local update [pirofti] - allow to compile lynx with debug symbols [fgcsh] - add support for iso8859-13 [martynas] - Add check for mkdtemp(3) failure [ray] - make lynx(1) to use arc4random(4) instead of other random functions [robert] - use fprintf correctly [cloder] I've only tested on amd64-current so far. Other architecture reports would be good... Anil
Re: grep \words\
If we start adding this to some tools, it would start to make sense to support it at the source. Namely, conversion functions are a bit annoying, and it's always possible to fuck it up. Plus, same code twice = same bugs. Is there anything preventing us from adding non-standard flags to regcomp(3) and do it directly there ?
Re: vnode(9) man page
On Mon, Jul 18, 2011 at 07:11:54AM +0059, Jason McIntyre wrote: On Sun, Jul 17, 2011 at 03:25:29PM +, Thordur Bjornsson wrote: The commit comment indicates to me that the underlying mechanism changed significantly, so now I wonder if the information that once was in vnode_if.src (regarding vnode locking disciplines) is irrelevant, obsolete or if it needs to be updated and moved to somewhere more appropriate? The diff below just removes the reference to the file which may not be the right thing to do. The locking discipline in that file is subtly wrong in some places, overtly wrong in others. I'm reworking it actually, and I hope to have a man page for it at some point. For now, the best bet if you are messing with this is to check to see what UFS/FFS does, as it as the best chance of being the most correct. can we have the short term fix for now then, so at least the man page is not wrong? Err, yes. I intended to commit the diff from Benny last night. It's in now. Commited.
Cheap and Nice Multi Product Business
Dear Sir/Madam, Hope you will find our email hearty and healthy. We are group of companies located in Sialkot, Pakistan our company name is RareStone Industries this is textile section and I'm Bilal Akbar. We are making various products according to demand and custom. In our section we are producing textile wears sports wears like polo shirts, t-shirts, track suits, rain suits etc you can also let us know about your custom product and I hope that we can supply you the same thing in ranged prices. So I shall look for your custom designs. Here are some of our catloges which could help you to understand our product range Masonic Regalia http://www.box.net/shared/29a0x549u9voye4qb0zl Cycling Gloves http://www.box.net/shared/rcfgz3os05dy4nvgqyvn Rain Suits and Dog's Rain Jackets http://www.box.net/shared/e4gblslupzq1m92a1vb0 Basket Ball And Sports Wears http://www.box.net/shared/xvhyfntg1l8t09oz3y3n Martial Arts Mix http://www.box.net/shared/lkv4xjbpsan5cd9ql322 Fashion Wear and Sports http://www.box.net/shared/x2jckvrtr03zn8pin9tr Waiting for Reply ASAP Bilal Akbar Bhatti Mohallah Shujhan Abbad, Sialkot Cell # +923348145044 Skype bilal12pk Reply Email: bi...@rarestone-ind.com www.rarestone-ind.com
Re: rdate no longer syncs on boot
No thanks. I talked with a few people like this, and people who want to use rdate should be using it as rdate -n probably, and in that case, they should use ntpd -s instead. rdate is not a daemon. The new rc.d system does not make use of the rdate_flags variable in rc.conf. Something like this could go in /etc/rc.d/rdate: #!/bin/sh # daemon=/usr/sbin/rdate . /etc/rc.d/rc.subr rc_check=NO rc_reload=NO rc_restart=NO rc_stop=NO rc_cmd $1 And then the following applied to /etc/rc: Index: rc === RCS file: /cvs/src/etc/rc,v retrieving revision 1.385 diff -u -r1.385 rc --- rc11 Jul 2011 17:20:09 - 1.385 +++ rc18 Jul 2011 07:09:33 - @@ -415,7 +415,7 @@ make_keys echo -n 'starting early daemons:' -start_daemon syslogd ldattach pflogd named nsd ntpd isakmpd iked sasyncd +start_daemon syslogd ldattach pflogd named nsd rdate ntpd isakmpd iked sasyncd echo '.' if [ X${ipsec} != XNO ]; then
user(8) man page sync and userinfo -v clean up
userinfo -v was removed from userinfo.8 and usage() a couple of years ago. Remove it from user.8 as well as the code. Sync synopsis of user add -D ... with useradd.8 I've also noticed a couple of cases where things are visible in the local man pages but not in the online ones - to my untrained eye it appears to be related to the Li macro. 1) useradd(8) is showing -r low.. instead of -r low..high (Ok in user.8) 2) =uid is being dropped in the synopsis for the -g options --- user.c.old Mon Jul 18 20:50:26 2011 +++ user.c Mon Jul 18 21:01:02 2011 @@ -2210,13 +2210,10 @@ int i; exists = 0; - while ((i = getopt(argc, argv, ev)) != -1) { + while ((i = getopt(argc, argv, e)) != -1) { switch(i) { case 'e': exists = 1; - break; - case 'v': - verbose = 1; break; default: usermgmt_usage(userinfo); --- user.8.old Mon Jul 18 20:50:21 2011 +++ user.8 Mon Jul 18 21:27:42 2011 @@ -46,8 +46,10 @@ .Op Fl e Ar expiry-time .Op Fl f Ar inactive-time .Op Fl g Ar gid | name | Li =uid +.Op Fl k Ar skel-directory .Op Fl L Ar login-class .Op Fl r Ar low..high +.Op Fl s Ar shell .Ek .Nm user .Bk -words @@ -78,7 +80,7 @@ .Ar user .Nm user .Cm info -.Op Fl ev +.Op Fl e .Ar user .Nm user .Bk -words
Re: grep \words\
On Mon, Jul 18, 2011, Marc Espie wrote: If we start adding this to some tools, it would start to make sense to support it at the source. Namely, conversion functions are a bit annoying, and it's always possible to fuck it up. Plus, same code twice = same bugs. Is there anything preventing us from adding non-standard flags to regcomp(3) and do it directly there ? Yeah, see the later email, it's actually less code to add it to regcomp.
Re: user(8) man page sync and userinfo -v clean up
Hi Glen, Glen Anderson wrote on Mon, Jul 18, 2011 at 10:10:23PM +0100: userinfo -v was removed from userinfo.8 and usage() a couple of years ago. Yes, we did that because the -v option has no effect for userinfo(8) and people might be confused what it does when it is documented. Remove it from user.8 That makes sense, indeed. as well as the code. But this is a bad idea. It might break scripts for no good reason. Basically, you are redirecting userinfo -v to usage(). Sync synopsis of user add -D ... with useradd.8 That makes sense, too. For code patches, please use cvs diff -up, and not just cvs diff -u. Besides, your patch was mangled and didn't apply. You replaced tabs by spaces; please don't do that. I've also noticed a couple of cases where things are visible in the local man pages but not in the online ones - to my untrained eye it appears to be related to the Li macro. 1) useradd(8) is showing -r low.. instead of -r low..high (Ok in user.8) 2) =uid is being dropped in the synopsis for the -g options Hm, i fear nobody will want to dive into man.cgi debugging. I'd have a brief look, but i don't have access, neither to the source code of man.cgi nor to the installed manuals it is using. While looking at the code, i noticed a few more bugs and style nits: - The -G args lack [,group,...] at a few places. - [,group,...] should not be part of .Ar. - The .. in low..high should not be part of .Ar. - Drop the useless .Li from .. Any OKs for the patch in the following form? Ingo Index: user.8 === RCS file: /cvs/src/usr.sbin/user/user.8,v retrieving revision 1.19 diff -u -p -r1.19 user.8 --- user.8 16 Apr 2011 07:26:12 - 1.19 +++ user.8 18 Jul 2011 22:36:50 - @@ -46,8 +46,10 @@ .Op Fl e Ar expiry-time .Op Fl f Ar inactive-time .Op Fl g Ar gid | name | Li =uid +.Op Fl k Ar skel-directory .Op Fl L Ar login-class -.Op Fl r Ar low..high +.Op Fl r Ar low Ns .. Ns Ar high +.Op Fl s Ar shell .Ek .Nm user .Bk -words @@ -58,12 +60,12 @@ .Op Fl d Ar home-directory .Op Fl e Ar expiry-time .Op Fl f Ar inactive-time -.Op Fl G Ar secondary-group +.Op Fl G Ar secondary-group Ns Op , Ns Ar group , Ns ... .Op Fl g Ar gid | name | Li =uid .Op Fl k Ar skel-directory .Op Fl L Ar login-class .Op Fl p Ar password -.Op Fl r Ar low..high +.Op Fl r Ar low Ns .. Ns Ar high .Op Fl s Ar shell .Op Fl u Ar uid .Ar user @@ -78,7 +80,7 @@ .Ar user .Nm user .Cm info -.Op Fl ev +.Op Fl e .Ar user .Nm user .Bk -words @@ -88,7 +90,7 @@ .Op Fl d Ar home-directory .Op Fl e Ar expiry-time .Op Fl f Ar inactive-time -.Op Fl G Ar secondary-group +.Op Fl G Ar secondary-group Ns Op , Ns Ar group , Ns ... .Op Fl g Ar gid | name | Li =uid .Op Fl L Ar login-class .Op Fl l Ar new-login Index: useradd.8 === RCS file: /cvs/src/usr.sbin/user/useradd.8,v retrieving revision 1.29 diff -u -p -r1.29 useradd.8 --- useradd.8 17 Apr 2011 20:32:33 - 1.29 +++ useradd.8 18 Jul 2011 22:36:50 - @@ -47,7 +47,7 @@ .Op Fl g Ar gid | name | Li =uid .Op Fl k Ar skel-directory .Op Fl L Ar login-class -.Op Fl r Ar low Ns Li .. Ns Ar high +.Op Fl r Ar low Ns .. Ns Ar high .Op Fl s Ar shell .Ek .Nm useradd @@ -58,12 +58,12 @@ .Op Fl d Ar home-directory .Op Fl e Ar expiry-time .Op Fl f Ar inactive-time -.Op Fl G Ar secondary-group[,group,...] +.Op Fl G Ar secondary-group Ns Op , Ns Ar group , Ns ... .Op Fl g Ar gid | name | Li =uid .Op Fl k Ar skel-directory .Op Fl L Ar login-class .Op Fl p Ar password -.Op Fl r Ar low Ns Li .. Ns Ar high +.Op Fl r Ar low Ns .. Ns Ar high .Op Fl s Ar shell .Op Fl u Ar uid .Ar user @@ -145,7 +145,7 @@ See .Xr login.conf 5 for more information on user login classes. .It Xo -.Fl r Ar low Ns Li .. Ns Ar high +.Fl r Ar low Ns .. Ns Ar high .Xc Sets the low and high bounds of UID ranges for new users. A new user can only be created if there are UIDs which can be assigned @@ -189,7 +189,7 @@ Sets the time at which the current passw Also see the .Fl e option above. -.It Fl G Ar secondary-group[,group,...] +.It Fl G Ar secondary-group Ns Op , Ns Ar group , Ns ... Sets the secondary groups to which the user will be added in the .Pa /etc/group file. Index: usermod.8 === RCS file: /cvs/src/usr.sbin/user/usermod.8,v retrieving revision 1.25 diff -u -p -r1.25 usermod.8 --- usermod.8 8 Apr 2011 18:13:54 - 1.25 +++ usermod.8 18 Jul 2011 22:36:50 - @@ -45,7 +45,7 @@ .Op Fl d Ar home-directory .Op Fl e Ar expiry-time .Op Fl f Ar inactive-time -.Op Fl G Ar secondary-group[,group,...] +.Op Fl G Ar secondary-group Ns Op , Ns Ar group , Ns ... .Op Fl g Ar gid | name | Li =uid .Op Fl L Ar login-class .Op Fl l Ar new-login @@ -100,7 +100,7 @@ Sets the time at which the password expi See the .Fl e option. -.It Fl G Ar
Relax 2^28-1 (128G) installboot restriction
Having a hard limit to ensure that OpenBSD will be able to boot on i386 and amd64 has smoked out at least some people who were successfully booting past that limit. So back off the error to a warning for now. ok? (Only compile tested on amd64 so far) Ken Index: amd64/stand/installboot/installboot.c === RCS file: /cvs/src/sys/arch/amd64/stand/installboot/installboot.c,v retrieving revision 1.22 diff -u -p -r1.22 installboot.c --- amd64/stand/installboot/installboot.c 5 Jul 2011 18:34:10 - 1.22 +++ amd64/stand/installboot/installboot.c 18 Jul 2011 22:35:26 - @@ -243,12 +243,12 @@ write_bootblocks(int devfd, struct diskl errx(1, no OpenBSD partition); } - if (start + (protosize / dl-d_secsize) BOOTBIOS_MAXSEC) - errx(1, invalid location: all of /boot must be sector %u., - BOOTBIOS_MAXSEC); - if (verbose) fprintf(stderr, /boot will be written at sector %u\n, start); + + if (start + (protosize / dl-d_secsize) BOOTBIOS_MAXSEC) + warnx(/boot extends beyond sector %u. OpenBSD may not boot., + BOOTBIOS_MAXSEC); if (!nowrite) { if (lseek(devfd, (off_t)start * dl-d_secsize, SEEK_SET) 0) Index: amd64/stand/libsa/biosdev.c === RCS file: /cvs/src/sys/arch/amd64/stand/libsa/biosdev.c,v retrieving revision 1.15 diff -u -p -r1.15 biosdev.c --- amd64/stand/libsa/biosdev.c 17 Mar 2011 12:53:44 - 1.15 +++ amd64/stand/libsa/biosdev.c 18 Jul 2011 22:35:26 - @@ -216,10 +216,6 @@ EDD_rw(int rw, int dev, u_int32_t daddr, int rv; volatile static struct EDD_CB cb; - /* Some (most?) BIOSen get confused by i/o above 2 ^ 28 - 1 sector. */ - if ((daddr + nblk) BOOTBIOS_MAXSEC) - return (1); /* Invalid function/parameter. */ - /* Zero out reserved stuff */ cb.edd_res1 = 0; cb.edd_res2 = 0; Index: i386/stand/installboot/installboot.c === RCS file: /cvs/src/sys/arch/i386/stand/installboot/installboot.c,v retrieving revision 1.65 diff -u -p -r1.65 installboot.c --- i386/stand/installboot/installboot.c5 Jul 2011 18:34:10 - 1.65 +++ i386/stand/installboot/installboot.c18 Jul 2011 22:35:26 - @@ -239,12 +239,12 @@ write_bootblocks(int devfd, struct diskl errx(1, no OpenBSD partition); } - if (start + (protosize / dl-d_secsize) BOOTBIOS_MAXSEC) - errx(1, invalid location: all of /boot must be sector %u., - BOOTBIOS_MAXSEC); - if (verbose) fprintf(stderr, /boot will be written at sector %u\n, start); + + if (start + (protosize / dl-d_secsize) BOOTBIOS_MAXSEC) + warnx(/boot extends beyond sector %u. OpenBSD may not boot., + BOOTBIOS_MAXSEC); if (!nowrite) { if (lseek(devfd, (off_t)start * dl-d_secsize, SEEK_SET) 0) Index: i386/stand/libsa/biosdev.c === RCS file: /cvs/src/sys/arch/i386/stand/libsa/biosdev.c,v retrieving revision 1.83 diff -u -p -r1.83 biosdev.c --- i386/stand/libsa/biosdev.c 17 Mar 2011 12:53:44 - 1.83 +++ i386/stand/libsa/biosdev.c 18 Jul 2011 22:35:26 - @@ -217,10 +217,6 @@ EDD_rw(int rw, int dev, u_int32_t daddr, int rv; volatile static struct EDD_CB cb; - /* Some (most?) BIOSen get confused by i/o above 2 ^ 28 - 1 sector. */ - if ((daddr + nblk) BOOTBIOS_MAXSEC) - return (1); /* Invalid function/parameter. */ - /* Zero out reserved stuff */ cb.edd_res1 = 0; cb.edd_res2 = 0;
mg dired diff to reduce annoyance
Hi, kjell@ suggested a different approach. Instead of using hacks in basic.c, I've added wrappers in dired itself. Rather than overwriting existing keys (C-v and M-v), I think that using C-w and C-T is better for now. As usual, I welcome feedback. Index: src/usr.bin/mg/dired.c === RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.48 diff -u -p -r1.48 dired.c --- src/usr.bin/mg/dired.c 23 Jan 2011 00:45:03 - 1.48 +++ src/usr.bin/mg/dired.c 18 Jul 2011 22:47:43 - @@ -36,6 +36,8 @@ static int d_rename(int, int); static int d_shell_command(int, int); static int d_create_directory(int, int); static int d_makename(struct line *, char *, size_t); +static int d_forwpage(int, int); +static int d_backpage(int, int); static void reaper(int); extern struct keymap_s helpmap, cXmap, metamap; @@ -63,10 +65,10 @@ static PF diredcl[] = { rescan, /* ^Q */ backisearch,/* ^R */ forwisearch,/* ^S */ - rescan, /* ^T */ + d_backpage, /* ^T */ universal_argument, /* ^U */ forwpage, /* ^V */ - rescan, /* ^W */ + d_forwpage, /* ^W */ NULL/* ^X */ }; @@ -590,6 +592,26 @@ d_makename(struct line *lp, char *fn, si if (strlcat(fn, p, len) = len) return (FALSE); return ((lgetc(lp, 2) == 'd') ? TRUE : FALSE); +} + +static int +d_forwpage(int f, int n) +{ + forwpage(f | FFRAND, n); + if ((strrchr(curwp-w_dotp-l_text, ' ')) != NULL) + curwp-w_doto = strrchr(curwp-w_dotp-l_text, ' ') - + curwp-w_dotp-l_text + 1; + return TRUE; +} + +static int +d_backpage(int f, int n) +{ + backpage(f | FFRAND, n); + if ((strrchr(curwp-w_dotp-l_text, ' ')) != NULL) + curwp-w_doto = strrchr(curwp-w_dotp-l_text, ' ') - + curwp-w_dotp-l_text + 1; + return TRUE; } /*
Re: daily security email appears double-spaced
On Mon, Jul 18, 2011 at 12:32:02AM -0700, Daniel C. Sinclair wrote: The day after installing the latest snapshot I got the usual /usr/libexec/security email - but it appeared to be double spaced for the setuid/device changes sections. It is actually just trailing spaces on each line, which made them wrap on an 80 column terminal. This gets rid of them (and reduces the initial email by over 7KB): yay! Sorry about that, my fault, probably should have noticed. Someone more willing to muck with perl may want to fix the 'adjust_columns' routine where the spaces get injected. I think this should actually fix adjust_columns. l8rZ, -- andrew - http://afresh1.com I think I understand, but my stubborn brain refuses to admit it until I beat it into submission by proof upon proof. -- Michael Shiloh michaelshiloh1...@gmail.com Index: security === RCS file: /cvs/src/libexec/security/security,v retrieving revision 1.15 diff -N -u -p -u security --- security20 Jun 2011 21:53:53 - 1.15 +++ security19 Jul 2011 01:10:57 - @@ -594,6 +594,7 @@ sub adjust_columns { if (!$s[$_] || length $row-[$_] $s[$_]); } } + $s[-1] = ''; my $fmt = join ' ', map %-${_}s, @s; return map { sprintf $fmt, @$_ } @table;
Re: rdate no longer syncs on boot
On Mon, Jul 18, 2011 at 9:11 AM, Theo de Raadt dera...@cvs.openbsd.org wrote: No thanks. I talked with a few people like this, and people who want to use rdate should be using it as rdate -n probably, and in that case, they should use ntpd -s instead. I find rdate_flags useful on my work laptop - I usually boot at my desk while connected to the network where our internal ntp servers are. It syncs, and then I take the laptop out to other locations/networks where ntp is not accessible. Running ntpd isn't useful then and I would have to kill it after it set the time. I could run rdate manually after boot but the clock jumps. How do other people keep correct time on their laptops when access to ntp servers is intermittent? rdate is not a daemon. Yeah, at first I didn't want to special-case it in /etc/rc and using an rc.d script allowed it to nicely fit in at the right time during boot. How about this instead: Index: rc === RCS file: /cvs/src/etc/rc,v retrieving revision 1.385 diff -u -r1.385 rc --- rc 11 Jul 2011 17:20:09 - 1.385 +++ rc 19 Jul 2011 00:53:49 - @@ -415,7 +415,14 @@ make_keys echo -n 'starting early daemons:' -start_daemon syslogd ldattach pflogd named nsd ntpd isakmpd iked sasyncd +start_daemon syslogd ldattach pflogd named nsd + +# run rdate before ntpd +if [ X${rdate_flags} != XNO ]; then +echo -n ' rdate'; rdate -s ${rdate_flags} +fi + +start_daemon ntpd isakmpd iked sasyncd echo '.' if [ X${ipsec} != XNO ]; then I think it is a useful feature and like you said there are others that think the same. I'd hate to see it go. Daniel
Re: rdate no longer syncs on boot
No thanks. I talked with a few people like this, and people who want to use rdate should be using it as rdate -n probably, and in that case, they should use ntpd -s instead. I find rdate_flags useful on my work laptop - I usually boot at my desk while connected to the network where our internal ntp servers are. It syncs, and then I take the laptop out to other locations/networks where ntp is not accessible. There is ntp everywhere. Use: server myownmachine.mynetwork.xx servers pool.ntp.org Running ntpd isn't useful then and I would have to kill it after it set the time. I could run rdate manually after boot but the clock jumps. That is why you should not run rdate. How do other people keep correct time on their laptops when access to ntp servers is intermittent? Using the example above. From inside my network, I cannot talk to pool.ntp.org. From outside my network, I cannot talk to myownmachine.mynetwork.xx. But one of them works fine, in all cases. ntpd will cope with hosts coming and going. It will even do DNS lookups to find new hosts, when it has to. It can make better decisions about time than you can. Yeah, at first I didn't want to special-case it in /etc/rc and using an rc.d script allowed it to nicely fit in at the right time during boot. How about this instead: The diff you supplied is exactly what I deleted previously. No. ntpd or ntpd -s are good for you; rdate without -n is really bad for you, and rdate with -n is almost as bad.
Re: grep \words\
please don't even think of adding something without documenting it. :( really, don't do that. lacking documentation can really mess one up. but i'm fine with the idea of actually adding this syntax support. 2011/7/17 Ted Unangst t...@tedunangst.com On Sun, Jul 17, 2011, Jason McIntyre wrote: On Sun, Jul 17, 2011 at 11:43:03AM -0400, Ted Unangst wrote: I recently learned that our grep does not support the \\ syntax for word boundaries, only the somewhat more difficult to use [[::]] format. It's fairly easy to convert one to the other however. if you do this, we will need to think carefully about how to document it. grep(1) itself does not discuss REs, and instead points to re_format(7). but you are proposing an extension to grep only. can i ask why you want to support this? it is a gnu grep thing or something? It is supported (and documented) by GNU grep. I'm not proposing documenting it per se, it's simply something that will work if you use it, but the documented regex format remains the supported way. There is at least one port (libpqxx) that expects this syntax to work and doesn't check that it doesn't. It just runs the command. I suspect other such scripts exist.
Re: rdate no longer syncs on boot
On Mon, Jul 18, 2011 at 6:31 PM, Theo de Raadt dera...@cvs.openbsd.org wrote: There is ntp everywhere. Use: server myownmachine.mynetwork.xx servers pool.ntp.org I often plug this laptop in to unknown stuff (or mirror/span ports or ethernet taps) and run tcpdump so I don't want to run any daemons that generate traffic. It's a little netbook and I use it for network troubleshooting only - it isn't a normal laptop setup. My main laptop does run ntpd all the time though. I guess I will just use ntpd from now on and manually stop it if needed. Of course, with ntpd_flags=-s in my rc.conf.local I won't be able to start it again without jumping the clock. What do you think of making -s the default in /etc/rc.d/ntpd so it always syncs during boot but not any subsequent manual starts/restarts? Then one would just use ntpd_flags= in rc.conf.local (or -S to disable the auto sync if desired). If ntpd crashed on a server the only way to safely start it again would be to reboot (or run ntpd directly but that negates the whole point of rc.d). Running ntpd isn't useful then and I would have to kill it after it set the time. I could run rdate manually after boot but the clock jumps. That is why you should not run rdate. ntpd -s does exactly the same thing. Clock jumps are fine during boot. The diff you supplied is exactly what I deleted previously. No. Since rdate_flags was left in rc.conf, I thought the removal may have been an oversight. Daniel
Nuevo Portal Inmobiliario
[IMAGE] [IMAGE] [IMAGE] Si le ha llegado por error o desea desuscribirse por favor presione este link