Re: 8.1-STABLE amd64 machine check

2010-08-11 Thread Dan Langille

On Wed, August 11, 2010 7:31 am, Andrew Heybey wrote:
> On Aug 11, 2010, at 6:47 AM, Dan Langille wrote:
>
>> I am encountering a situation similar to one reported by Andrew Heybey
>> at
>> http://docs.freebsd.org/cgi/mid.cgi?6E83197B-9DD5-4C7E-846D-AD176C25464D
>>
>> This morning I found this in my /var/log/messages:
>>
>> Aug 11 01:59:48 kraken kernel: MCA: Bank 4, Status 0x94614c62001c011b
>> Aug 11 01:59:48 kraken kernel: MCA: Global Cap 0x0106,
>> Status 0x
>> Aug 11 01:59:48 kraken kernel: MCA: Vendor "AuthenticAMD", ID 0x100f42,
>> APIC ID 0
>> Aug 11 01:59:48 kraken kernel: MCA: CPU 0 COR GCACHE LG RD error
>> Aug 11 01:59:48 kraken kernel: MCA: Address 0x5d0fe8c
>>
>> Andrew: You posted about this on July 14.  Anything new since then?
>
> I took jkim's advice and RMAed the CPU to newegg since it was only a week
> old.  No machine checks from the new one yet.

Thanks.  My CPU is 6 months old, and now out of Newegg's warranty period
(Replacement period: 30 days from original invoice date).


-- 
Dan Langille -- http://langille.org/

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


8.1-STABLE amd64 machine check

2010-08-11 Thread Dan Langille
I am encountering a situation similar to one reported by Andrew Heybey 
at http://docs.freebsd.org/cgi/mid.cgi?6E83197B-9DD5-4C7E-846D-AD176C25464D


This morning I found this in my /var/log/messages:

Aug 11 01:59:48 kraken kernel: MCA: Bank 4, Status 0x94614c62001c011b
Aug 11 01:59:48 kraken kernel: MCA: Global Cap 0x0106, 
Status 0x
Aug 11 01:59:48 kraken kernel: MCA: Vendor "AuthenticAMD", ID 0x100f42, 
APIC ID 0

Aug 11 01:59:48 kraken kernel: MCA: CPU 0 COR GCACHE LG RD error
Aug 11 01:59:48 kraken kernel: MCA: Address 0x5d0fe8c


from /var/run/dmesg.boot

Copyright (c) 1992-2010 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.1-STABLE #0: Sun Jul 25 19:18:56 EDT 2010
d...@kraken.example.org:/usr/obj/usr/src/sys/KRAKEN amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Phenom(tm) II X4 945 Processor (3010.17-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x100f42  Family = 10  Model = 4 
Stepping = 2


Features=0x178bfbff
  Features2=0x802009
  AMD 
Features=0xee500800
  AMD 
Features2=0x37ff

  TSC: P-state invariant
real memory  = 4294967296 (4096 MB)
avail memory = 4100710400 (3910 MB)
ACPI APIC Table: <111909 APIC1708>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3


Andrew: You posted about this on July 14.  Anything new since then?

John: Is it time for me to get a new CPU?

thanks

--
Dan Langille - http://langille.org/
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Above the law? (was: You gotta be kidding .... Re: cvs commit: src/sys/miscfs/specfs spec_vnops.c)

2005-01-16 Thread Dan Langille
On 16 Jan 2005 at 17:30, Linus Caldwell wrote:

> [Although this is formally a reply to Matt, I'm addressing the
> committers community here]

Then please address to to the committers mailing list.
-- 
Dan Langille : http://www.langille.org/
BSDCan - The Technical BSD Conference - http://www.bsdcan.org/

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Raid problems

2004-09-21 Thread Dan Langille
On 21 Sep 2004 at 13:38, DB wrote:

> Hi all
> 
> I'm trying to install FreeBSD 5.3-Beta5 on a friend's server. He has a promise
> fasttracks SX4000 raid controller (raid level 5), but when booting freebsd we
> get a list of all the 4 disks. Is that right? (haven't tried installing freebsd
> on a raid computer).

You are asking on the wrong list.  Ask on [EMAIL PROTECTED]

-- 
Dan Langille : http://www.langille.org/
BSDCan - The Technical BSD Conference - http://www.bsdcan.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Kernel GENERIC config file

2004-07-27 Thread Dan Langille
On Tue, 27 Jul 2004, bsd hack wrote:

> I need the kernel GENERIC config file for freebsd 4.7.  I am able to
> find only the config file for freeBSD 5.2 online... can n'ybody either
> mail me the freeBSD 4.7 GENERIC file or gimme a link to it?

This doesn't belong on hackers.

Get it yourself from CVS via the cvsweb interface: see
http://www.freebsd.org/

-- 
Dan Langille - http://www.langille.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: testing for substrings in perl

2004-06-07 Thread Dan Langille
On 7 Jun 2004 at 16:31, Chris Costello wrote:

> On Sun, 2003-10-05 at 10:32, Dan Langille wrote:
> 
> > I think it might just be easier to do a straight comparison of the first N
> > characters of the two strings where N = length of the directory name.
> > 
> > Any suggestions?
> 
>You can do:
> 
>  if ($string =~ /\/?\Q$expr\E/) {
>  # ... matches ...
>  }
> 
>\Q and \E are special metaquoting classes in perlre designed
> specifically for cases like this.
> 
>See 'man perlre' for more gory info.

Who is lagged here Chris?  Thanks for the reply though.

FWIW, I suspect this was a FreshPorts-releated issue, and I think I
 was trying to solve this problem: is any file touched by this commit 
in the ports tree?


  foreach $value (@{$Files}) {
  my ($action, $filename, $revision, $commit_log_element_id) 
= @$value;
  print " processing $filename\n";
  if ($filename =~ m|^/?ports/|) {
      $PortTreeCommit = 1;
  last;
  }
  }


-- 
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Fundraising for FreeBSD development.

2004-04-08 Thread Dan Langille
On Thu, 8 Apr 2004, Poul-Henning Kamp wrote:

> I cannot promise exposure on the main FreeBSD Project pages, that
> would be up to the webmasters (and to some extent the core team)
> to arrange and allow for such precense.

If it helps, I can by put stuff on my websites with respect to
acknowledging those that contribute.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Fundraising for FreeBSD development.

2004-04-08 Thread Dan Langille
On Thu, 8 Apr 2004, Poul-Henning Kamp wrote:

>
> http://people.freebsd.org/~phk/funding.html

typo :(An before any of you get an

Should be "And", not An.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Loosing STDOUT after file rotation

2004-04-02 Thread Dan Langille
On Thu, 1 Apr 2004, James Housley wrote:

> I have a program that I have the is supposed to run forever.  I log any
> output to a log file.  It is run in a startup script like thie:
>
> program_name >> $err_log 2>&1
>
> The problem is that after newsyslog rotates the $err_log file, no more
> data is written to the file.  I can not stop and restart the program.  I
> can accept a signal.  But what do I need to do in "program_name" to allow
> the data to be written after the "rotation" of the file.

Sorry, I missed the >> above I thought you were writing directly.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Loosing STDOUT after file rotation

2004-04-02 Thread Dan Langille
On Thu, 1 Apr 2004, James Housley wrote:

> I have a program that I have the is supposed to run forever.  I log any
> output to a log file.  It is run in a startup script like thie:
>
> program_name >> $err_log 2>&1
>
> The problem is that after newsyslog rotates the $err_log file, no more
> data is written to the file.  I can not stop and restart the program.  I
> can accept a signal.  But what do I need to do in "program_name" to allow
> the data to be written after the "rotation" of the file.

When the signal is received, close the file, and reopen it.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: fsck fails - mark sectors as bad?

2004-03-29 Thread Dan Langille
On 29 Mar 2004 at 14:29, Bjoern Fischer wrote:

> Hello Dan,
> 
> > I had a hard drive failure.  I'm trying to get as much data off it as
> > I can before I restore from backup.  I have mounted the drive in
> > another box and I'm attempting to salvage what I can.
> 
> being confronted with disk crashes like the one you described I usually
> try to make a last backup of the complete unmounted file systems with dd.
> Trying to fix the file system in place, i.e. on the failing disk that is
> about to break down completely, makes the situation worse in many cases.
> After dd'ing the file systems to a safe disk you can try fsck.

I'm finding the dd is challenging:

# dd if=/dev/ad2s1e of=ad1s1e conv=noerror,sync bs=64k
dd: /dev/ad2s1e: Input/output error
6+0 records in
6+0 records out
393216 bytes transferred in 42.776918 secs (9192 bytes/sec)
dd: /dev/ad2s1e: Input/output error

- note, this dd has not finished, I think because of these errors 
from /var/log/messages

Mar 28 19:47:53 tmp /kernel: ad2: READ command timeout tag=0 serv=0 - 
resetting
Mar 28 19:47:53 tmp /kernel: ata1: resetting devices .. done
Mar 28 19:48:03 tmp /kernel: ad2: READ command timeout tag=0 serv=0 - 
resetting
Mar 28 19:48:03 tmp /kernel: ata1: resetting devices .. done
Mar 28 19:48:13 tmp /kernel: ad2: READ command timeout tag=0 serv=0 - 
resetting
Mar 28 19:48:13 tmp /kernel: ata1: resetting devices .. done
Mar 28 19:48:21 tmp /kernel: ad2s1e: hard error reading fsbn 1279871 
of 768-895 (ad2s1 bn 1279871; cn 79 tn 170 sn 26) trying PIO mode
Mar 28 19:48:21 tmp /kernel: ad2: DMA problem fallback to PIO mode
Mar 28 19:48:21 tmp /kernel: ad2: DMA problem fallback to PIO mode
Mar 28 19:48:26 tmp /kernel: ad2s1e: hard error reading fsbn 1279903 
of 768-895 (ad2s1 bn 1279903; cn 79 tn 170 sn 58) status=59 error=40
Mar 28 19:48:40 tmp /kernel: ad2: READ command timeout tag=0 serv=0 - 
resetting
Mar 28 19:48:40 tmp /kernel: ata1: resetting devices .. ata1-slave: 
ATA identify retries exceeded
Mar 28 19:48:40 tmp /kernel: done
-- 
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


fsck fails - mark sectors as bad?

2004-03-28 Thread Dan Langille
OFT UPDATE INCONSISTENCY

CONTINUE? yes

^C

And I found this in /var/log/messsages
Mar 28 18:35:16 tmp /kernel: ad2s1g: hard error reading fsbn 83986495 
of 40829792-40829919 (ad2s1 bn 83986495; cn 5227 tn 233 sn 61
) trying PIO mode
Mar 28 18:35:16 tmp /kernel: ad2: DMA problem fallback to PIO mode
Mar 28 18:35:16 tmp last message repeated 5 times
Mar 28 18:35:21 tmp /kernel: ad2s1g: hard error reading fsbn 83986591 
of 40829792-40829919 (ad2s1 bn 83986591; cn 5227 tn 235 sn 31
) status=59 error=40
Mar 28 18:35:37 tmp /kernel: ad2s1g: hard error reading fsbn 40829897 
(ad2s1 bn 40829897; cn 2541 tn 138 sn 38) status=59 error=40
Mar 28 18:35:47 tmp /kernel: ad2s1g: hard error reading fsbn 40829900 
(ad2s1 bn 40829900; cn 2541 tn 138 sn 41) status=59 error=40
-- 
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: F1+Konsole+bash = bash.core

2004-03-17 Thread Dan Langille
On Wed, 17 Mar 2004, Dan Langille wrote:

> On Wed, 17 Mar 2004, Allan Fields wrote:
>
> > Ultimately this bug might be best directed to [EMAIL PROTECTED]
> > or [EMAIL PROTECTED] if patching the system libreadline
> > doesn't help.
>
> I was trying to do that last night, but they were having DNS problems.  I
> will try again later today.

I just sent the bashbug report.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: F1+Konsole+bash = bash.core

2004-03-17 Thread Dan Langille
On Wed, 17 Mar 2004, Allan Fields wrote:

> Ultimately this bug might be best directed to [EMAIL PROTECTED]
> or [EMAIL PROTECTED] if patching the system libreadline
> doesn't help.

Allan: I encourage you to add your experiences as a follow up to
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/61297

Then I'll try sumbmitting that bashbug report again.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: F1+Konsole+bash = bash.core

2004-03-17 Thread Dan Langille
On Wed, 17 Mar 2004, Allan Fields wrote:

> Ultimately this bug might be best directed to [EMAIL PROTECTED]
> or [EMAIL PROTECTED] if patching the system libreadline
> doesn't help.

I was trying to do that last night, but they were having DNS problems.  I
will try again later today.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


F1+Konsole+bash = bash.core

2004-03-16 Thread Dan Langille
Any one interested in digging for this one?  My laptop is out of 
commission at the moment, but hopefully it'll be back soone.

--- Forwarded message follows ---
From:   Andy Fawcett <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject:Re: [kde-freebsd] F1+Konsole+bash = bash.core
Date sent:  Tue, 16 Mar 2004 09:15:39 +0200
Copies to:          Dan Langille <[EMAIL PROTECTED]>

On Tuesday 16 March 2004 02:23, Dan Langille wrote:
> Hi,
>
> Would this be considered a Konsole issue?
>
> Press F1 while in a bash shell in Konsole and you get:
>
> laptpo# bash
> [EMAIL PROTECTED]:/home/dan] # Illegal instruction (core
> dumped) laptop#
>
> This does not happen at the console.  only Konsole.  Nor under any
> other shell I tried (/bin/sh, /bin/csh, /bin/tcsh).
>
> This is bash-2.05b.007
>
> $ ldd /usr/local/bin/bash
> ldd: /usr/local/bin/bash: not a dynamic executable
>
> The situation is 100% reproducible here. And duplicated by others.

$ gdb /usr/local/bin/bash bash.core
(blah)
(no debugging symbols found)...
Core was generated by `bash'.
Program terminated with signal 4, Illegal instruction.

(gdb) bt
#0  0x2810b9d5 in _rl_dispatch_subseq () from /lib/libreadline.so.4
#1  0x2810b9be in _rl_dispatch () from /lib/libreadline.so.4
#2  0x2810bc28 in _rl_dispatch_subseq () from /lib/libreadline.so.4
#3  0x2810b9be in _rl_dispatch () from /lib/libreadline.so.4

and so on, for 2000+ lines (I stopped checking)

I'd call it a bash/readline problem, but I'm no expert

A.

-- 
Andy Fawcett | [EMAIL PROTECTED]
 | [EMAIL PROTECTED]
"In an open world without walls and fences,  | [EMAIL PROTECTED]
  we wouldn't need Windows and Gates."  -- anon  | [EMAIL PROTECTED]

--- End of forwarded message ---
-- 
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: cvsd problems

2004-03-10 Thread Dan Langille
On 10 Mar 2004 at 19:00, db wrote:

> On Wed, 10 Mar 2004 15:45:56 +0100
> db <[EMAIL PROTECTED]> wrote:
> 
> > > I want to run a jailed cvs server, where users only have write
> > > access to their own projects. So this is what I have done:
> > 
> > Sorry, forgot to tell you:
> > Arch: i386
> > FreeBSD: 5.2.1 release
> > CVSd: 1.0.1
> 
> Ok nevermind, I found the problem.

But you haven't shared it.  Please do.
-- 
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Standard sbc and pcm support in GENERIC kernel?

2004-03-05 Thread Dan Langille
On Fri, 5 Mar 2004, Dan Langille wrote:

> *That* explanation is vast difference to saying they have to read man
> pcm(4).  The difference is sigficicant.

In the same breath, someone needs to install a spell checker and verify
the grammer.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Standard sbc and pcm support in GENERIC kernel?

2004-03-05 Thread Dan Langille
On Fri, 5 Mar 2004, Avleen Vig wrote:

> On Thu, Mar 04, 2004 at 06:26:47PM -0500, Dan Langille wrote:
> > > If they'd read pcm(4) they'd know how to get sound support up and
> > > running without recompiling their kernel.  Is there something wrong with
> > > requiring that a new user bother to read the documentation?
> >
> > They would first have to know to read man pcm(4).
>
> All the have to do is look at the handbook. And if they can't find the
> link on the *front page* of freebsd.org, under the clearly labelled
> catagory of "Support", then there is very little we can or should do to
> help them. After a point, enough is enough. If the user isn't prepared
> to educate themselves, your attempts will ultimately fail.

*That* explanation is vast difference to saying they have to read man
pcm(4).  The difference is sigficicant.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Standard sbc and pcm support in GENERIC kernel?

2004-03-04 Thread Dan Langille
On Thu, 4 Mar 2004, Brandon D. Valentine wrote:

> On Wed, Mar 03, 2004 at 05:03:40PM +0100, Jorn Argelo wrote:
> >
> > I've been on the question list for some time, and I have noticed that
> > many people do not know how to get sound support up and running in
> > FreeBSD 5.X. I know that re-compiling the kernel is easy enough, but
> > there are still people not willing to do so, as I have noticed on the
> > list. Therefor I thought it might be an idea to put sound support in the
> > GENERIC kernel configuration, so that newbies will no longer find
> > themselves stuck with that.
>
> If they'd read pcm(4) they'd know how to get sound support up and
> running without recompiling their kernel.  Is there something wrong with
> requiring that a new user bother to read the documentation?

They would first have to know to read man pcm(4).

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kernel options

2004-02-29 Thread Dan Langille
On Sun, 29 Feb 2004, Kris Kennaway wrote:

> On Sun, Feb 29, 2004 at 11:36:56AM +0200, Danny Braniss wrote:
> > hi,
> > is there a way of knowing with which kernel-options a particular kernel
> > was compiled with (appart form the obvious config file)?
>
> In general, no.

I have read about an option to include the configuration file with the
kernel.  From my 4.9-stable /usr/src/sys/i386/conf/LINT file:

# This allows you to actually store this configuration file into
# the kernel binary itself, where it may be later read by saying:
#strings -n 3 /kernel | sed -n 's/^___//p' > MYKERNEL
#
options INCLUDE_CONFIG_FILE # Include this file in kernel

Not useful unless you've used it, which is not the default case.

-- 
Dan Langille - BSDCan: http://www.bsdcan.org/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


problems resolving bsdcan.org?

2004-01-25 Thread Dan Langille
I've had reports of people not being able to resolve hostnames for 
bsdcan.org.  I do know that one of the domain's DNS servers is 
offline (m20.unixathome.org).  But the other (nezlok.unixathome.org) 
is up and accepting queries (at least for all my attempts).

My testing at http://looking-glass.taide.net/ gives "connection timed 
out; no servers could be reached".  But a dig from here goes OK:

$ dig  @nezlok.unixathome.org www.bsdcan.org

; <<>> DiG 8.3 <<>> @nezlok.unixathome.org www.bsdcan.org
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 
2
;; QUERY SECTION:
;;  www.bsdcan.org, type = A, class = IN

;; ANSWER SECTION:
www.bsdcan.org. 3D IN A 66.154.97.250

;; AUTHORITY SECTION:
bsdcan.org. 3D IN NSm20.unixathome.org.
bsdcan.org. 3D IN NSnezlok.unixathome.org.

;; ADDITIONAL SECTION:
m20.unixathome.org. 3D IN A 66.11.169.50
nezlok.unixathome.org.  3D IN A 66.154.97.250

;; Total query time: 203 msec
;; FROM: lists.unixathome.org to SERVER: nezlok.unixathome.org  
66.154.97.250
;; WHEN: Mon Jan 26 04:31:02 2004
;; MSG SIZE  sent: 32  rcvd: 130

I can't see the problem.  Can you?

Thanks.
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Chello blocking FreshPorts service

2004-01-08 Thread Dan Langille
On 6 Jan 2004 at 9:24, Dan Langille wrote:

> For some months Chello has denied smtp service from the FreshPorts
> mail server.  All queries to Chello regarding this matter have gone
> unanswered.
> 
> $ telnet smtpgate.chello.at 25
> Trying 213.46.255.2...
> Connected to smtpgate.chello.at.
> Escape character is '^]'.
> 421 viefep12-int.chello.at connection refused from [66.154.97.250]
> Connection closed by foreign host.
> 
> This happens for all Chello domains I have tried.  This means that
> Chello users are unable to use the FreshPorts notification service. 
> For what it's worth, this also affect the FreeBSD Diary announcement
> mailing list.
> 
> If anyone has contacts at Chello, please ask them to look into this. 
> All attempts to get this resolved have been blocked.
> 
> I've heard many stories about Chello standards of service.  This
> situation validates everything I've heard.

I have had some information from a third party.  It appears that 
Chello are using xbl.selwerd.cx as a RBL.  My research indicates that 
xbl.selwerd.cx should not be used as an RBL:

http://mla.libertine.org/tmda-users/2002-11/msg00049.html

Anyone here using xbl.selwerd.cx?

-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Chello blocking FreshPorts service

2004-01-06 Thread Dan Langille
For some months Chello has denied smtp service from the FreshPorts 
mail server.  All queries to Chello regarding this matter have gone 
unanswered.

$ telnet smtpgate.chello.at 25
Trying 213.46.255.2...
Connected to smtpgate.chello.at.
Escape character is '^]'.
421 viefep12-int.chello.at connection refused from [66.154.97.250]
Connection closed by foreign host.

This happens for all Chello domains I have tried.  This means that 
Chello users are unable to use the FreshPorts notification service.  
For what it's worth, this also affect the FreeBSD Diary announcement 
mailing list.

If anyone has contacts at Chello, please ask them to look into this.  
All attempts to get this resolved have been blocked.

I've heard many stories about Chello standards of service.  This 
situation validates everything I've heard.

cheers
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Where is FreeBSD going?

2004-01-05 Thread Dan Langille
On 5 Jan 2004 at 13:40, Munden, Randall J wrote:

> Right.  What concerns me most is the rise in the incidence of trolls
> all trolling about the same subject or along the same vein.  Would
> someone please explain what is going on?  As a production user of fBSD
> this is troubling.

Don't let trolls trouble you no matter how many you see.  They aren't 
contributing.  And I second what Colin said.  One troll. Many 
disguises.
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: optionally include file within a Makefile

2003-12-18 Thread Dan Langille
On 18 Dec 2003 at 19:02, Dan Langille wrote:

> My goal is provide a way to override values in a Makefile with values
> from a local config file.

I'm getting further.  What's the proper way to do an include?

[EMAIL PROTECTED]:~] $ cat Makefile
A?="things"

all:
@echo A is $A
if [ -r ${HOME}/.bacula-regress ] ; then \
echo loading tha file; \
.include "${HOME}/.bacula-regress" ; \
fi

@echo A is $A
[EMAIL PROTECTED]:~] $ cat .bacula-regress
BACULA_SOURCE="${HOME}/src/bacula-cvs"
[EMAIL PROTECTED]
AUTOCHANGER="/dev/null"

A="stuff"
echo yes, we have stuff here.
[EMAIL PROTECTED]:~] $ make
A is things
if [ -r /home/dan/.bacula-regress ] ; then  echo loading tha file;  
.include "/home/dan/.bacula-regress" ;  fi
loading tha file
.include: not found
*** Error code 127

Stop in /usr/home/dan.
[EMAIL PROTECTED]:~] $
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


optionally include file within a Makefile

2003-12-18 Thread Dan Langille
My goal is provide a way to override values in a Makefile with values 
from a local config file.

My attempt is this:

if test -r ~/.local-values \
then \
 . ~/.local-values \
fi 
#
# Where to get the source to be tested
BACULA_SOURCE?="${HOME}/src/bacula-cvs"

But I'm getting this error:

$ make setup
"Makefile", line 8: Need an operator

where line 8 is the fi.

Ideas?
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Subscription to n lists

2003-12-18 Thread Dan Langille
On 18 Dec 2003 at 12:28, Aniruddha Bohra wrote:

> Is there any way to stop this ?

Ignore it. It's being handled.
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


using devel/libusb to access USB

2003-11-24 Thread Dan Langille
Travis Campbell and I are looking at apcupsd to get it working with 
the APC RS/XS series of USB capable UPSs.  We're concentrating on 
4.x.

Some work has been done in this area by Riccardo Torrini.  See 
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=57225+0+archive/2003/free
bsd-hardware/20030608.freebsd-hardware

We have been looking at the devel/libusb port and experimenting with 
testlibusb which is a part of that port.  We have noticed that 
usb_find_devices() does not find any devices.  Looking at the usb.c 
code within libusb, we found that usb_os_find_devices() does not 
return any devices, and therefore the while loop is never entered.

We tracked the problem down to usb_os_find_devices() (within bsd.c) 
and found that various things were preventing the list from being 
created.

We're wondering if anyone has had success with devel/libusb for 
similar things.
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH] : libc_r/uthread/uthread_write.c

2003-11-14 Thread Dan Langille
On 14 Nov 2003 at 10:08, Dan Langille wrote:

> Daniel:  It appears the patch which was comitted didn't include 
> everything it should.  I blame myself because the patch below 
> contains both debugging code and is reversed.   I will submit a PR
> with a patch.  In brief, what is missing is:
> 
> +   if (n == 0) {
> +   break;
> +   }
> +

See http://www.freebsd.org/cgi/query-pr.cgi?pr=59291

Please don't commit this until I've checked something else out first. 
 I am 100% sure this is correct, but I want it to be validated by 
testing on other systems first.  I suspect this will be completed 
within a week or so.

cheers
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH] : libc_r/uthread/uthread_write.c

2003-11-14 Thread Dan Langille
Daniel:  It appears the patch which was comitted didn't include 
everything it should.  I blame myself because the patch below 
contains both debugging code and is reversed.   I will submit a PR 
with a patch.  In brief, what is missing is:

+   if (n == 0) {
+   break;
+   }
+

Oops.


On 17 Sep 2003 at 10:32, Dan Langille wrote:

> On 16 Sep 2003 at 20:49, Daniel Eischen wrote:
> 
> > On Tue, 16 Sep 2003, Dan Langille wrote:
> > 
> > > I've had preliminary success with this patch.  More testing needs
> > > to be done, but in the meantime, I would appreciate reviews and
> > > comments.  The patched code is available from
> > > http://beta.freebsddiary.org/tmp/uthread_write.c and the patch
> > > appears below.
> > > 
> > > In short, the logic has been changed to ensure that if __sys_write
> > > returns zero, this value is returned by _write.
> > 
> > I think this is not quite correct.  Since libc_r is looping
> > and some data may have been read, then the partial byte count
> > should be returned, not zero.  It is possible the partial byte
> > count could also be zero in some cases, so it would result
> > in zero being returned in those instances.
> 
> I see what you mean. Please have a look at 
> http://beta.freebsddiary.org/tmp/uthread_write.c2
> The patch appears at the end of this message.
> 
> This version will return the partial byte count (which has always been
> zero in testing) but exit the loop if the return code is zero.
> 
> > I think the problem lies with the SCSI tape device. It should
> > either return 0 or -1 with errno=ENOSPC on a write that detects an
> > EOT, not partial byte count.
> 
> You are referring to sa(4)?
> 
> > If you are using libkse or
> > libthr, you will get a partial byte count and not zero because
> > the tape driver returns the (partial) bytes written.  So exiting the
> > loop in libc_r and returning 0 would only seem to correct the
> > "problem" for libc_r.
> 
> The problem  found when running under pthreads on 4.8-stable [i.e. EOT
> is not returned to the application code] is not found with libkse on
> 5.1-current.
> 
> --- uthread_write.c   Wed Sep 17 06:23:43 2003
> +++ uthread_write.c.org   Tue Sep 16 12:14:22 2003
> @@ -39,7 +39,6 @@
>  #include 
>  #include 
>  #include "pthread_private.h"
> -#include 
> 
>  ssize_t
>  _write(int fd, const void *buf, size_t nbytes)
> @@ -71,10 +70,6 @@
>/* Check if file operations are to block */
>blocking = ((_thread_fd_getflags(fd) & O_NONBLOCK) == 0);
> 
> - setlogmask (LOG_UPTO (LOG_NOTICE));
> - openlog("uthread_write.c", LOG_CONS | LOG_PID | LOG_NDELAY, 
> LOG_LOCAL1);
> - syslog (LOG_NOTICE, "uthread_write.c : blocking = '%d'", 
> blocking);
> -
>/*
> * Loop while no error occurs and until the expected number
> * of bytes are written if performing a blocking write:
> @@ -98,7 +93,7 @@
>  * write:
>  */
> if (blocking && ((n < 0 && (errno == EWOULDBLOCK ||
> - errno == EAGAIN)) || (n > 0 && num < nbytes))) {
> + errno == EAGAIN)) || (n >= 0 && num < nbytes))) {
>  curthread->data.fd.fd = fd;
>  _thread_kern_set_timeout(NULL);
> 
> @@ -136,16 +131,11 @@
>  * If there was an error, return partial success
>  * (if any bytes were written) or else the error:
>  */
> - } else if (n <= 0) {
> +         } else if (n < 0) {
>  if (num > 0)
>   ret = num;
>  else
>   ret = n;
> -
> - if (n == 0) {
> - syslog (LOG_NOTICE, "zero has been returned in 
> uthread_write.c;
> num = '%d'", num); -  break; -   
>  }
> 
> /* Check if the write has completed: */
> } else if (num >= nbytes)
> 
> -- 
> Dan Langille : http://www.langille.org/
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"
> 


-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: libwrap crash

2003-10-30 Thread Dan Langille
On 30 Oct 2003 at 9:42, Dan Langille wrote:

> I've been tracking down a libwrap call which crashes the application. 
>  The crash occurs on line 395 of contrib/tcp_wrappers/options.c, but 
> I have no idea.

I've been given some help in this offline.  Apparently, the bacula 
code is incorrectly using hosts_access. bacula should fork before it 
calls hosts_access because hosts_access will kill you on twist.  
Otherwise, you'll get either a deny or an allowed, and the thread 
continue from here.  

My offline helper was comparing the inetd source code.  I can't find 
any reference in host_options(5) or host_access(3) which point to the 
correct usage.

Is the FreeBSD documentation incomplete?  Is there a more accurate 
documentation I can point the bacula developers to?

FYI: The bacula approach is said to work under Linux and Solaris but 
I have yet to run my reproducible tests on those platforms.

Thank you.
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


libwrap crash

2003-10-30 Thread Dan Langille
I've been tracking down a libwrap call which crashes the application. 
 The crash occurs on line 395 of contrib/tcp_wrappers/options.c, but 
I have no idea.

The situation:

- The daemon starts on the remote client.
- Connection is attempted from another box via port 9102
- The daemon uses hosts_access(3) to see if the connection is allowed
- /etc/hosts.allow contains no explit allow/deny for this connection 
which means this line is invoked:

# The rest of the daemons are protected.
ALL : ALL \
: severity auth.info \
: twist /bin/echo "You are not welcome to use %d from %h."

When the host_acess calls invokes twist_option 
(contrib/tcp_wrappers/options.c:370), things blow up on this call:

  (void) execl("/bin/sh", "sh", "-c", value, (char *) 0);

Any ideas?  Suggestions?

Thank you


[EMAIL PROTECTED]:/usr/ports/sysutils/bacula/work/bacula-1.32b/src/filed] # 
gdb ./bacula-fd
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and 
you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for 
details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated 
bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../con
trib/gdb/gdb/dwarf2read.c line 3049 in dwarf2_read_section

(gdb) source ~/debug
Breakpoint 1 at 0x805a365: file bnet_server.c, line 152.

Breakpoint 1, bnet_thread_server (bind_addr=0x0, port=9102, 
max_clients=10, client_wq=0x807c4a0,
handle_client_request=0x804d3c0 ) 
at bnet_server.c:152
152   fromhost(&request);
Current language:  auto; currently c++
(gdb) n
153   if (!hosts_access(&request)) {
(gdb) s
0x8049cc8 in hosts_access () at 
/usr/src/lib/libwrap/../../contrib/tcp_wrappers/hosts_access.c:126
126
(gdb) /usr/src/lib/libwrap/../../contrib/tcp_wrappers/options.c:395
Undefined command: "".  Try "help".
(gdb) b /usr/src/lib/libwrap/../../contrib/tcp_wrappers/options.c:395
Breakpoint 2 at 0x280a1766: file 
/usr/src/lib/libwrap/../../contrib/tcp_wrappers/options.c, line 395.
(gdb) c
Continuing.

Breakpoint 2, twist_option (value=0xbfbfe890 "/bin/echo \"You are not 
welcome to use bast-fd from undef.unixathome.org.\"",
request=0xbfbff574) at 
/usr/src/lib/libwrap/../../contrib/tcp_wrappers/options.c:395
395 (void) execl("/bin/sh", "sh", "-c", value, (char 
*) 0);
Current language:  auto; currently c
(gdb) list
390 maybe_dup2(request->fd, 2) != 2) {
391 error = "twist_option: dup: %m";
392 } else {
393 if (request->fd > 2)
394 close(request->fd);
395 (void) execl("/bin/sh", "sh", "-c", value, (char 
*) 0);
396 error = "twist_option: /bin/sh: %m";
397 }
398
399 /* Something went wrong: we MUST terminate the 
process. */
(gdb) print value
$1 = 0xbfbfe890 "/bin/echo \"You are not welcome to use bast-fd from 
undef.unixathome.org.\""
(gdb) n
0x2809fb4c in _init () from /usr/lib/libwrap.so.3
(gdb) n
Single stepping until exit from function _init,
which has no line number information.
Error accessing memory address 0x281a1e84: Bad address.
(gdb
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: hosts_access(3) - correct usage?

2003-10-29 Thread Dan Langille
On 29 Oct 2003 at 18:26, Dan Langille wrote:

> On 29 Oct 2003 at 17:10, Guido van Rooij wrote:
> 
> > On Wed, Oct 29, 2003 at 09:38:50AM -0500, Dan Langille wrote:
> > > Is this the right way to use hosts_access?  The code blows up during 
> > > the hosts_access call.  I'm told it runs OK on Linux/Solaris.  I'm 
> > > wonderding if there's something different it needs to do be doing on 
> > > FreeBSD.
> > > 
> > > Thanks
> > > 
> > > #ifdef HAVE_LIBWRAP
> > >   P(mutex);   /* hosts_access is not thread safe */
> > >   request_init(&request, RQ_DAEMON, my_name, RQ_FILE, newsockfd, 
> > > 0);
> > >   fromhost(&request);
> > >   if (!hosts_access(&request)) {
> > >  V(mutex);
> > >  Jmsg2(NULL, M_WARNING, 0, _("Connection from %s:%d refused 
> > > by hosts.access"),
> > >inet_ntoa(cli_addr.sin_addr), ntohs(cli_addr.sin_port));
> > >  close(newsockfd);
> > >  continue;
> > >   }
> > >   V(mutex);
> > > #endif
> > 
> > 
> > This seems okay to me.
> > OpenSSH uses:
> > struct request_info req;
> >  
> > request_init(&req, RQ_DAEMON, __progname, RQ_FILE, sock_in, 0);
> > fromhost(&req);
> >  
> > if (!hosts_access(&req)) {
> > debug("Connection refused by tcp wrapper");
> > refuse(&req);
> > /* NOTREACHED */
> > fatal("libwrap refuse returns");
> > }
> > 
> > I take it that newsockfd is the one returned from accept()?
> > I'd try using a debug version of libwrap...
> 
> I was speaking with dwhite on IRC about this.  The application 
> (sysutils/bacula) has a hacked version of tcpd.h for use with C++.  
> This didn't have the #ifdef INET6 statements.  So I patched that up.  
> But no difference in the results.
> 
> If hosts.allow is going to deny access, the crash occurs:
> http://beta.freebsddiary.org/tmp/bacula-fd-gbd.success.html
> 
> If access is denied, this occurs:
> http://beta.freebsddiary.org/tmp/bacula-fd-gbd.fails.html
> 
> I haven't looked into libwrap yet, but in case someone sees something 
> obvious, I've posted the above.

Well, we've tracked it down to one set of allow statements.  The 
server is at 192.168.0.56 (undef.unixathome.org).  The daemon name is 
bast-fd.  If we supply any one of these in /etc/hosts.allow, the 
crash does not occur.

bast-fd : 192.168.0.0/255.255.255.0 : allow
bast-fd : 192.168.0.0/255.255.255.0 : deny
bast-fd : undef.unixathome.org : allow
bast-fd : undef.unixathome.org : deny
bast-fd : 192.168.0.56 : allow

With this, the crash occurs:
bast-fd : undef.blah.blah : allow

This is how to make it crash:

$ telnet bast 9102
Trying 192.168.0.21...
Connected to bast.unixathome.org.
Escape character is '^]'.
You are not welcome to use bast-fd from undef.unixathome.org.
Connection closed by foreign host.

Also, if the first call the hosts_access succeeds, then all subequent 
calls will suceed.  I actually have to restart the daemon, and then 
have a deny condition in hosts.allow in order for the hosts_access 
call to bomb.

Any ideas?
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: hosts_access(3) - correct usage?

2003-10-29 Thread Dan Langille
On 29 Oct 2003 at 17:10, Guido van Rooij wrote:

> On Wed, Oct 29, 2003 at 09:38:50AM -0500, Dan Langille wrote:
> > Is this the right way to use hosts_access?  The code blows up during 
> > the hosts_access call.  I'm told it runs OK on Linux/Solaris.  I'm 
> > wonderding if there's something different it needs to do be doing on 
> > FreeBSD.
> > 
> > Thanks
> > 
> > #ifdef HAVE_LIBWRAP
> >   P(mutex);   /* hosts_access is not thread safe */
> >   request_init(&request, RQ_DAEMON, my_name, RQ_FILE, newsockfd, 
> > 0);
> >   fromhost(&request);
> >   if (!hosts_access(&request)) {
> >  V(mutex);
> >  Jmsg2(NULL, M_WARNING, 0, _("Connection from %s:%d refused 
> > by hosts.access"),
> >inet_ntoa(cli_addr.sin_addr), ntohs(cli_addr.sin_port));
> >  close(newsockfd);
> >  continue;
> >   }
> >   V(mutex);
> > #endif
> 
> 
> This seems okay to me.
> OpenSSH uses:
> struct request_info req;
>  
> request_init(&req, RQ_DAEMON, __progname, RQ_FILE, sock_in, 0);
> fromhost(&req);
>  
> if (!hosts_access(&req)) {
> debug("Connection refused by tcp wrapper");
> refuse(&req);
> /* NOTREACHED */
> fatal("libwrap refuse returns");
> }
> 
> I take it that newsockfd is the one returned from accept()?
> I'd try using a debug version of libwrap...

I was speaking with dwhite on IRC about this.  The application 
(sysutils/bacula) has a hacked version of tcpd.h for use with C++.  
This didn't have the #ifdef INET6 statements.  So I patched that up.  
But no difference in the results.

If hosts.allow is going to deny access, the crash occurs:
http://beta.freebsddiary.org/tmp/bacula-fd-gbd.success.html

If access is denied, this occurs:
http://beta.freebsddiary.org/tmp/bacula-fd-gbd.fails.html

I haven't looked into libwrap yet, but in case someone sees something 
obvious, I've posted the above.

thanks
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


hosts_access(3) - correct usage?

2003-10-29 Thread Dan Langille
Is this the right way to use hosts_access?  The code blows up during 
the hosts_access call.  I'm told it runs OK on Linux/Solaris.  I'm 
wonderding if there's something different it needs to do be doing on 
FreeBSD.

Thanks

#ifdef HAVE_LIBWRAP
  P(mutex);   /* hosts_access is not thread safe */
  request_init(&request, RQ_DAEMON, my_name, RQ_FILE, newsockfd, 
0);
  fromhost(&request);
  if (!hosts_access(&request)) {
 V(mutex);
 Jmsg2(NULL, M_WARNING, 0, _("Connection from %s:%d refused 
by hosts.access"),
   inet_ntoa(cli_addr.sin_addr), ntohs(cli_addr.sin_port));
 close(newsockfd);
 continue;
      }
      V(mutex);
#endif

-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: non-root process and PID files

2003-10-27 Thread Dan Langille
On Mon, 27 Oct 2003, Wes Peters wrote:

> On Monday 27 October 2003 07:31 am, Dan Langille wrote:
> > If a process starts up and does a setuid, should it be writing the
> > PID file before or after the setuid?
> >
> > Two methods exists AFAIK:
> >
> > 1 - write your PID immediately, and the file is chown root:wheel
> > 2 - write your PID to /var/run/myapp/myapp.pid where /var/run/myapp/
> > is chown myapp:myapp
> >
> > Of the two, I think #1 is cleaner as it does not require another
> > directory with special permissions.
> >
> > Any suggestions?
>
> Create the pid file while still root, and if you are going to change the
> user or group id, chown(2) or chgrp(2) the file just before setuid(2) /
> setgid(2) calls.

I'm told that this leaves you open to a symlink attack.  If you leave the
file chown root:wheel, then if an attacker does gain control of the
application, they can't change the PID file.  The key point is the app is
root when writing the PID file.  If the attacker symlinks the PID to
something else (e.g. /etc/fstab), then that's when the fun starts.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: non-root process and PID files

2003-10-27 Thread Dan Langille
On 27 Oct 2003 at 17:39, Oliver Eikemeier wrote:

> Dan Langille wrote:
> 
> > If a process starts up and does a setuid, should it be writing the 
> > PID file before or after the setuid?
> > 
> > Two methods exists AFAIK:
> > 
> > 1 - write your PID immediately, and the file is chown root:wheel
> > 2 - write your PID to /var/run/myapp/myapp.pid where /var/run/myapp/
> > is chown myapp:myapp
> > 
> > Of the two, I think #1 is cleaner as it does not require another 
> > directory with special permissions.
> 
> You may have problems removing the file on exit, though.

The plan was to not remove it.
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


non-root process and PID files

2003-10-27 Thread Dan Langille
If a process starts up and does a setuid, should it be writing the 
PID file before or after the setuid?

Two methods exists AFAIK:

1 - write your PID immediately, and the file is chown root:wheel
2 - write your PID to /var/run/myapp/myapp.pid where /var/run/myapp/
is chown myapp:myapp

Of the two, I think #1 is cleaner as it does not require another 
directory with special permissions.

Any suggestions?
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH] : libc_r/uthread/uthread_write.c

2003-10-06 Thread Dan Langille
On 6 Oct 2003 at 19:10, Daniel Eischen wrote:

> Is your mailer screwed up?  We're getting duplicates (a few
> days later).

I don't think so. Could they have been moderated?  What do the headers say?
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


testing for substrings in perl

2003-10-05 Thread Dan Langille
Hi,

I have a perl regex to test if a file resides under a particular
directory.  The test looks like this:

if ($filename =~ $directory) {
   # yes, this filename resides under directory
}

This is working for most cases.  However, it fails is the directory
contains a +.  For example:

$filename = 'ports/www/privoxy+ipv6/files/patch-src::addrlist.c';

$match = "^/?" . 'ports/www/privoxy+ipv6' . "/";
if ($filename =~ $match) {
   print "found\n";
} else{
   print "NOT found\n";
}

Yes, I can escapte the + in the directory name, but then I'd have to test
for all those special regex characters and escape them too.

I think it might just be easier to do a straight comparison of the first N
characters of the two strings where N = length of the directory name.

Any suggestions?

thanks
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH] : libc_r/uthread/uthread_write.c

2003-10-04 Thread Dan Langille
On 4 Oct 2003 at 10:17, Daniel Eischen wrote:

> On Mon, 29 Sep 2003, Dan Langille wrote:
> > 
> > All our testing on this patch has been successful.  I'm going to do a 
> > few more tests on different hardware under 4.8-stable.
> > 
> > What's the next step?  Commit it?  Get others to test with it first?  
> 
> It's already in -current. 

Thanks for that commit.

> You'll have to wait for the code
> freeze to thaw in -stable before it goes in there.

Bugger... which means it won't be into 4.9-RELEASE.

-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH] : libc_r/uthread/uthread_write.c

2003-09-29 Thread Dan Langille
On 29 Sep 2003 at 9:02, Daniel Eischen wrote:

> On Mon, 29 Sep 2003, Dan Langille wrote:
> 
> > On 18 Sep 2003 at 7:50, Daniel Eischen wrote:
> > 
> > > 
> > > Right, this seems correct to me.
> > 
> > All our testing on this patch has been successful.  I'm going to do a 
> > few more tests on different hardware under 4.8-stable.
> > 
> > What's the next step?  Commit it?  Get others to test with it first?  
> 
> Sure, it looks good enough to commit.

Good.  I'd commit it, but.

> > > > The problem  found when running under pthreads on 4.8-stable [i.e. 
> > > > EOT is not returned to the application code] is not found with libkse 
> > > > on 5.1-current.
> > 
> > FWIW: our regression tests are failing under 5.1 and we suspect that 
> > MTIOCERRSTAT ioctl() has changed since 4.8.  We're getting:
> > 
> > btape: dev.c:1119 Doing MTIOCERRSTAT errno=22 ERR=Invalid argument
> > 
> > We'll continue with our 5.1 work, but we'd like to finish up with 4.8 
> > ASAP.
> 
> Well, I can commit it to -current first, then it can go into
> -stable.  I'm not sure about the ioctl, though.

OK, please do commit to -current.  How long do you think is an 
appropriate delay until MFC?  7 days?   

-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH] : libc_r/uthread/uthread_write.c

2003-09-29 Thread Dan Langille
On 18 Sep 2003 at 7:50, Daniel Eischen wrote:

> On Wed, 17 Sep 2003, Dan Langille wrote:
> 
> > On 16 Sep 2003 at 20:49, Daniel Eischen wrote:
> > 
> > > On Tue, 16 Sep 2003, Dan Langille wrote:
> > > 
> > > > I've had preliminary success with this patch.  More testing needs 
> > > > to be done, but in the meantime, I would appreciate reviews and 
> > > > comments.  The patched code is available from
> > > > http://beta.freebsddiary.org/tmp/uthread_write.c and the patch
> > > > appears below.
> > > > 
> > > > In short, the logic has been changed to ensure that if __sys_write
> > > > returns zero, this value is returned by _write.
> > > 
> > > I think this is not quite correct.  Since libc_r is looping
> > > and some data may have been read, then the partial byte count
> > > should be returned, not zero.  It is possible the partial byte
> > > count could also be zero in some cases, so it would result
> > > in zero being returned in those instances.
> > 
> > I see what you mean. Please have a look at 
> > http://beta.freebsddiary.org/tmp/uthread_write.c2
> > The patch appears at the end of this message.
> 
> Right, this seems correct to me.

All our testing on this patch has been successful.  I'm going to do a 
few more tests on different hardware under 4.8-stable.

What's the next step?  Commit it?  Get others to test with it first?  

> > > I think the problem lies with the SCSI tape device. It should
> > > either return 0 or -1 with errno=ENOSPC on a write that detects
> > > an EOT, not partial byte count.
> > 
> > You are referring to sa(4)?
> 
> Yes.
> 
> > > If you are using libkse or
> > > libthr, you will get a partial byte count and not zero because
> > > the tape driver returns the (partial) bytes written.  So exiting
> > > the loop in libc_r and returning 0 would only seem to correct
> > > the "problem" for libc_r.
> 
> If there is a difference, it could be because libc_r is using non-blocking
> IO behind the scenes, and sa(4) may be returning partial byte count
> in the non-blocking case and 0 (or -1 and ENOSPC) in the blocking case
> (which is what you'd get using libkse/libthr).
> 
> > The problem  found when running under pthreads on 4.8-stable [i.e. 
> > EOT is not returned to the application code] is not found with libkse 
> > on 5.1-current.

FWIW: our regression tests are failing under 5.1 and we suspect that 
MTIOCERRSTAT ioctl() has changed since 4.8.  We're getting:

btape: dev.c:1119 Doing MTIOCERRSTAT errno=22 ERR=Invalid argument

We'll continue with our 5.1 work, but we'd like to finish up with 4.8 
ASAP.
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH] : libc_r/uthread/uthread_write.c

2003-09-19 Thread Dan Langille
On 19 Sep 2003 at 2:24, Terry Lambert wrote:

> Daniel Eischen wrote:
> > > > If you are using libkse or
> > > > libthr, you will get a partial byte count and not zero because
> > > > the tape driver returns the (partial) bytes written.  So exiting
> > > > the loop in libc_r and returning 0 would only seem to correct
> > > > the "problem" for libc_r.
> > 
> > If there is a difference, it could be because libc_r is using non-blocking
> > IO behind the scenes, and sa(4) may be returning partial byte count
> > in the non-blocking case and 0 (or -1 and ENOSPC) in the blocking case
> > (which is what you'd get using libkse/libthr).
> 
> I would think that for non-block multiple and/or non-block-aligned
> writes, there's no way to avoid the fault-in penalty for the need
> to do read-before-write, so there will always be some unavoidable
> stalls.

My issue does not concern stalls.  It concerns lost data bacause EOT 
of not correctly signalled.  See http://www.freebsd.org/cgi/query-
pr.cgi?pr=56274.

But if I've missed the point, could someone please provide a Terry-
English translation?  I tried http://babelfish.altavista.com/ but had 
no succeess.
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH] : libc_r/uthread/uthread_write.c

2003-09-17 Thread Dan Langille
On 16 Sep 2003 at 20:49, Daniel Eischen wrote:

> On Tue, 16 Sep 2003, Dan Langille wrote:
> 
> > I've had preliminary success with this patch.  More testing needs 
> > to be done, but in the meantime, I would appreciate reviews and 
> > comments.  The patched code is available from
> > http://beta.freebsddiary.org/tmp/uthread_write.c and the patch
> > appears below.
> > 
> > In short, the logic has been changed to ensure that if __sys_write
> > returns zero, this value is returned by _write.
> 
> I think this is not quite correct.  Since libc_r is looping
> and some data may have been read, then the partial byte count
> should be returned, not zero.  It is possible the partial byte
> count could also be zero in some cases, so it would result
> in zero being returned in those instances.

I see what you mean. Please have a look at 
http://beta.freebsddiary.org/tmp/uthread_write.c2
The patch appears at the end of this message.

This version will return the partial byte count (which has always 
been zero in testing) but exit the loop if the return code is zero.

> I think the problem lies with the SCSI tape device. It should
> either return 0 or -1 with errno=ENOSPC on a write that detects
> an EOT, not partial byte count.

You are referring to sa(4)?

> If you are using libkse or
> libthr, you will get a partial byte count and not zero because
> the tape driver returns the (partial) bytes written.  So exiting
> the loop in libc_r and returning 0 would only seem to correct
> the "problem" for libc_r.

The problem  found when running under pthreads on 4.8-stable [i.e. 
EOT is not returned to the application code] is not found with libkse 
on 5.1-current.

--- uthread_write.c Wed Sep 17 06:23:43 2003
+++ uthread_write.c.org Tue Sep 16 12:14:22 2003
@@ -39,7 +39,6 @@
 #include 
 #include 
 #include "pthread_private.h"
-#include 
 
 ssize_t
 _write(int fd, const void *buf, size_t nbytes)
@@ -71,10 +70,6 @@
/* Check if file operations are to block */
blocking = ((_thread_fd_getflags(fd) & O_NONBLOCK) == 0);
 
-   setlogmask (LOG_UPTO (LOG_NOTICE));
-   openlog("uthread_write.c", LOG_CONS | LOG_PID | LOG_NDELAY, 
LOG_LOCAL1);
-   syslog (LOG_NOTICE, "uthread_write.c : blocking = '%d'", 
blocking);
-
/*
 * Loop while no error occurs and until the expected number
 * of bytes are written if performing a blocking write:
@@ -98,7 +93,7 @@
 * write:
 */
if (blocking && ((n < 0 && (errno == EWOULDBLOCK ||
-   errno == EAGAIN)) || (n > 0 && num < nbytes))) {
+   errno == EAGAIN)) || (n >= 0 && num < nbytes))) {
curthread->data.fd.fd = fd;
_thread_kern_set_timeout(NULL);
 
@@ -136,16 +131,11 @@
 * If there was an error, return partial success
 * (if any bytes were written) or else the error:
 */
-   } else if (n <= 0) {
+   } else if (n < 0) {
if (num > 0)
ret = num;
else
ret = n;
-
-   if (n == 0) {
-   syslog (LOG_NOTICE, "zero has been returned in 
uthread_write.c; 
num = '%d'", num); 
-   break;
-   }
 
/* Check if the write has completed: */
} else if (num >= nbytes)

-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


[PATCH] : libc_r/uthread/uthread_write.c

2003-09-16 Thread Dan Langille
I've had preliminary success with this patch.  More testing needs 
to be done, but in the meantime, I would appreciate reviews and 
comments.  The patched code is available from
http://beta.freebsddiary.org/tmp/uthread_write.c and the patch
appears below.

In short, the logic has been changed to ensure that if __sys_write
returns zero, this value is returned by _write.

The syslog calls are just for debugging and will be removed.

Thank you.

--- uthread_write.c.org Tue Sep 16 12:14:22 2003
+++ uthread_write.c Tue Sep 16 16:38:02 2003
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include "pthread_private.h"
+#include 
 
 ssize_t
 _write(int fd, const void *buf, size_t nbytes)
@@ -93,7 +94,7 @@
 * write:
 */
if (blocking && ((n < 0 && (errno == EWOULDBLOCK ||
-   errno == EAGAIN)) || (n >= 0 && num < nbytes))) {
+   errno == EAGAIN)) || (n > 0 && num < nbytes))) {
curthread->data.fd.fd = fd;
_thread_kern_set_timeout(NULL);
 
@@ -136,6 +137,15 @@
ret = num;
else
ret = n;
+
+   } else if (n == 0) {
+   ret = 0;
+   if (n == 0) {
+   setlogmask (LOG_UPTO (LOG_NOTICE));
+   openlog("uthread_write.c", LOG_CONS | LOG_PID 
| LOG_NDELAY, 
LOG_LOCAL1);
+   syslog (LOG_NOTICE, "zero has been returned in 
uthread_write.c; 
num = '%d'", num); 
+   }
+   break;
 
/* Check if the write has completed: */
} else if (num >= nbytes)

-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Any workarounds for Verisign .com/.net highjacking?

2003-09-16 Thread Dan Langille
On 16 Sep 2003 at 10:23, Clifton Royston wrote:

>   In the meantime I'm trying to figure out if there's some simple hack
> to disregard these wildcard A records, short of requesting zone
> transfers of the root nameservers (e.g. via peering with
> f.root-servers.net) and purging those records out of the zone before
> loading it.  Any ideas, either under djbdns or Bind 9?

Sorry, only for bind8, as was posted to my local LUG list:

http://achurch.org/bind-verisign-patch.html
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: comments on proposed uthread_write.c changes

2003-09-08 Thread Dan Langille
On 7 Sep 2003 at 19:40, Dan Langille wrote:

> On 7 Sep 2003 at 12:32, Daniel Eischen wrote:
> 
> > On Sun, 7 Sep 2003, Dan Langille wrote:
> > 
> > > A problem with pthreads and EOT has been identified.  See PR 56274.  It
> > > was suggested the solution was probably just a matter of changing one of
> > > the >0 tests to >=0 in uthread_write.c
> > > 
> > > Any comments on that?
> > 
> > I don't know that a return of 0 isn't valid for other devices.
> > If this is the case, a return of 0 for blocking writes may break
> > other applications.
> > 
> > The patch isn't quite correct (at least looking at -current srcs).
> > Lines 98-99 are:
> > 
> > if (blocking && ((n < 0 && (errno == EWOULDBLOCK ||
> > errno == EAGAIN)) || (n >= 0 && num < nbytes))) {
> > 
> > This will get entered first if n == 0, and I don't think your
> > proposed patch would have any effect.  I think you would have
> > to change the "n >= 0" above to be "n > 0" in conjunction with
> > your patch.
> 
> Ahh thank you.  That explains why the test results with the original 
> patch did not differ from -STABLE or 5.1-RELEASE.  After adding your 
> suggestions, we have had success.

Oh I was wrong, very wrong.  The test code I ran had not been 
compiled with pthreads.  Kern found my mistake after he was unable to 
reproduce my [false] results.

It appears the problem is not with uthread_write.c... Or at least not 
in the areas we are changing.

Suggestions?
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: comments on proposed uthread_write.c changes

2003-09-07 Thread Dan Langille
On 7 Sep 2003 at 12:32, Daniel Eischen wrote:

> On Sun, 7 Sep 2003, Dan Langille wrote:
> 
> > A problem with pthreads and EOT has been identified.  See PR 56274.  It
> > was suggested the solution was probably just a matter of changing one of
> > the >0 tests to >=0 in uthread_write.c
> > 
> > Any comments on that?
> 
> I don't know that a return of 0 isn't valid for other devices.
> If this is the case, a return of 0 for blocking writes may break
> other applications.
> 
> The patch isn't quite correct (at least looking at -current srcs).
> Lines 98-99 are:
> 
>   if (blocking && ((n < 0 && (errno == EWOULDBLOCK ||
>   errno == EAGAIN)) || (n >= 0 && num < nbytes))) {
> 
> This will get entered first if n == 0, and I don't think your
> proposed patch would have any effect.  I think you would have
> to change the "n >= 0" above to be "n > 0" in conjunction with
> your patch.

Ahh thank you.  That explains why the test results with the original 
patch did not differ from -STABLE or 5.1-RELEASE.  After adding your 
suggestions, we have had success.

The points to note:

1. The status that stopped the writing was 0
2. It wrote 17,256 blocks, and read 17,256 blocks.

Point 1 is key to determining EOT.  Point 2 is what you always want 
to have...

[EMAIL PROTECTED]:~/tape-test] $ sudo ./tapetest /dev/nsa0
*rewind
Rewound /dev/nsa0
*rawfill
Begin writing blocks of 64512 bytes.


+
weof_dev
Wrote EOF to /dev/nsa0
Write failed.  Last block written=17256. stat=0 ERR=Unknown error: 0
*rewind
Rewound /dev/nsa0
*scan
Starting scan at file 0
17256 blocks of 64512 bytes in file 0
End of File mark.
End of File mark.
End of tape
Total files=1, blocks=17256, bytes = 1113219072
*

> This could be solved at the application level by selecting on
> the tape device and performing non-blocking writes to it.  Since
> the application knows that a return of 0 is end-of-tape, it
> must also know the difference between talking to a tape device
> and talking to a regular file, socket, etc.

True.  But *if* the code is wrong, it should be fixed.

FWIW, the patch follows.  As always, opinions and suggestions are 
welcome.

--- uthread_write.c.org Sun Sep  7 10:58:31 2003
+++ uthread_write.c Sun Sep  7 15:41:34 2003
@@ -93,7 +93,7 @@
 * write:
 */
if (blocking && ((n < 0 && (errno == EWOULDBLOCK ||
-   errno == EAGAIN)) || (n >= 0 && num < nbytes))) {
+   errno == EAGAIN)) || (n > 0 && num < nbytes))) {
curthread->data.fd.fd = fd;
_thread_kern_set_timeout(NULL);
 
@@ -131,7 +131,7 @@
 * If there was an error, return partial success
 * (if any bytes were written) or else the error:
 */
-   } else if (n < 0) {
+   } else if (n <= 0) {
if (num > 0)
ret = num;
else

-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


comments on proposed uthread_write.c changes

2003-09-07 Thread Dan Langille
A problem with pthreads and EOT has been identified.  See PR 56274.  It
was suggested the solution was probably just a matter of changing one of
the >0 tests to >=0 in uthread_write.c

Any comments on that?

Here's a diff I came up with after looking at
src/lib/libc_r/uthreaduthread_write.c.  Any suggestions/comments?

I plan to apply and test this later in the week.

--- uthread_write.c Sun Sep  7 11:01:13 2003
+++ uthread_write.c.org Sun Sep  7 10:58:31 2003
@@ -131,7 +131,7 @@
 * If there was an error, return partial success
 * (if any bytes were written) or else the error:
 */
-   } else if (n <= 0) {
+   } else if (n < 0) {
if (num > 0)
ret = num;
else
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Is tar doing the right thing here?

2003-08-17 Thread Dan Langille
Why is this message not being suppressed?

$ tar -czf test.tgz / 2>&1 > /dev/null
tar: Removing leading `/' from member names

And I don't really want to use the -P option.

[Please cc me on all replies; thanks]
-- 
Dan Langille : http://www.langille.org/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: why does this sendmail connection take so long?

2002-08-29 Thread Dan Langille

On 29 Aug 2002 at 11:50, Gregory Neil Shapiro wrote:

> dan> I am using ipf with "pass out from any to any/pass out from any to 
> dan> any".
> 
> Unfortunately, I use ipfw/ip6fw so I don't know if my guesses are correct.
> 
> That rule only appears to handle outbound connections (therefore allowing
> the sendmail client to open an outbound connection to the localhost
> sendmail server).  It does not allow for inbound connections (thereby
> allowing the incoming connection).  Perhaps what you need is also:
> 
> echo 'pass in quick on lo0' > /etc/ipf6.rules
> echo 'pass out quick on lo0' >> /etc/ipf6.rules
> ipf -6 -f /etc/ipf6.rules
> 
> Note the -6 for the IPv6 rules (which appear to be kept separate from the
> IPv4 rules).
> 
> Again, I'm just guessing at ipf usage but you get the idea (I hope).

You guessed very well.  Making the above changes fixed the problem.  
And I didn't know about the -6 switch on ipf.  Applying the same 
solution to another box (also running ipf and having similar 
problems).

Thank you for your time and efforts.
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: why does this sendmail connection take so long?

2002-08-29 Thread Dan Langille

On 29 Aug 2002 at 11:27, Gregory Neil Shapiro wrote:

> That explains it.  You have a record pointing localhost.example.org at ::1
> but your sendmail daemon isn't listening for IPv6 connections and worse yet
> your host appears to drop instead of reject connection attempts.  My guess
> is you have IP firewalling enabled (either IPFW or IPF) and default to drop
> or have ip6fw or ipf rulesets that effectively to do the same.

I am using ipf with "pass out from any to any/pass out from any to 
any".

FWIW: in this case localhost.example.org is the DNS server for my 
private LAN.
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: why does this sendmail connection take so long?

2002-08-29 Thread Dan Langille
LINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<[EMAIL PROTECTED]> SIZE=9
250 2.1.0 <[EMAIL PROTECTED]>... Sender ok
>>> RCPT To:<[EMAIL PROTECTED]>
>>> DATA
250 2.1.5 <[EMAIL PROTECTED]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 g7TIDVRq084370 Message accepted for delivery
[EMAIL PROTECTED] Sent (g7TIDVRq084370 Message accepted for 
delivery)
Closing connection to localhost.example.org.
>>> QUIT
221 2.0.0 xeon.example.org closing connection
[dan@xeon:/etc/namedb] $

Thank you.
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: why does this sendmail connection take so long?

2002-08-29 Thread Dan Langille
  ; refresh
30M ; retry
4w2d; expiry
1D ); minimum

;; rcode = 0, ancount=0
;; res_querydomain(xeon, example.org, 1, 28)
;; res_query(xeon.example.org, 1, 28)
;; res_mkquery(0, xeon.example.org, 1, 28)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26790
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;  xeon.example.org, type = , class = IN
;; Querying server (# 1) address = 127.0.0.1
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26790
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 
0
;;  xeon.example.org, type = , class = IN
example.org. 1D IN SOA   ns1.example.org. 
soa.example.com. (
2002082901  ; serial
3H  ; refresh
30M ; retry
4w2d; expiry
1D ); minimum

;; rcode = 0, ancount=0
;; res_querydomain(xeon, , 1, 28)
;; res_query(xeon, 1, 28)
;; res_mkquery(0, xeon, 1, 28)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26791
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;  xeon, type = , class = IN
;; Querying server (# 1) address = 127.0.0.1
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 26791
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;;  xeon, type = , class = IN
.   2h26m42s IN SOA  A.ROOT-SERVERS.NET. 
NSTLD.VERISIGN-GRS.COM. (
2002082900  ; serial
30M ; refresh
15M ; retry
1W  ; expiry
1D ); minimum

;; rcode = 3, ancount=0


***delay occurs here...


;; res_querydomain(xeon.example.org., , 1, 1)
;; res_query(xeon.example.org, 1, 1)
;; res_mkquery(0, xeon.example.org, 1, 1)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26792
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;  xeon.example.org, type = A, class = IN
;; Querying server (# 1) address = 127.0.0.1
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26792
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 
1
;;  xeon.example.org, type = A, class = IN
xeon.example.org.1M IN A 192.168.0.18
example.org. 1M IN NSxeon.example.org.org.
xeon.example.org.org.  14m47s IN A  127.0.0.1
220 xeon.example.org ESMTP Sendmail 8.12.5/8.12.5; Thu, 29 Aug 2002 
13:36:28 -0400 (EDT)
>>> EHLO xeon.example.org
250-xeon.example.org Hello xeon [192.168.0.18], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<[EMAIL PROTECTED]> SIZE=9
250 2.1.0 <[EMAIL PROTECTED]>... Sender ok
>>> RCPT To:<[EMAIL PROTECTED]>
>>> DATA
250 2.1.5 <[EMAIL PROTECTED]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 g7THaSRq079062 Message accepted for delivery
[EMAIL PROTECTED] Sent (g7THaSRq079062 Message accepted for 
delivery)
Closing connection to xeon.example.org.
>>> QUIT
221 2.0.0 xeon.example.org closing connection
[dan@xeon:~] $

Thank you.
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: why does this sendmail connection take so long?

2002-08-29 Thread Dan Langille

On 28 Aug 2002 at 16:43, Terry Lambert wrote:

> Dan Langille wrote:
> > I've tested this from several boxes behind my firewall each time
> > emailing to a box outside the firewall.  The test was:
> > 
> >echo 'hi there'  | mail [EMAIL PROTECTED]
> 
> echo 'hi there'  | mail -v [EMAIL PROTECTED]
> 
> ?

After issuing the above command, there is a 75s delay (see below for 
delay location).  All subsequent lines appear without delay. At the 
end of this message, I've issued the commands by hand.  No delays 
occur.

[dan@xeon:~] $ echo 'hi there'  | mail -v [EMAIL PROTECTED]
[EMAIL PROTECTED] Connecting to localhost.example.org. via 
relay...



220 xeon.example.org ESMTP Sendmail 8.12.5/8.12.5; Thu, 29 Aug 2002 
08:32:14 -0400 (EDT)
>>> EHLO xeon.example.org
250-xeon.example.org Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<[EMAIL PROTECTED]> SIZE=34
250 2.1.0 <[EMAIL PROTECTED]>... Sender ok
>>> RCPT To:<[EMAIL PROTECTED]>
>>> DATA
250 2.1.5 <[EMAIL PROTECTED]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 g7TCWERq037402 Message accepted for delivery
[EMAIL PROTECTED] Sent (g7TCWERq037402 Message accepted for 
delivery)
Closing connection to localhost.example.org.
>>> QUIT
221 2.0.0 xeon.example.org closing connection
220 xeon.example.org ESMTP Sendmail 8.12.5/8.12.5; Thu, 29 Aug 2002 
08:32:30 -0400 (EDT)
>>> EHLO xeon.example.org
250-xeon.example.org Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<[EMAIL PROTECTED]> SIZE=37
250 2.1.0 <[EMAIL PROTECTED]>... Sender ok
>>> RCPT To:<[EMAIL PROTECTED]>
>>> DATA
250 2.1.5 <[EMAIL PROTECTED]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 g7TCWURq037483 Message accepted for delivery
[EMAIL PROTECTED] Sent (g7TCWURq037483 Message accepted for 
delivery)
Closing connection to localhost.example.org.
>>> QUIT
221 2.0.0 xeon.example.org closing connection
You have new mail in /var/mail/dan
[dan@xeon:~] $ telnet m20.example.org 25
Trying 216.187.106.227...
Connected to m20.example.org.
Escape character is '^]'.
220 m20.example.org ESMTP Postfix
MAIL From:<[EMAIL PROTECTED]>
503 Error: send HELO/EHLO first
^C^]
telnet> quit
Connection closed.
[dan@xeon:~] $ telnet m20.example.org 25
Trying 216.187.106.227...
Connected to m20.example.org.
Escape character is '^]'.
220 m20.example.org ESMTP Postfix
EHLO xeon.example.org
250-m20.example.org
250-PIPELINING
250-SIZE 1024
250-ETRN
250-XVERP
250 8BITMIME
MAIL From:<[EMAIL PROTECTED]> SIZE=37
250 Ok
RCPT To:<[EMAIL PROTECTED]>
250 Ok
DATA
354 End data with .

.
250 Ok: queued as A62127A11
QUIT
221 Bye
Connection closed by foreign host.
[dan@xeon:~] $

-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: why does this sendmail connection take so long?

2002-08-28 Thread Dan Langille

On 22 Aug 2002 at 18:28, Michael Scheidell wrote:

> - Original Message -
> From: ""Dan Langille"" <[EMAIL PROTECTED]>
> Newsgroups: local.freebsd.hackers
> Sent: Thursday, August 22, 2002 1:41 PM
> Subject: why does this sendmail connection take so long?
> 
> 
> > I'd normally attribute this problem to DNS, but I can't track down
> > what DNS problem is occuring.  Note the lag between the first event
> > and the next. Any suggestions?
> 
> might be identd (port 113)

After some testing, I'm inclined to think it's not ident.  The 
network in question is behind a firewall which is doing NAT.  Two 
boxes do not exibit the problem. Two do.  All are FreeBSD 4.6-stable 
created from same source snapshot.

I've tested this from several boxes behind my firewall each time 
emailing to a box outside the firewall.  The test was:

   echo 'hi there'  | mail [EMAIL PROTECTED]

The two boxes which exibit the probem are the DNS server and the 
firewall.  Mail sent from those boxes exhibit identical delays, 
namely a 75 second lag between the first and second event (see below 
for an example; note that I've changed the real domain to 
example.org).  I'm not sure whether this indicates a problem on the 
sending or receiving end.  I suspect sending.  But what the problem 
is I'm not sure yet.

I've been running "tcpdump -i lo0 port 53" to see if I could find 
anything suspect in there, but I didn't.  BTW, what would I be 
looking for if the above delay is caused by DNS?

Thanks.

Aug 28 12:07:24 xeon sendmail[66323]: g7SG7O7G066323: from=dan, 
size=37, class=0, nrcpts=1, 
msgid=<[EMAIL PROTECTED]>, 
relay=dan@localhost

Aug 28 12:08:39 xeon sm-mta[66507]: g7SG8dvj066507: 
from=<[EMAIL PROTECTED]>, size=351, class=0, nrcpts=1, 
msgid=<[EMAIL PROTECTED]>, proto=ESMTP, 
daemon=MTA, relay=localhost [127.0.0.1]

Aug 28 12:08:40 xeon sendmail[66323]: g7SG7O7G066323: 
[EMAIL PROTECTED], ctladdr=dan (1000/1000), delay=00:01:16, 
xdelay=00:01:16, mailer=relay, pri=30028, 
relay=localhost.example.org. [127.0.0.1], dsn=2.0.0, stat=Sent 
(g7SG8dvj066507 Message accepted for delivery)

Aug 28 12:08:42 xeon sm-mta[66509]: g7SG8dvj066507: 
to=<[EMAIL PROTECTED]>, ctladdr=<[EMAIL PROTECTED]> (1000/1000), 
delay=00:00:03, xdelay=00:00:02, mailer=esmtp, pri=30342, 
relay=m20.example.org. [216.187.106.227], dsn=2.0.0, stat=Sent (Ok: 
queued as 169F57A11)
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: serial console com1 to com1 == login race condition?

2002-08-09 Thread Dan Langille

On 9 Aug 2002 at 13:14, Brandon D. Valentine wrote:

> My
> question to Dan is, is there a reason you can't have two null modem
> cables strung between these machines?

No, not AFAIK.  I am guessing that both boxes have two com ports.  I 
posted my original question because my contact at the colocation 
added a single crossover serial cable after both machines recently 
had sshd die[1] on them during concurrent make worlds[2].  Given the 
time zone differences, I wanted to explore possibilities before 
requesting a second cable and to prepare myself for the questions I 
expect him to have in reply.

Thanks folks.

[1] -  
http://www.freebsd.org/cgi/getmsg.cgi?fetch=88296+0+current/freebsd-
stable
[2] - I won't be doing that again.  Once the serial consoles are in 
place, I'll be upgrading them one at a time.
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: serial console com1 to com1 == login race condition?

2002-08-09 Thread Dan Langille

On 9 Aug 2002 at 12:27, James Housley wrote:

> Dan Langille wrote:
> > I have two remote boxes.  My colocation hosts have strung a crossover 
> > serial cable from com1 to com1 on these boxes.  The idea is that if I 
> > paint myself into a corner on one box, I can get access to it from 
> > the other box via the serial cable.
> > 
> > But...
> > 
> > I will need to set up serial consoles on each box in advance of a 
> > problem arising.  But won't I get a race condition with each box 
> > thinking the other is trying to login?
> > 
> > [1] - my apologies to those with whom I have already discussed this 
> > issue.
> 
> One option is com1 to com2 .  It takes 2 cable, but if ttyd1 (com2) 
> doesn't have getty running then the race won't exist.

I was trying to avoid the second cable.   Mainly because a non-BSD 
person suggested the cable which is now there, and I didn't want to 
go back and say sorry, I need a second cable... Yes, it's just ego... 
Unless of course, he's forgotten that I'd have to setup the serial 
consoles in advance of a problem arising.
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



serial console com1 to com1 == login race condition?

2002-08-09 Thread Dan Langille

I have two remote boxes.  My colocation hosts have strung a crossover 
serial cable from com1 to com1 on these boxes.  The idea is that if I 
paint myself into a corner on one box, I can get access to it from 
the other box via the serial cable.

But...

I will need to set up serial consoles on each box in advance of a 
problem arising.  But won't I get a race condition with each box 
thinking the other is trying to login?

[1] - my apologies to those with whom I have already discussed this 
issue.
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: The problem with FreeBSD

2002-06-18 Thread Dan Langille

On 18 Jun 2002 at 10:21, Christopher Schulte wrote:

> At 08:39 AM 6/18/2002 +, Bill Flamerola wrote:
> >Okay, this is not really intended as a flame, but kinda necessary, given
> >the current situation in the FreeBSD camp.
> 
> OMG R U SERIOUS?  Thx for the warning, I'll ditch FreeBSD and load NetBSD
> right now.

I wonder if NetBSDDiary is available...
-- 
Dan Langille


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



mpd for pptp - can't connect

2002-06-13 Thread Dan Langille
: phase shift AUTHENTICATE --> ESTABLISH
[vpn] LCP: rec'd Configure Reject #2 link 0 (Req-Sent)
 AUTHPROTO CHAP MSOFTv2
[vpn] LCP: SendConfigReq #3
 ACFCOMP
 PROTOCOMP
 MRU 1500
 MAGICNUM b6073a2a
[vpn] LCP: rec'd Configure Request #4 link 0 (Req-Sent)
 AUTHPROTO CHAP MSOFTv2
 MAGICNUM 17b425d5
 PROTOCOMP
 ACFCOMP
 ENDPOINTDISC [LOCAL] 71 35 8f ec 71 33 4c 72 b2 5e 3e c3 c4 1f 11 c5 00 
00 00 00
[vpn] LCP: SendConfigAck #4
 AUTHPROTO CHAP MSOFTv2
 MAGICNUM 17b425d5
 PROTOCOMP
 ACFCOMP
 ENDPOINTDISC [LOCAL] 71 35 8f ec 71 33 4c 72 b2 5e 3e c3 c4 1f 11 c5 00 
00 00 00
[vpn] LCP: state change Req-Sent --> Ack-Sent
pptp0: CID 0xbc51 in SetLinkInfo not found
[vpn] LCP: rec'd Configure Ack #3 link 0 (Ack-Sent)
 ACFCOMP
 PROTOCOMP
 MRU 1500
 MAGICNUM b6073a2a
[vpn] LCP: state change Ack-Sent --> Opened
[vpn] LCP: phase shift ESTABLISH --> AUTHENTICATE
[vpn] LCP: auth: peer wants CHAP, I want nothing
[vpn] LCP: LayerUp
[vpn] CHAP: rec'd CHALLENGE #0
 Name: "ROGERT"
 Using authname "dan"
[vpn] CHAP: sending RESPONSE
[vpn] CHAP: rec'd SUCCESS #0
 MESG: S=F5963AA507E1DECD8998FC50240CB9C088AF4DA9
[vpn] LCP: authorization successful
[vpn] LCP: phase shift AUTHENTICATE --> NETWORK
[vpn] up: 1 link, total bandwidth 64000 bps
[vpn] IPCP: Up event
[vpn] IPCP: state change Starting --> Req-Sent
[vpn] IPCP: SendConfigReq #1
 IPADDR 192.168.0.21
pptp0: CID 0xbc51 in SetLinkInfo not found
[vpn] IPCP: SendConfigReq #2
 IPADDR 192.168.0.21
[vpn] IPCP: SendConfigReq #3
 IPADDR 192.168.0.21
[vpn] IPCP: SendConfigReq #4
 IPADDR 192.168.0.21
[vpn] IPCP: SendConfigReq #5
 IPADDR 192.168.0.21
[vpn] IPCP: SendConfigReq #6
 IPADDR 192.168.0.21
[vpn] IPCP: SendConfigReq #7
 IPADDR 192.168.0.21
[vpn] IPCP: SendConfigReq #8
 IPADDR 192.168.0.21
[vpn] IPCP: SendConfigReq #9
 IPADDR 192.168.0.21
[vpn] IPCP: SendConfigReq #10
 IPADDR 192.168.0.21
[vpn] IPCP: state change Req-Sent --> Stopped
[vpn] IPCP: LayerFinish
[vpn] IPCP: parameter negotiation failed
[vpn] IPCP: LayerFinish
[vpn] bundle: CLOSE event in state OPENED
[vpn] closing link "vpn"...
[vpn] bundle: CLOSE event in state CLOSED
[vpn] closing link "vpn"...
[vpn] link: CLOSE event
[vpn] LCP: Close event
[vpn] LCP: state change Opened --> Closing
[vpn] LCP: phase shift NETWORK --> TERMINATE
[vpn] up: 0 links, total bandwidth 9600 bps
[vpn] IPCP: Down event
[vpn] IPCP: state change Stopped --> Starting
[vpn] IPCP: LayerStart
[vpn] closing link "vpn"...
[vpn] LCP: SendTerminateReq #4
[vpn] LCP: LayerDown
[vpn] bundle: OPEN event in state CLOSED
[vpn] opening link "vpn"...
[vpn] link: CLOSE event
[vpn] LCP: Close event
[vpn] link: CLOSE event
[vpn] LCP: Close event
[vpn] link: OPEN event
[vpn] LCP: Open event
[vpn] LCP: state change Closing --> Stopping
pptp0: CID 0xbc51 in SetLinkInfo not found
[vpn] LCP: rec'd Terminate Ack #4 link 0 (Stopping)
[vpn] LCP: state change Stopping --> Stopped
[vpn] LCP: phase shift TERMINATE --> ESTABLISH
[vpn] LCP: LayerFinish
[vpn] device: CLOSE event in state UP
pptp0-0: clearing call
[vpn] device is now in state CLOSING
[vpn] device: DOWN event in state CLOSING
[vpn] device is now in state DOWN
[vpn] link: DOWN event
[vpn] LCP: Down event
[vpn] LCP: state change Stopped --> Starting
[vpn] LCP: phase shift ESTABLISH --> DEAD
[vpn] LCP: LayerStart
[vpn] device: OPEN event in state DOWN
[vpn] pausing 7 seconds before open
[vpn] device is now in state DOWN
[vpn] device: OPEN event in state DOWN
[vpn] device is now in state DOWN
pptp0-0: peer call disconnected res=zero? err=none
pptp0-0: killing channel
pptp0: closing connection with 1.2.3.4:1723
pptp0: killing connection with 1.2.3.4:1723
-- 
Dan Langille


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: how to automagically restart net/pptpclient?

2002-06-13 Thread Dan Langille

On 28 May 2002 at 21:08, Lukas Ertl wrote:

> On Tue, 28 May 2002, Dan Langille wrote:
> 
> > That looks good.  I've tried it, but have been unable to connect to the
> > office, which is running an MS PPtP server.  I know the *can* work
> > because pptp-client can connect.

FWIW, here's what I'm running from cron every five minutes:

#!/bin/sh

ping -n -c 1 -t 2 10.0.1.249  2>&1 > /dev/null
if [ $? -ne 0 ]
then
   NETMASK=`ifconfig tun0 | grep -c netmask`
   if [ $NETMASK -eq 0 ]
   then
  echo "TUN0 is not healthy.  starting VPN again."
  /usr/local/etc/rc.d/pptp.sh start
   else
#  echo "TUN0 looks healthy"
   fi
else
#   echo "link is OK"
fi
-- 
Dan Langille


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: cvsup doesn't get me what I want

2002-06-07 Thread Dan Langille

On 6 Jun 2002 at 21:05, John Polstra wrote:

> In article <[EMAIL PROTECTED]>,
> Dan Langille <[EMAIL PROTECTED]> wrote:
> > On 4 Jun 2002 at 8:37, John Polstra wrote:
> > > I'll help you figure this out if you'll send me the following
> > > information:
> > 
> > Thanks John.
> > 
> > > 
> > > The cvsupd server config files for the collection ("releases"
> > > and the list file).
> > 
> > [dan@xeon:/home/repositories/sup/freshports-phpAds] $ less list.cvs
> > upgrade phpPgAds
> > [dan@xeon:/home/repositories/sup/freshports-phpAds] $ less releases
> > cvs list=list.cvs prefix=/home/repositories/freebsddiary
> 
> OK, this says the server is getting its files from
> "/home/repositories/freebsddiary".  But ...

That's the problem.  That should be /home/repositories/freshports-1

> > > The full pathname of the ChangeLog RCS file you used as your
> > > example, on the server machine.
> > 
> > /home/repositories/freshports-1/phpPgAds/ChangeLog,v

That's the wrong file I gave you, that should be this file:

/home/repositories/freebsddiary/phpPgAds/ChangeLog,v

> That is a different file!  It's under "/home/repositories/freshports-1",
> which is not where the "releases" file tells the server to look.

Once I fixed the releases file to point to the correct repo (DOH!), both 
tags worked (. and FreshPorts2).  That should have been my clue.   The 
collection exists in both repos but with different tags (and different 
customizations for each website).

Thank you John.  :)
-- 
Dan Langille


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



commit messages filtering / FreshSource

2002-06-04 Thread Dan Langille

I've just seen Matt Dillon's email on this topic 
([EMAIL PROTECTED]). I immediately thought 
about the overlap between two projects.  

FreshSource (http://www.FreshSource.org) will allow you to express 
interest in particular sections of the source tree.  Interest can be 
expressed on a file or directory level and placed on a watch list.  You 
will be emailed any commits which occur to items on your watch list (e.g. 
one email on a daily basis).  

Those familiar with FreshPorts will already be familiar with the service 
described above. FreshSource will behave similarly but will cover all 
commits, not just those in the ports tree.

-- 
Dan Langille


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: cvsup doesn't get me what I want

2002-06-04 Thread Dan Langille

On 4 Jun 2002 at 8:37, John Polstra wrote:

> In article <[EMAIL PROTECTED]>,
> Dan Langille <[EMAIL PROTECTED]> wrote:
> > Folks, I'm having trouble understanding this problem.  I'm trying to use
> > cvsup to get stuff onto my website.  This supfile gets things out of the
> > tree
> > 
> > $ less ~/phpAdsNew-supfile
> > *default host=xeon
> > *default base=/usr/websites/freshports
> > *default release=cvs
> > *default delete use-rel-suffix
> > *default umask=007
> > *default preserve
> > *default tag=.
> > freshports-phpAds
> > 
> > But what I really want is tag=FreshPorts2 but if I use that, I don't get
> > anything out of the repo.
> > 
> > The tags exist:
> > 
> > However, for example:
> > 
> > $ cvs stat -v ChangeLog
> > ===
> > File: ChangeLog Status: Up-to-date
> > 
> >Working revision:1.1.1.1 Tue Jun  4 01:01:32 2002
> >Repository revision: 1.1.1.1 /home/repositories/freshports-
> > 1/phpPgAds/ChangeLog,v
> >Sticky Tag:  FreshPorts2 (revision: 1.1.1.1)
> >Sticky Date: (none)
> >Sticky Options:  (none)
> > 
> >Existing Tags:
> > cvs (revision: 1.1.1.1)
> > FreshPorts2 (revision: 1.1.1.1)
> > 
> > 
> > I just don't get it.  Why doesn't tag=FreshPorts2 work?
> 
> You should get rid of the "preserve" keyword in your supfile.  It
> doesn't really make any sense when working in checkout mode.  But
> that's probably not the problem.
> 
> I'll help you figure this out if you'll send me the following
> information:

Thanks John.

> 
> The cvsupd server config files for the collection ("releases"
> and the list file).

[dan@xeon:/home/repositories/sup/freshports-phpAds] $ less list.cvs
upgrade phpPgAds
[dan@xeon:/home/repositories/sup/freshports-phpAds] $ less releases
cvs list=list.cvs prefix=/home/repositories/freebsddiary


> The full pathnames of the cvsupd server config files for the
> collection.

Is that obvioius form the pwd above?  

> The command line used to invoke cvsupd.

from /etc/inetd.conf:
cvspserverstream  tcp nowait  root/usr/bin/cvscvs --allow-
root=/home/repo --allow-root=/home/repositories/freebsddiary --allow-
root=/home/cvs-scripts --allow-root=/home/repositories/freshports-1  --
allow-root=/home/repositories/websites pserver

> The full pathname of the ChangeLog RCS file you used as your
> example, on the server machine.

/home/repositories/freshports-1/phpPgAds/ChangeLog,v

> The output of "rlog -h ChangeLog,v" on that file on the server.

[dan@xeon:/home/repositories/freshports-1/phpPgAds] $ rlog -h ChangeLog,v

RCS file: ChangeLog,v
Working file: ChangeLog
head: 1.1
branch: 1.1.1
locks: strict
access list:
symbolic names:
cvs: 1.1.1.1
FreshPorts2: 1.1.1.1
keyword substitution: kv
total revisions: 2

===
==


> The command line used to invoke cvsup on the client machine.

[dan@nezlok:/usr/websites/traffic] $ cvsup ~/phpAdsNew-supfile
Connected to localhost
Updating collection freshports-phpAds/cvs
Finished successfully
[dan@nezlok:/usr/websites/traffic] $



> The output of
>  find /usr/websites/freshports/sup -name 'refuse*'
> on the client machine.

$ find /usr/websites/freshports/sup -name 'refuse*'
find: /usr/websites/freshports/sup: No such file or directory
$ find /usr/websites/freshports.org/sup -name 'refuse*'
/usr/websites/freshports.org/sup/freshports-www/refuse
/usr/websites/freshports.org/sup/freshports-www/refuse~
/usr/websites/freshports.org/sup/freshports-config/refuse
$

refuse files from above in case they are useful:

$ less /usr/websites/freshports.org/sup/freshports-www/refuse
www/phorum

$ less /usr/websites/freshports.org/sup/freshports-config/refuse
configuration/phorum
configuration/phorum-3.3.2a/1.php
configuration/phorum-3.3.2a/2.php
configuration/phorum-3.3.2a/forums.php


> The output of "cvsup -v" on the client and "cvsupd -v" on the
> server.  Please be careful to ensure that your PATH is really
> finding the same copies of these programs that your cron job or
> other mechanism normally executes.

Client: $ cvsup -v
CVSup client, non-GUI version
Copyright 1996-2002 John D. Polstra
Software version: SNAP_16_1f
Protocol version: 17.0
Operating system: FreeBSD4
http://www.polstra.com/projects/freeware/CVSup/
Report problems to [EMAIL PROTECTED]
CV

cvsup doesn't get me what I want

2002-06-03 Thread Dan Langille

Folks, I'm having trouble understanding this problem.  I'm trying to use 
cvsup to get stuff onto my website.  This supfile gets things out of the 
tree

$ less ~/phpAdsNew-supfile
*default host=xeon
*default base=/usr/websites/freshports
*default release=cvs
*default delete use-rel-suffix
*default umask=007
*default preserve
*default tag=.
freshports-phpAds

But what I really want is tag=FreshPorts2 but if I use that, I don't get 
anything out of the repo.

The tags exist:

However, for example:

$ cvs stat -v ChangeLog
===
File: ChangeLog Status: Up-to-date

   Working revision:1.1.1.1 Tue Jun  4 01:01:32 2002
   Repository revision: 1.1.1.1 /home/repositories/freshports-
1/phpPgAds/ChangeLog,v
   Sticky Tag:  FreshPorts2 (revision: 1.1.1.1)
   Sticky Date: (none)
   Sticky Options:  (none)

   Existing Tags:
cvs (revision: 1.1.1.1)
FreshPorts2 (revision: 1.1.1.1)


I just don't get it.  Why doesn't tag=FreshPorts2 work?

cheers
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: how to automagically restart net/pptpclient?

2002-05-28 Thread Dan Langille

On 28 May 2002 at 9:32, Dominic Marks wrote:

> On Tue, May 28, 2002 at 12:57:52AM -0400, Dan Langille wrote:
> > I have installed net/pptpclient (1.0.3).  About 5 times a week, it dies
> > and must be restarted.  Does anyone have a script which checks and
> > restarts it if it has died?
> 
> You might like to try one of the other PPTP clients on offer. I
> switched from using pptpclient to mpd and think it is superior. This
> is all covered in the Handbook :)
> 
>  http://www.freebsd.org/handbook/pppoa.html

That looks good.  I've tried it, but have been unable to connect to the 
office, which is running an MS PPtP server.  I know the *can* work because 
pptp-client can connect.

Does anyone have a working configuration I can use as an example please?  
For what it's worth, I'm using this configuration (as stolen from 
/usr/local/etc/mpd/mpd.conf.sample).

vpn:
new -i ng1 vpn vpn
set iface disable on-demand
set iface addrs 192.168.0.20 10.0.1.18
set iface idle 0
set iface route 10.0.1.0/24
set pptp peer 1.2.3.4
set bundle disable multilink
set bundle authname me
set bundle password mypassword
set link yes acfcomp protocomp
set link no pap
set link yes chap
# If remote machine is NT you need this..
set link enable no-orig-auth
set link keep-alive 10 75
set ipcp no vjcomp
set ipcp ranges 192.168.0.20/32 10.0.1.18/32

where 1.2.3.4 is the public IP address of the office
192.168.0.20 is the internal NIC of my dual-homed gateway
10.0.1.0/24 is the interal office LAN
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



how to automagically restart net/pptpclient?

2002-05-27 Thread Dan Langille

I have installed net/pptpclient (1.0.3).  About 5 times a week, it dies 
and must be restarted.  Does anyone have a script which checks and 
restarts it if it has died?

FWIW: here's my ppp.conf.  From what I can tell, the redial does nothing.

And from what I know, the alias command is deprecated.  Guess I should be 
using -nat.

PONTEOTTAWA:
 set authname myname
 set authkey mypassword
 set timeout 0
 set ifaddr 0 0
 set redial 15 0
 add 10.0.1.0/24 HISADDR
 alias enable yes

And here is how it dies:

May 21 20:55:43 ns1 ppp[74801]: Phase: deflink: lcp -> open
May 21 20:55:43 ns1 ppp[74801]: Phase: bundle: Network
May 23 16:41:59 ns1 ppp[74801]: Phase: Signal 15, terminate.
May 23 16:41:59 ns1 ppp[74801]: Phase: Signal 15, terminate.
May 23 16:41:59 ns1 ppp[74801]: Phase: deflink: read (0): Got zero bytes
May 23 16:41:59 ns1 ppp[74801]: Phase: deflink: open -> lcp
May 23 16:41:59 ns1 ppp[74801]: Phase: bundle: Terminate
May 23 16:41:59 ns1 ppp[74801]: Phase: deflink: Disconnected!
May 23 16:41:59 ns1 ppp[74801]: Phase: deflink: Connect time: 157578 secs: 

5756166 octets in, 123806252 octets out
May 23 16:41:59 ns1 ppp[74801]: Phase: deflink: : 54244 packets in, 88738 
packets out
May 23 16:41:59 ns1 ppp[74801]: Phase:  total 822 bytes/sec, peak 63761 
bytes/sec on Thu May 23 16:41:59 2002
May 23 16:41:59 ns1 ppp[74801]: Phase: deflink: lcp -> closed
May 23 16:41:59 ns1 ppp[74801]: Phase: bundle: Dead
May 23 16:41:59 ns1 ppp[74801]: Phase: PPP Terminated (normal).

-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: remotely restoring over a live working system

2002-05-16 Thread Dan Langille

On 15 May 2002 at 14:55, Doug White wrote:

> On Wed, 15 May 2002, Dan Langille wrote:
> 
> > A disk in remote 4.5-stable box started to develop bad clusters.  The
> > hosting company replaced the drive for me.  I now have a 4.5-RELEASE
> > system (they have 4.5-RELEASE drives as stock items).
> >
> > The defective drive is almost mounted in this box.  I'm tempted to tar
> > the old disk over to the new disk and get everything back running that
> > way. It's that or upgrade to stable, install about 30 or so packages, and
> > manually configure everything.
> >
> > How feasible is copying from ad2 to ad0 given that I'm booting and
> > running off ad0?  My thoughts are that it's faster but higher risk.
> 
> Be careful spamming the existing files, if the tar keels over and eats, oh
> say, libc

Thanks Doug and Brandon.  I'm going the upgrade route.  I have tar'd an 
existing system to a secondary drive, but never the other way around.  
Sounds like unfun.

cheers
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



remotely restoring over a live working system

2002-05-15 Thread Dan Langille

A disk in remote 4.5-stable box started to develop bad clusters.  The 
hosting company replaced the drive for me.  I now have a 4.5-RELEASE 
system (they have 4.5-RELEASE drives as stock items).

The defective drive is almost mounted in this box.  I'm tempted to tar the 
old disk over to the new disk and get everything back running that way.  
It's that or upgrade to stable, install about 30 or so packages, and 
manually configure everything.

How feasible is copying from ad2 to ad0 given that I'm booting and running 
off ad0?  My thoughts are that it's faster but higher risk.

cheers
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



using cvsup to put the same collection in two places

2002-05-04 Thread Dan Langille

The objective: 

I want the same collection in two different places, but I want to use two 
different refuse files.  Some parts of the collection I don't want in one 
location. 


The background: 

I'm playing with phpAdsNew.  I've just imported it into my cvs tree for my 
website.  I use https to administer the site. As such, I'd prefer not to 
have the phpAdsNew/admin/ directory in the public section of the website. 

I'd like to be able to cvsup phpAdsNew to my website into two different 
locations (this I can do already) and have a refuse file for one and not 
for the other (this is where I'm failing). 


What I've tried: 

At present I have these two supfiles: 

This puts the collection in the https section of the website: less 
~/phpAdsAdmin-supfile *default host=localhost *default 
base=/home/freebsddiary/admin *default release=cvs tag=. *default delete 
use-rel-suffix *default umask=007 *default preserve fbsd-phpAds 

This puts the collection in the http section of the website: $ less 
~/phpAds-supfile *default host=localhost *default base=/home/freebsddiary 
*default release=cvs tag=. *default delete use-rel-suffix *default 
umask=007 *default preserve fbsd-phpAds 

Normally a refuse file would go into  /home/freebsddiary/sup/ where 
col is the name of the collection (in this case it's fbsd-phpAds).  With 
the above setup I can have only one refuse file.  I need two.  So I tried 
creating a second collection (fbsd-phpAdsAdmin) which merely pointed at 
the original collection.  Sadly, this didn't create a 
/home/freebsddiary/sup/phpAdsAdmin as I hoped. 

Any clues?  Thanks. 
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



php regex needed for PR numbers

2002-04-07 Thread Dan Langille

Hi folks,

If you don't know it already, the new version of Freshports
<http://www.FreshPorts.org/> is in beta testing at
<http://test.freshports.org/>.  One of the remaining items I'm looking for
help with is the creation of hyperlinks from the log messages to the PR
database.  I'm hoping that someone can provide a bit of code I can use in
PHP to convert lines like this:

PR:  12345
PR:  ports/1234
PR:  1234,5678

to lines which contain hyperlinks to the actual PR.  The HREF isn't
difficult, but I'm finding trouble with getting it working and working
correctly.  Our first attempts can be
http://test.freshports.org/phorum/lists.php?f=1 under the thread titled
"more PHP regex help wanted please".

thanks.

-- 
Dan Langille
novice in training - http://www.freebsddiary.org/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



file(1) returns amusing result

2002-02-17 Thread Dan Langille

As part of my FreshPorts fun, I decided that after fetching a file from 
cvsweb, I should make sure the fetch worked. I decided to do that via 
file(1) and inspect the output. I was testing for ASCII, but that appears 
to not be good enough. Now I just test for HTML and reverse the sense of 
the test.

Here was the most amusing output:

$ file -b /usr/home/dan/ports/databases/mysql++/Makefile
Apple Old Partition data block size: 21117 first type: AS_CONFIGURE=
yes, number of blocks: 1702047597,

$ head /usr/home/dan/ports/databases/mysql++/Makefile
# ports collection makefile for:MySQL++
# Date created: 20th July 2000
# Whom: Miklos Niedermayer <[EMAIL PROTECTED]>
#
# $FreeBSD: ports/databases/mysql++/Makefile,v 1.10 2002/02/11 13:15:14 
ijliao Exp $
#

PORTNAME=   mysql++
PORTVERSION=1.7.9
CATEGORIES= databases devel
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



is this character encoding or corrupted text?

2002-02-09 Thread Dan Langille

Hello, 

I'm looking at this commit: 

http://docs.freebsd.org/cgi/getmsg.cgi?fetch=292893+0+archive/2001/cvs- 
all/20010429.cvs-all 

In the log, the name "Matthias Kvppe" appears.  Is that the correct name? 

If you look at the underlying HTML, or fetch the HTML and view it using 
vi, you will see "Matthias K^[,Av^[(Bppe".  I'm wondering if there are 
special characters in there which were not well handled by the cvs-all 
process.

My next question is how to properly handle these characters.

Thanks. 
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: shell scripts that hang around forever

2002-01-28 Thread Dan Langille

On 27 Jan 2002 at 20:18, Dan Nelson wrote:

> In the last episode (Jan 27), Dan Langille said:
> > Folks: have a look at this FreshPorts shell script and let me know if
> > there is a better way to do this.
> 
> Apart from maybe using echo instead of forking 'ls', and caching the
> list:
> 
> while : ; do
>   FILES=`echo *`
>   if [ "$FILES" != "*" ] ; then
> for i in $FILES ; do $HOME/scripts/test-freebsd-cvs.sh $i ; done
>   fi
> done
> 
> it looks fine.

Good ideas.  Thanks.  I'll go with that despite my being so proud of even 
*knowing* about xargs and wanting to use it
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: shell scripts that hang around forever

2002-01-28 Thread Dan Langille

Thank you Jason.  Yes, it would be helpful.  And I had wondered if that 
was possible.  Cheers.

FWIW: I am now testing the script using the ports/sysutils/daemontools 
utilities.  That seems to be working well so far.  I will be writing a 
daemontools article for the Diary and will post the URL here for feedback 
before I make it public.

On 28 Jan 2002 at 10:14, Jason Andresen wrote:

> Wouldn't the following change be helpful if you always ^C the script to
> stop it?
> 
> > #!/bin/sh
> > 
> > LOCKFILE=${HOME}/msgs/processing.lock
> > MSGSDIR=${HOME}/msgs/FreeBSD/incoming
> 
> cleanup()
> {
>  rm -rf ${LOCKFILE}
>  exit
> }
> 
> trap cleanup sighup sigint sigquit sigill sigabrt sigterm
> 
> > lockfile -r 0 $LOCKFILE
> > RESULT=$?
> > #echo result='$RESULT'
> > if [ $RESULT = 0 ]
> > then
> > cd ${MSGSDIR}
> > while .
> > do
> > FILECOUNT=`ls | wc -l`
> > 
> > if [ $FILECOUNT -ne 0 ]
> > then
> >     ls | xargs -n 1 $HOME/scripts/test-freebsd-cvs.sh
> > fi
> > 
> > sleep 1
> > done
> > 
>  cleanup
> > fi

-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: shell scripts that hang around forever

2002-01-27 Thread Dan Langille

On 27 Jan 2002 at 20:18, Dan Nelson wrote:

> In the last episode (Jan 27), Dan Langille said:
> > Folks: have a look at this FreshPorts shell script and let me know if
> > there is a better way to do this.
> 
> Apart from maybe using echo instead of forking 'ls', and caching the
> list:
> 
> while : ; do
>   FILES=`echo *`
>   if [ "$FILES" != "*" ] ; then
> for i in $FILES ; do $HOME/scripts/test-freebsd-cvs.sh $i ; done
>   fi
> done
> 
> it looks fine.

Thanks Dan.  I'm also looking at ports/sysutils/daemontools for starting 
and making sure this "service" is always running.  See 
http://cr.yp.to/daemontools.html
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



shell scripts that hang around forever

2002-01-27 Thread Dan Langille

Folks: have a look at this FreshPorts shell script and let me know if 
there is a better way to do this.

This script waits for a file to arrive in a directory, then runs a scipt 
to process it.  It's part of FreshPorts.  the procmail script spools the 
incoming cvs-all message to a temporary location, then moves it to the 
incoming directory.

The lockfile is an attempt to make the script single-entry (only one 
instance at a time).  If fails because the only way to exit the script is 
to terminate it...

At present, this script runs within a screen session (that's the easiest 
way to control it).  This script is sort of like a daemon, and I'm tempted 
to replace it with one.  If it was a daemon, I'm sure that would be much 
easier.

#!/bin/sh

LOCKFILE=${HOME}/msgs/processing.lock
MSGSDIR=${HOME}/msgs/FreeBSD/incoming

lockfile -r 0 $LOCKFILE
RESULT=$?
#echo result='$RESULT'
if [ $RESULT = 0 ]
then
cd ${MSGSDIR}
while .
do
FILECOUNT=`ls | wc -l`

if [ $FILECOUNT -ne 0 ]
then
ls | xargs -n 1 $HOME/scripts/test-freebsd-cvs.sh
fi

sleep 1
done

    rm -rf ${LOCKFILE}
fi
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



(Fwd) ip_output() does not checksum outer header

2002-01-27 Thread Dan Langille

I am forwarding this on behalf of Bruce (his DNS is borked and thus he 
cannot send to the lists).  Please don't CC me in the replies, only Bruce. 

 Thanks.

--- Forwarded message follows ---
Date sent:  Fri, 25 Jan 2002 23:35:38 +
From:   Bruce M Simpson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject:ip_output() does not checksum outer header

Dan,

if you could forward this on to freebsd-net I would be most grateful.

I have completed most of the code to implement GRE as a regular
interface driver under 4.4-STABLE using the cloner interface. This
has all worked fine in local tests. Tonight, whilst testing with
a remote site, we noticed that the encapsulating IP datagram header
around the GRE header does not have any header checksum.

I have checked, checked and re-checked the m->m_len, m->m_pkthdr.len,
m_pullup() results et al and can find nothing out of the ordinary.

This is driving me mad right now, can anybody shed any light on the
problem?

Regards,
Bruce.

--- End of forwarded message ---

-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



ld -X <== important or not?

2001-08-19 Thread Dan Langille

How important is the -X option on ld?

   -X Delete  all temporary local symbols.  For most tar-
  gets, this is all local symbols whose  names  begin
  with `L'.

I ask because I'm porting something to Solaris and it seems rather 
odd that the solaris ld doesn't have this option.

cheers

--
Dan Langille - DVL Software Limited
FreshPorts - http://freshports.org/ - the place for ports

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Intel driver doc's Take 2.

2001-03-24 Thread Dan Langille

On 24 Mar 2001, at 19:59, Dennis wrote:

> the only thing more annoying the 2 people having a discussion is a third 
> person telling them to stop. Feel free not to read any more messages in 
> this thread.

Feel free to read the list charter.  You two are in a pissing contest 
unreleated to this list.  Please take it elsewhere.

-- 
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php
got any work?  I'm looking for some.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Intel driver doc's Take 2.

2001-03-24 Thread Dan Langille

On 24 Mar 2001, at 16:12, Dennis wrote:

> And why does all of your email have that stupid attachment? Whats the 
> matter, cant figure out how to use an open-source mailer? :-)

It's called a PGP signature.

Could you two kids please take this pissing contest off -hackers?  Thanks.

-- 
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php
got any work?  I'm looking for some.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: OP make import?

2001-03-14 Thread Dan Langille

On 14 Mar 2001, at 13:23, Koster, K.J. wrote:

> In the interest of a unified BSD ports tree, is anyone working to integrate
> the diffs for the make from openpackages into the FreeBSD codebase?

I think people might be waiting for us go get to the point where our work 
is actually usable.

-- 
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php
got any work?  I'm looking for some.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Dan Langille

On 14 Mar 2001, at 12:05, Greg Black wrote:

> "Dan Langille" writes:
> 
> | On 14 Mar 2001, at 11:57, Greg Black wrote:
> | 
> | > "David O'Brien" writes:
> | > 
> | > | Perhaps you should read the documentation we supplied on this issue.
> | > | 
> | > | bash$ cat /usr/src/UPDATING
> | > 
> | > Hmmm...
> | > 
> | > $ uname -rs
> | > FreeBSD 4.2-RELEASE
> | > $ cat /usr/src/UPDATING
> | > cat: /usr/src/UPDATING: No such file or directory
> | > 
> | > Perhaps the documentation should be installed more thoroughly.
> | 
> | Perhaps you should install the documentation.
> 
> I chose something that implied documentation on the sysinstall
> menu; it didn't install that file.

There is more documentation than what sysinstall gives you.  The 
documentation in question is useful for people who are updating their 
system, say from 4.2-RELEASE to 4.2-STABLE.  Hence the name of 
the file in question.  You don't have that file because you don't need it.  
If you were upgrading to 4.2-STABLE, this file would be installed as part 
of the cvsup step of your upgrade.

If you are still interested in this file, you can obtain the latest version of 
this file at:

http://www.FreeBSD.org/cgi/cvsweb.cgi/~checkout~/src/UPDATING?rev
=HEAD

That's what you want.  When I said "the", I meant /usr/src/UPDATING.  
That's what David O'Brien was referring to.

-- 
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php
got any work?  I'm looking for some.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Dan Langille

On 14 Mar 2001, at 11:57, Greg Black wrote:

> "David O'Brien" writes:
> 
> | Perhaps you should read the documentation we supplied on this issue.
> | 
> | bash$ cat /usr/src/UPDATING
> 
> Hmmm...
> 
> $ uname -rs
> FreeBSD 4.2-RELEASE
> $ cat /usr/src/UPDATING
> cat: /usr/src/UPDATING: No such file or directory
> 
> Perhaps the documentation should be installed more thoroughly.

Perhaps you should install the documentation.

-- 
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php
got any work?  I'm looking for some.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: qmail IO problems

2001-02-16 Thread Dan Langille

On 16 Feb 2001, at 16:34, Dan Phoenix wrote:

> 3 drives in there as of 3 min ago.
> just want to take these 3 and raid0 then together as /var.
> what was recommendation ccd or venim?
> 
> and has anyone done this before...could walk me through setting these up
> quickly maybe?

perhaps http://freebsddiary.org/vinum.html

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php
got any work?  I'm looking for some.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: syscall kernel modules on 3.0-release

2001-02-07 Thread Dan Langille

On 7 Feb 2001, at 21:14, Matthew Emmerton wrote:

> On 7 Feb 2001, Dag-Erling Smorgrav wrote:
> 
> > Matthew Luckie <[EMAIL PROTECTED]> writes:
> > > I completely understand your plea to not use 3.0 release.
> > > I am personally using 4.2-stable.  Its not my decision to use 3.0
> > > I beleive the computers running 3.0 have been running it for several years
> > > now - i.e. it was the latest available at the time.
> > 
> > Well, it was a stupid decision at that time, and the decision not to
> > upgrade or replace these machines now is even stupider.

Be careful how you criticize.

> Hey now, go easy.  Lots of stupid decisions are made by "managers" who 
> don't understand the implications of old(er) technology.
> 
> I've got a 3.2-R machine which I'm forced to maintain, and the only reason
> why it's not running 3.2-S or 4.2-S is because I can't take the stupid
> thing offline.  I've haggled with my boss for a 6 hour window and the
> answer is no, no, no.  I've even got a 3.2-S installation waiting in
> /usr/obj.

What about replacing the box with a new box?  Smaller window.

> The only way I'm going to get my 3.2-R machine upgraded (and the only way
> this person is going to get their 3.0-R machine upgraded) is when it
> breaks and requires a complete reinstall to become operational.

It might pay to send an email to your boss, cc'd to yourself explaining 
this.  I've seen some managers who make decisions such as that and 
then blame others when the crap hits.

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: ping over IPSEC works in only one direction

2001-02-05 Thread Dan Langille

On 5 Feb 2001, at 17:34, Volker Stolz wrote:

> In local.freebsd-hackers, you wrote:
> >spdadd 192.168.1.1 192.168.1.101 any -P out ipsec esp/transport//use 
>ah/transport//use;
> >spdadd 192.168.1.101 192.168.1.1 any -P out ipsec esp/transport//use 
>ah/transport//use;
> 
> I can see no corresponding "... any -P in" rules. Did you forget them only
> in the posting? If not, this is likely to be a source of confusion.

Thanks.  That was the problem.

I've been able to get most things working.  However, when I involve NAT 
some things break.  I'm not using AH, just ESP.  I can get ESP working 
without NAT and have http, ping, going.  No problems.  But if I try from 
an external box, involving NAT, ping works, but not http.  Not sure why.  
A tcpdump shows the incoming ESP requests, but nothing going back 
out.  I'm positive I have the keys correct as ping works and tcpdump 
shows incoming ping request and outgoing ping replies.

Quite odd.

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



ping over IPSEC works in only one direction

2001-02-05 Thread Dan Langille

I've been playing with IPSEC between two boxes.  ping works as expected until 
I add in the keys.  Then ping only works from one box from not the other.  
tcpdump reveals all traffic to be ESP.

Keys on 19.168.1.1

add 192.168.1.101 192.168.1.1   esp 1100 -E 3des-cbc  "bastbastbastbastbastbast"; 
add 192.168.1.1   192.168.1.101 esp 1101 -E 3des-cbc  "settsettsettsettsettsett"; 

spdadd 192.168.1.1 192.168.1.101 any -P out ipsec esp/transport//use ah/transport//use;


Keys on 19.168.1.101

add 192.168.1.101 192.168.1.1   esp 1100 -E 3des-cbc  "bastbastbastbastbastbast";
add 192.168.1.1   192.168.1.101 esp 1101 -E 3des-cbc  "settsettsettsettsettsett";

spdadd 192.168.1.101 192.168.1.1 any -P out ipsec esp/transport//use ah/transport//use;

The following is a ping 192.168.1.1.  Similar traffic exists for a 
ping 192.168.1.101

# tcpdump -i ed0 proto 1 or proto 50
tcpdump: listening on ed0
01:24:34.216930 192.168.1.1 > 192.168.1.101: ESP(spi=1101,seq=0x2a2)
01:24:34.217994 192.168.1.101 > 192.168.1.1: ESP(spi=1100,seq=0x268)
01:24:35.226859 192.168.1.1 > 192.168.1.101: ESP(spi=1101,seq=0x2a3)
01:24:35.227924 192.168.1.101 > 192.168.1.1: ESP(spi=1100,seq=0x269)
01:24:36.236814 192.168.1.1 > 192.168.1.101: ESP(spi=1101,seq=0x2a4)
01:24:36.237896 192.168.1.101 > 192.168.1.1: ESP(spi=1100,seq=0x26a)

The above tells me that the traffic is using protocol 50 both ways.

However, ping 192.168.1.101 fails like this:
PING 192.168.1.101 (192.168.1.101): 56 data bytes
^C
--- 192.168.1.101 ping statistics ---
69 packets transmitted, 0 packets received, 100% packet loss

The packets are being received as reported by ipfilter:

# ipfstat -hio
12256 pass out from any to any
21 pass out quick proto esp from any to any
11995 pass in from any to any
21 pass in quick proto esp from any to any

clues please!

thanks

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: An example script for creating a bootable floppy

2001-02-03 Thread Dan Langille

On 3 Feb 2001, at 19:27, Dima Dorfman wrote:

> After a brief inspection of the code, I think adding a 'vga' device
> will help:
> 
>  device  vga0at isa?

Yep.  That compiles now.  Thank you.  But it's:

-rwxr-xr-x  1 root  wheel  1321263 Feb  4 16:33 kernel

Which makes it a pretty full disk...

# df /mnt
Filesystem  1K-blocks UsedAvail Capacity  Mounted on
/dev/fd0c13594 1287 0%/mnt

After the copy:

# df /mnt
Filesystem  1K-blocks UsedAvail Capacity  Mounted on
/dev/fd0c1359 1300   -8   101%/mnt

I get a root mount failed, then a panic, but at least it's a kernel. If I make 
any more progress, I'll le you know. 

Thanks.

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: An example script for creating a bootable floppy

2001-02-03 Thread Dan Langille

On 3 Feb 2001, at 18:02, Dima Dorfman wrote:

> > cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmiss
> > ing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ans
> > i  -nostdinc -I- -I. -I../.. -I../../../include  -D_KERNEL -include
> >  opt_global.h -elf  -mpreferred-stack-boundary=2  ../../kern/kern_sig.c
> > ../../kern/kern_sig.c:359: warning: function declaration isn't a prototype
> > ../../kern/kern_sig.c: In function `osigaction':
> > ../../kern/kern_sig.c:367: dereferencing pointer to incomplete type
> 
> Wild guess: try sticking ``options COMPAT_43'' in the config file.
> This smells of missing 4.3BSD compatibility structures or something.

That got me quite a bit further.  Any ideas about this one please?  It's 
the keyboard isn't it?  From LINT, I added these:

# atkbdc0 controls both the keyboard and the PS/2 mouse
device  atkbdc0 at isa? port IO_KBD   
device  atkbd0  at atkbdc? irq 1 flags 0x1
device  psm0at atkbdc? irq 12


cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-
extensions -ansi  -nostdinc -I- -I. -I../.. -I../../../include  -D_KERNEL -
include opt_global.h -elf  -mpreferred-stack-boundary=2  vers.c
linking kernel
kbd.o: In function `kbd_register':
kbd.o(.text+0x2f6): undefined reference to `kbddriver_set'
kbd.o(.text+0x2fd): undefined reference to `kbddriver_set'

etc...

After that change, I encounted this:

cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-
extensions -ansi  -nostdinc -I- -I. -I../.. -I../../../include  -D_KERNEL -
include opt_global.h -elf  -mpreferred-stack-boundary=2  vers.c
linking kernel
scvidctl.o: In function `sc_set_text_mode':
scvidctl.o(.text+0x19): undefined reference to `vidsw'
scvidctl.o: In function `sc_set_graphics_mode':
scvidctl.o(.text+0x26a): undefined reference to `vidsw'
scvidctl.o: In function `sc_vid_ioctl':
scvidctl.o(.text+0x77f): undefined reference to `vidsw'
scvidctl.o(.text+0x7a3): undefined reference to `vidsw'
scvidctl.o(.text+0x7bc): undefined reference to `vid_get_adapter'
scvidctl.o(.text+0x822): undefined reference to `vid_get_adapter'


..etc.

thanks

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



An example script for creating a bootable floppy

2001-02-03 Thread Dan Langille

At http://www.freebsd.org/handbook/backup-programs.html, there is a 
script for creating a bootable floppy.  Part of this script is the MINI 
kernel.  The example is out of date and doesn't work under 4.2.

I've included my amended mini-kernel when trying to convert it to 4.2-
stable.  But it fails to compile (the error is at the end of this message).

Given the increase in kernel size since this document was created, is it 
still possible to create a single floppy kernel + tools which is bootable?  
If so, could someone please advise me on how to correct the error 
below.  If not, I'll submit a patch removing this section from the 
handbook.

thanks.

#
# MINI -- A kernel to get FreeBSD on onto a disk.
#
machine "i386"
cpu "I486_CPU"
ident   MINI
maxusers5

options INET# needed for _tcp _icmpstat _ipstat
 #_udpstat _tcpstat _udb
options FFS #Berkeley Fast File System
options FAT_CURSOR  #block cursor in syscons or pccons
options SCSI_DELAY=1500   #Be pessimistic about Joe SCSI device
options MAXCONS=2  # number of virtual consoles
options USERCONFIG  #Allow user configuration with -c XXX

#config  kernel  root on da0 swap on da0 and da1 dumps on da0

device  isa0
device  pci0

device  fdc0at isa? port IO_FD1 irq 6 drq 2
device  fd0 at fdc0 drive 0

device  ncr0

device  scbus0

device  sc0 at isa? flags 0x100

device  npx0at nexus? port IO_NPX irq 13

device  da0
device  da1
device  da2

device  sa0

pseudo-device   loop# required by INET
pseudo-device   gzip# Exec gzipped a.out'

cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi  
-nostdinc -I- -I. -I../.. -I../../../include  -D_KERNEL -include
 opt_global.h -elf  -mpreferred-stack-boundary=2  ../../kern/kern_sig.c
../../kern/kern_sig.c:359: warning: function declaration isn't a prototype
../../kern/kern_sig.c: In function `osigaction':
../../kern/kern_sig.c:367: dereferencing pointer to incomplete type
../../kern/kern_sig.c:367: dereferencing pointer to incomplete type
../../kern/kern_sig.c:369: dereferencing pointer to incomplete type
../../kern/kern_sig.c:370: dereferencing pointer to incomplete type
../../kern/kern_sig.c:372: dereferencing pointer to incomplete type
../../kern/kern_sig.c:379: dereferencing pointer to incomplete type
../../kern/kern_sig.c:384: dereferencing pointer to incomplete type
../../kern/kern_sig.c: At top level:
../../kern/kern_sig.c:532: warning: function declaration isn't a prototype
../../kern/kern_sig.c: In function `osigprocmask':
../../kern/kern_sig.c:538: dereferencing pointer to incomplete type
../../kern/kern_sig.c:539: dereferencing pointer to incomplete type
../../kern/kern_sig.c: At top level:
../../kern/kern_sig.c:567: warning: function declaration isn't a prototype
../../kern/kern_sig.c:721: warning: function declaration isn't a prototype
../../kern/kern_sig.c: In function `osigsuspend':
../../kern/kern_sig.c:729: dereferencing pointer to incomplete type
*** Error code 1

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: panic: ufs_dirbad: bad dir

2001-02-03 Thread Dan Langille

I had to give up on that disk.  I bought a new 10GB IDE to replace it (it's 
going to be vastly under-filled).

I still have the disk, so if anyone wants to follow this up, it is still intact.

On 2 Feb 2001, at 5:21, Dan Langille wrote:

> I recently upgraded a box from 4.1-stable to 4.2-stable. An NFS mount was
> used for the install world and install kernel.  During the kernel install
> the box panic'd (sorry, didn't see the message).  Upon boot, the box give
> these messages: 
> 
> Mounting root from ufs:/dev/ad0s1a
> /: bad dir ino 2 at offset 0: mangled entry
> panic: ufs_dirbad: bad dir 
> 
> syncing disks 1 1 1 1 1 1 1 1..etc
> giving up on 1 buffers 
> 
> 
> I did an fsck on the disk by moving it to another box. The above messages
> appeared both before and after the fsck. 
> 
> Clues please! 


--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Trailing slashes and rmdir - POLA broken

2001-02-03 Thread Dan Langille

On 4 Feb 2001, at 6:58, Greg Black wrote:

> Of course it works.  The part you quoted was the introduction
> and was as it "should" be.  You cut out the part with the actual
> question.  I'll repeat it here:

Serves me right for trying to help after a 22 hour work stint and getting 
up after 4 hours of sleep

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Trailing slashes and rmdir - POLA broken

2001-02-03 Thread Dan Langille

On 4 Feb 2001, at 6:46, Greg Black wrote:

> Observe the following:
> 
> $ uname -rs
> FreeBSD 4.1-RELEASE
> $ ls -l
> $ mkdir foo
> $ ln -s foo bar
> $ rmdir bar
> rmdir: bar: Not a directory

I'm quite sure that rm bar will work.

Have you tried rmdir ./bar?

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: panic: ufs_dirbad: bad dir

2001-02-02 Thread Dan Langille

James writes:

> You might also wanna try installing the same /kernel and /modules that you 
> were when it panic'd, while you have the drive mounted on another box. 

That's a point.  I'll try that now. 

BTW: Someone sent me this: 

http://freebsd.sinica.edu.tw/pipermail/freebsd-taiwan-questions/2000-Novembe 
r/66.html 

But I can't read that langauge...


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: panic: ufs_dirbad: bad dir

2001-02-01 Thread Dan Langille

James writes:

> What part of the kernel install did it panic on? (if you even saw that 
> part) 

Sorry, I forgot to mention that.  Here is what was left on my remote screen
after the panic: 

root@ducky:/usr/src/sys/compile/DUCKY] # make install
chflags noschg /kernel
mv /kernel /kernel.old
install -c -m 555 -o root -g wheel -fschg  kernel /kernel
if [ -d /modules -a -n "`ls /modules`" ]; then  mkdir -p /modules.old;  cp 
 -p /modules/* /modules.old;  fi; 


> Have you tried booting the previous kernel? I'm not sure if it'll 
> even boot... but, you might want to try that.

I tried the old kernel, but it failed to get past the probing.  I can't
remember the messages, but it was something like "isa_?? cannot get ports
for le.. cannot get irq for le". 

> You might also wanna try installing the same /kernel and /modules that you 
> were when it panic'd, while you have the drive mounted on another box. 

There is no /kernel.old any more.  I have installed the new 4.2 kernel
when the drive was mounted in another box.  Its that kernel which produce
the messages below. 

Thanks. 

> Dan Langille writes:  
> 
>> I recently upgraded a box from 4.1-stable to 4.2-stable. An NFS mount was
>> used for the install world and install kernel.  During the kernel install
>> the box panic'd (sorry, didn't see the message).  Upon boot, the box give
>> these messages:   
>> 
>> Mounting root from ufs:/dev/ad0s1a
>> /: bad dir ino 2 at offset 0: mangled entry
>> panic: ufs_dirbad: bad dir   
>> 
>> syncing disks 1 1 1 1 1 1 1 1..etc
>> giving up on 1 buffers   
>> 
>> 
>> I did an fsck on the disk by moving it to another box. The above messages
>> appeared both before and after the fsck.   
>> 
>> Clues please!   
>> 
>> -- 
>> Dan Langille - novice in training
>> [my thanks to evilcode.com for the emergency email access]  
>> 
>> 
>> To Unsubscribe: send mail to [EMAIL PROTECTED]
>> with "unsubscribe freebsd-hackers" in the body of the message
> 
 


-- 
Dan Langille - novice in training 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: panic: ufs_dirbad: bad dir

2001-02-01 Thread Dan Langille

After a suggestion offlist, here's the additional information from a
boot -v: 

Mounting root from ufs:/dev/ad0s1a
ad0s1: type 0xa5, start 63, end = 2503871, size 2503809 : OK
/: bad dir ino 2 at offset 0: mangled entry
panic: ufs_dirbad: bad dir 

syncing disks 1 1 1 1 1 1 1 1..etc
giving up on 1 buffers 

thanks folks.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



  1   2   >