Oliver Lehmann <lehmann(a)ans-netz.de> writes:
OK - it is not temporarily copied to rr4, but directly
modfied in
rr2 and then assigned to u.u_dirp. It should be "the same" - But
- ln(1) does not work with this code. Instead of creating a
hardlink, it creates a new empty file (different inode).
Are you sure this is where the problem is?
For the pointer assignment, what about just using u.u_dirp.l =
uap->linkname, and validating there are no invalid bits (return EFAULT
or raise SIGSEGV if so - also should the user code really be allowed to
pass in arbitrary segment IDs?) in a separate step?