Problem with patch and infinit directories
Ron Natalie
ron at BRL-TGR
Fri Jan 18 11:46:31 AEST 1985
>> The restriction about linking directories is built into
>> the link program.
>Not in 4.2BSD it's not! I think it was in the 4.1 kernel as well.
>(I haven't seen any other kernel sources, so I wouldn't know about
>V6/V7/Sn.)
It is too! I just linked up a directory like that with the following
program...
main(argc, argv)
int argc;
char **argv;
{
if(argc != 3) {
printf("arg count\n");
exit(1);
}
if(link(argv[1], argv[2]) == -1) {
perror("link");
}
}
I just looked at the code and it checks for IFMT == IF_DIR and
!suser()!
More information about the Comp.unix
mailing list