Loganaden Velvindron | 1 Aug 2011 08:11
Picon
Favicon

Re: Need testers for mg dired diff

This is what you're talking about. C-n & C-p
warp the dot on the filename. I've overwritten
the default forwline() and backline() functions.

I like this.

If others don't find it annoying, we can go forward.

I'll look at another issue that Mark brought up
when I'll be done with work.

Index: dired.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/dired.c,v
retrieving revision 1.48
diff -u -p -r1.48 dired.c
--- dired.c	23 Jan 2011 00:45:03 -0000	1.48
+++ dired.c	1 Aug 2011 06:04:01 -0000
 <at>  <at>  -36,6 +36,11  <at>  <at>  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 int	 d_forwline(int, int);
+static int	 d_backline(int, int);	
+static int	 d_gotoline(int, int);
 static void	 reaper(int);

 extern struct keymap_s helpmap, cXmap, metamap;
(Continue reading)

Stuart Henderson | 1 Aug 2011 11:57
Favicon
Gravatar

Re: ospf fib reload and rtm_desync

On 2011/07/29 14:33, Stuart Henderson wrote:
> Here's a diff. Rather than reloading directly on receipt of
> RTM_DESYNC it arms an evtimer so that it defers reloading until
> 1sec after the last desync message. (Randomly chosen value and
> might want to be larger, but it serves well as a demonstration).

How often do other people running ospfd on full table routers
see "reloading interface list and routing table" (and following
"last message repeated X times") in their logs?

Running this in production now and I'm down from ~70/hour to
~10/hour on a production box with a 1-sec timer.

When it's having problems there are still a number of reloads all
close together so I'll probably push it out by another couple of
seconds on my boxes.

Alf Schlichting | 1 Aug 2011 12:15

rksh annoyance

Hello,

Here at work we have some special users that have a shell script as login
shell so they can perform some tasks.

Now, if this script is named /usr/local/bin/youcandothis.sh it will work,
same script but named /usr/local/bin/youarenotallowed.sh does not 
because ksh determines if it is called as a restricted shell very loose,
if not silly.

Alf

--- bin/ksh/main.c.orig	Mon Aug  1 11:51:00 2011
+++ bin/ksh/main.c	Mon Aug  1 12:04:03 2011
 <at>  <at>  -748,7 +748,14  <at>  <at> 
 	char *p;

 	if ((p = strrchr(name, '/')))
-		name = p;
-	/* accepts rsh, rksh, rpdksh, pdrksh, etc. */
-	return (p = strchr(name, 'r')) && strstr(p, "sh");
+		name = p + 1;
+	/* accepts rsh, rksh, rpdksh, pdrksh */
+	if (strcmp(name, "rsh") && \
+		strcmp(name, "rksh") && \
+		strcmp(name, "rpdksh") && \
+		strcmp(name, "pdrksh"))
+		return(0);
+	else
+		return(1);
(Continue reading)

Todd C. Miller | 1 Aug 2011 15:09
Favicon

Re: [Patch] ffclose() in mg

On Sun, 31 Jul 2011 11:51:19 EDT, Loganaden Velvindron wrote:

> Shouldn't we account for errors when fclose() is called?

Yes, since fclose() calls fflush() first which may do the equivalent
of fwrite().  You need to check the return value of fclose()
to make sure everything actually got written.

 - todd

Alexander Bluhm | 1 Aug 2011 23:59
Picon
Gravatar

Re: rdr-to ::1

On Wed, Jul 27, 2011 at 12:44:21AM +0200, Alexander Bluhm wrote:
> On Fri, May 20, 2011 at 11:54:09AM +0200, Camiel Dobbelaar wrote:
> > I'll spend some more time on this, but maybe there's an IPv6 guru that
> > can lend a hand?  :-)
> 
> Just removing the check seems wrong to me.  This would allow ::1
> addresses from the wire.  Also the goto hbhcheck would get lost.

I have reconsidered the existing loopback check in ip6_input().  It
is wrong.  The check that ::1 is not allowed from the wire must be
before pf_test().  Otherwise pf could reroute or redirect such a
packet.

KAME moved the check in rev 1.189 of their ip6_input.c.  They also
removed the special goto ours logic for ::1.  I do not change that
now before release so leave the goto where it is.

Redirect or nat to ::1 should work with this diff.  But I still
believe that divert-to is more suitable for that.

ok?

bluhm

Index: netinet6/ip6_input.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/ip6_input.c,v
retrieving revision 1.101
diff -u -p -r1.101 ip6_input.c
--- netinet6/ip6_input.c	6 Jul 2011 02:42:28 -0000	1.101
(Continue reading)

Tobias Ulmer | 2 Aug 2011 03:31

duid validation in disk_map()

Curiously, if DM_OPENPART is specified, disk_map() accepts the format
"duid" as well as "duid.anypart". This may be a feature but I suspect
it's actually a small oversight in the validation part.

I'm proposing this stricter (and maybe more readable) version:

Index: kern/subr_disk.c
===================================================================
RCS file: /home/vcs/cvs/openbsd/src/sys/kern/subr_disk.c,v
retrieving revision 1.131
diff -u -p -r1.131 subr_disk.c
--- kern/subr_disk.c	26 Jul 2011 12:32:14 -0000	1.131
+++ kern/subr_disk.c	2 Aug 2011 01:09:50 -0000
 <at>  <at>  -1467,8 +1467,10  <at>  <at>  disk_map(char *path, char *mappath, int 
 		return -1;

 	/* Verify that the device name is properly formed. */
-	if (!((strlen(path) == 16 && (flags & DM_OPENPART)) ||
-	    (strlen(path) == 18 && path[16] == '.')))
+	if ((strlen(path) == 16 && (flags & DM_OPENPART)) ||
+	    (strlen(path) == 18 && path[16] == '.' && !(flags & DM_OPENPART)))
+		;
+	else
 		return -1;

 	/* Get partition. */

Otto Moerbeek | 2 Aug 2011 07:32

bc(1), cooked mode and ^Z

Hi,

if you are using a shell in cooked mode (e.g. csh) ^Z did not reset
the terminal to the proper state.

This should fix that. It's a pity libedit only has a all or nothing
function for signal handling...

Please test (with all shells!) and review, I want this to make
release,

	-Otto
	
Index: bc.y
===================================================================
RCS file: /cvs/src/usr.bin/bc/bc.y,v
retrieving revision 1.38
diff -u -p -r1.38 bc.y
--- bc.y	8 Jul 2011 23:29:46 -0000	1.38
+++ bc.y	28 Jul 2011 10:05:38 -0000
 <at>  <at>  -43,6 +43,7  <at>  <at> 
 #include <stdarg.h>
 #include <stdbool.h>
 #include <string.h>
+#include <termios.h>
 #include <unistd.h>

 #include "extern.h"
 <at>  <at>  -1061,12 +1062,13  <at>  <at>  sigchld(int signo)
 	int status, save_errno = errno;
(Continue reading)

Edd Barrett | 2 Aug 2011 11:24
Picon
Gravatar

watchdog timeouts on alc0

Hi,

During testing I am noticing watchdog timeouts on alc0 when you unplug
the cable from an active interface:

alc0: watchdog timeout (missed link)
alc0: watchdog timeout

This causes the system to lock temproarily for 5 seconds or so every few
seconds. You can plug the cable back in and see:

alc0: could not disable RxQ/TxQ (0x00000008)!
alc0: could not disable Rx/Tx MAC(0x00000008)!

after which the system (and network interface) behaves normally.

I have seen this previously and mailed brad some weeks back, as I know he was
doing work in this area. I am CCing him now.

Cheers

OpenBSD 5.0-beta (GENERIC.MP) #31: Sun Jul 31 17:22:45 MDT 2011
    deraadt <at> i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Atom(TM) CPU N455  <at>  1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE
real mem  = 1061302272 (1012MB)
avail mem = 1033863168 (985MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 01/10/11, SMBIOS rev. 2.6  <at>  0xe8080 (36 entries)
bios0: vendor Packard Bell version "V3.14(DDR3)" date 01/10/2011
(Continue reading)


Gmane