+               g_unlink (GDM_SDTLOGIN_DIR);

This seems to result in calling the unlink(2) system call (at
least in the upstream code at [1]).

As noted in the unlink(2) man page, unlink on a directory on
Solaris UFS either fails (if not called by root) or  corrupts the
filesystem, requiring fsck to fix (if called by root).

unlink on a directory on Solaris ZFS just fails for everyone.

You should always use remove() instead of unlink() if the argument
could ever be a directory.   Perhaps glib's g_unlink() should be
modified to just always call remove() instead, at least on Solaris.

[1] http://svn.gnome.org/viewvc/glib/trunk/glib/gstdio.c?view=markup#l528

-- 
        -Alan Coopersmith-           alan.coopersmith at sun.com
         Sun Microsystems, Inc. - X Window System Engineering


Reply via email to