-/* $OpenBSD: ypbind.c,v 1.69 2017/02/17 16:46:17 ajacoutot Exp $ */
+/* $OpenBSD: ypbind.c,v 1.70 2017/06/12 18:56:13 millert Exp $ */
/*
* Copyright (c) 1992, 1993, 1996, 1997, 1998 Theo de Raadt <deraadt@openbsd.org>
if (!strcmp(dent->d_name, ".") ||
!strcmp(dent->d_name, ".."))
continue;
- snprintf(path, sizeof(path), "%s/%s", BINDINGDIR,
- dent->d_name);
- (void) unlink(path);
+ (void)unlinkat(dirfd(dirp), dent->d_name, 0);
}
closedir(dirp);
} else {