[PATCH 1/7] ntdll: Add support for junction point creation.

Hans Leidekker hans at codeweavers.com
Thu Jun 21 05:28:13 CDT 2012


On Wed, 2012-06-20 at 17:26 -0600, Erich E. Hoover wrote:
> +    TRACE("Linking %s to %s\n", unix_src.Buffer, unix_dest.Buffer);
> +    if (rmdir( unix_src.Buffer ) < 0)
> +    {
> +        status = FILE_GetNtStatus();
> +        goto cleanup;
> +    }
> +    if (symlink( unix_dest.Buffer, unix_src.Buffer ) < 0)
> +    {
> +        status = FILE_GetNtStatus();
> +        goto cleanup;
> +    }
> +    status = STATUS_SUCCESS; 

This is not an atomic operation since you need two Unix calls. So you would
need locking or rollback to deal with possible races.

Should permissions and ownership be preserved on the directory when a
junction is removed?





More information about the wine-devel mailing list