NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/40634: dostatvfs() broken when chroot to /
The following reply was made to PR kern/40634; it has been noted by GNATS.
From: Christoph Badura <bad%bsd.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: enami tsugutomo <enami%sm.sony.co.jp@localhost>
Subject: Re: kern/40634: dostatvfs() broken when chroot to /
Date: Sat, 14 Feb 2009 12:06:32 +0000
On Sat, Feb 14, 2009 at 06:45:02AM +0000, enami tsugutomo wrote:
> Your change removes / in front of mount point, doesn't it?
Duh!
I didn't want to lose the comparison of the prefix.
How about this:
- if (strncmp(bp, sp->f_mntonname, len) == 0 &&
+ if (len == 1 && *bp == '/')
+ ; /* our root is /, show all mountpoints */
+ else if (strncmp(bp, sp->f_mntonname, len) == 0 &&
I also missed the ; hidden after the comment, on first reading.
--chris
Home |
Main Index |
Thread Index |
Old Index