Date: Tue, 20 Oct 1998 21:40:16 -0500 (EST) From: ajk@purdue.edu To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/8394: rdist6 won't compile--tries to use MOUNT_NFS Message-ID: <199810210240.VAA25570@volta.physics.purdue.edu>
next in thread | raw e-mail | index | archive | help
>Number: 8394 >Category: ports >Synopsis: rdist6 won't compile--tries to use MOUNT_NFS >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 20 19:40:01 PDT 1998 >Last-Modified: >Originator: Andrew J. Korty >Organization: Purdue University Physics Department >Release: FreeBSD 3.0-BETA i386 >Environment: FreeBSD volta.physics.purdue.edu 3.0-BETA FreeBSD 3.0-BETA #3: Tue Oct 13 15:04:20 EST 1998 csg@volta.physics.purdue.edu:/usr/src/sys/compile/VOLTA i386 >Description: rdist6 checks if a filesystem is of type "nfs" by comparing the f_type node of the statfs structure to MOUNT_NFS. >How-To-Repeat: cd /usr/ports/net/rdist6 && make >Fix: Probably, make rdist6 use the f_fstypename node of the statfs structure, rather than f_type, to determine the filesystem name, as in the following patch: *** src/filesys-os.c.orig Thu Feb 15 14:01:04 1996 --- src/filesys-os.c Tue Oct 20 21:18:15 1998 *************** *** 165,170 **** --- 165,171 ---- { static mntent_t mntstruct; static char remote_dev[MAXHOSTNAMELEN+MAXPATHLEN+1]; + char *fstypep; if (!entries_left) return((mntent_t*)0); *************** *** 179,194 **** if (mnt->f_flags & M_RDONLY) mntstruct.me_flags |= MEFLAG_READONLY; #endif ! switch ((ulong)((struct statfs*)mnt)->f_type) { ! case MOUNT_NFS: (void) sprintf(remote_dev, "%s", mnt->f_mntfromname); mntstruct.me_path = remote_dev; mntstruct.me_type = METYPE_NFS; ! break; ! default: mntstruct.me_path = mnt->f_mntonname; mntstruct.me_type = METYPE_OTHER; - break; } mnt++; --- 180,193 ---- if (mnt->f_flags & M_RDONLY) mntstruct.me_flags |= MEFLAG_READONLY; #endif ! fstypep = ((struct statfs *)mnt)->f_fstypename; ! if ('n' == fstypep[0] && 'f' == fstypep[1] && 's' == fstypep[2]) { (void) sprintf(remote_dev, "%s", mnt->f_mntfromname); mntstruct.me_path = remote_dev; mntstruct.me_type = METYPE_NFS; ! } else { mntstruct.me_path = mnt->f_mntonname; mntstruct.me_type = METYPE_OTHER; } mnt++; >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810210240.VAA25570>