Newsgroups: comp.unix.questions Path: utzoo!utgpu!jmason From: jmason@gpu.utcs.utoronto.ca (Jamie Mason) Subject: Re: mknod for BSD 4.3 Message-ID: <1991Apr22.075207.12454@gpu.utcs.utoronto.ca> Organization: University of Toronto Computer Science Undergraduate Student References: <9104220651.AA13912@csufres.CSUFresno.EDU> Date: Mon, 22 Apr 1991 07:52:07 GMT In article <9104220651.AA13912@csufres.CSUFresno.EDU> quang@CSUFRES.CSUFRESNO.EDU (Quang Ngo) writes: >The man page section 2 says that only super-user can access mknod(). Is >there any other funtion that does what mknod() does? Our system doesn't >have fifo(). /etc/mknod is not accessable by users. Too bad, I can't >even do a system("/etc/mknod ....") call. I would be very surprised if the manual is correct, then. On systems with named pipes, mknod() is not usually a root-only call. Rather, you can call mknod(), but mknod() will return EACESS if you try to make a device with it. This is from the MKNOD(2) man page of SunOS 4.1.1: mknod() may be invoked only by the super-user for file types other than FIFO special. SunOS is of the BSD flavour -- so I would expect that 4.3BSD would act in basically the same way. Why not try an mknod() call and see if you get your named pipe? As for /usr/etc/mknod, that is just local policy, isn't it? Even if it *were* acessible to all users, I doubt it would be suid root, therefore whether you use that, or a program of your own creation, is irrelevant. mknod(8) (the program) is just a stupid thing wrapper around mknod(2) (the system call). Jamie ... Segmentation fault (core dumped) Written On Monday, April 22, 1991 at 03:50:16am EDT