Add symlink-race-free connect() system call

Status: planning

Add a non-symlink-following variant of the connect() system call to Linux to fix PlashIssues/ConnectRaceCondition.

One approach is to add a new syscall that takes an additional flags argument, since the existing connect() syscall does not have a flags argument. New syscalls that take filenames should now also take a directory FD argument, so the new syscall would be fconnectat().

Ulrich Drepper's recent proposed patches have extended socket() and socketpair() without adding a flags argument. Instead, the role of the type argument has been extended so that it can contain SOCK_CLOEXEC and SOCK_NONBLOCK flags. This would be harder to do for connect(), because the socket type is inside a struct sockaddr.

See:

Story19 (last edited 2008-06-18 14:25:41 by MarkSeaborn)