diff options
Diffstat (limited to 'sbin/mount_unionfs/mount_unionfs.c')
-rw-r--r-- | sbin/mount_unionfs/mount_unionfs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/mount_unionfs/mount_unionfs.c b/sbin/mount_unionfs/mount_unionfs.c index 4222ede..1d5d3eb 100644 --- a/sbin/mount_unionfs/mount_unionfs.c +++ b/sbin/mount_unionfs/mount_unionfs.c @@ -109,11 +109,9 @@ main(argc, argv) if (argc != 2) usage(); - if (realpath(argv[0], target) == 0) - err(EX_OSERR, "%s", target); - - if (realpath(argv[1], source) == 0) - err(EX_OSERR, "%s", source); + /* resolve both target and source with realpath(3) */ + (void)checkpath(argv[0], target); + (void)checkpath(argv[1], source); if (subdir(target, source) || subdir(source, target)) errx(EX_USAGE, "%s (%s) and %s (%s) are not distinct paths", |