On 2003-11-30, Brian Mastenbrook <bmastenb@...> wrote:
> 'lo all - sb-posix mkdir.error.3 expects to get an error back from
> making a directory "/almost-certainly-does-not-exist"; however, on
> OS X, / is 1775 root:admin, so the mkdir actually completes and
> makes the directory.
Ugh, that's not good.
> I think it's likely that people building on OS X will be
> administrators of their own machines, and so will be able to make
> that directory - not to mention packagers trying to build RPMs as
> root on other architectures. I propose that the test be removed
> until such time as a more portable test can be devised.
How about this:
(let* ((top (make-pathname :directory '(:relative "mkdir.denies-perms.1")))
(sub (make-pathname :directory '(:relative "perm-denied")))
(top-merged (merge-pathnames top *test-directory*))
(sub-merged (merge-pathnames sub top)))
(progn (sb-posix:mkdir (namestring top-merged)
(logior sb-posix::s-irusr sb-posix::s-ixusr))
(sb-posix:mkdir (namestring sub-merged) 0)
(ignore-errors (sb-posix:rmdir top-merged))))
This should create a directory inside a dir where we have no write
Andreas Fuchs, <asf@...>, asf@..., antifuchs