Messages in this thread | | | Date | Sun, 14 Jun 1998 07:17:07 -0400 (EDT) | From | <> | Subject | Re: Can I open a special file with major/minor instead of name? |
| |
Unfortuanatly, being able to do this would be a security problem.. Since as a Unix clone, we store device permissions as permisions to a device file.
On Sun, 14 Jun 1998, Dave Cinege wrote:
> This is the code in do_linuxrc(): > > (void) open("/dev/tty1",O_RDWR,0); > > This is what I want to do: > > (void) open( MKDEV(TTY_MAJOR,1) ,O_RDWR,0); > > This is why: > I build all of /dev from /linuxrc, thus /dev/tty1 does not yet exist. > Right now I have a work around but this way would be cleaner. > > > static int do_linuxrc(void * shell) > { > static char *argv[] = { "linuxrc", NULL, }; > > close(0);close(1);close(2); > setsid(); > (void) open("/dev/tty1",O_RDWR,0); > (void) dup(0); > (void) dup(0); > return execve(shell, argv, envp_init); > } > > > -- > http://www.psychosis.com/emc/ Elite MicroComputers 732-541-4214 > http://www.psychosis.com/linux-router/ Linux Router Project > > SIC SEMPER SPAMMER!! > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.rutgers.edu >
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |