Date: Sat, 14 Jun 1997 12:17:47 +0400 (MSD) From: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/3864: Incorrect usage of err(3) in mount_union.c Message-ID: <199706140817.MAA00728@tejblum.dnttm.rssi.ru> Resent-Message-ID: <199706140830.BAA13818@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 3864 >Category: bin >Synopsis: Incorrect usage of err(3) in mount_union.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jun 14 01:30:01 PDT 1997 >Last-Modified: >Originator: Dmitrij Tejblum >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: >Description: When mount() system call in mount_union.c fails, it call err(EX_OSERR, target). It is incorrect. First, target may contain '%'... Second, the error may be related to source, not to target (for example, "No such file or directory"). >How-To-Repeat: dima@tejblum|/usr/home/dima>mount_union a%d b%d mount_union: /usr/home/dima/a-272639828: No such file or directory dima@tejblum|/usr/home/dima>mkdir misc dima@tejblum|/usr/home/dima>mount_union misc b%d mount_union: /usr/home/dima/misc: No such file or directory dima@tejblum|/usr/home/dima> >Fix: *** /usr/src/sbin/mount_union/mount_union.c Sun May 25 12:18:27 1997 --- mount_union.c Sat Jun 14 11:44:06 1997 *************** *** 127,133 **** errx(EX_OSERR, "union filesystem is not available"); if (mount(vfc.vfc_name, source, mntflags, &args)) ! err(EX_OSERR, target); exit(0); } --- 127,133 ---- errx(EX_OSERR, "union filesystem is not available"); if (mount(vfc.vfc_name, source, mntflags, &args)) ! err(EX_OSERR, NULL); exit(0); } >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706140817.MAA00728>