X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=libatalk%2Fvfs%2Funix.c;h=5e0588dfd171bf54e9b6b7410c292639aaeabb1b;hb=6d60f95c388da5f8f901d67e0018cf4896e6c6dc;hp=229f1b7a216e25309c3c581c5c9fcc6e3a1ca6e5;hpb=af898e14ed8928adb6a5bedcd21d4e2731860eaa;p=netatalk.git diff --git a/libatalk/vfs/unix.c b/libatalk/vfs/unix.c index 229f1b7a..5e0588df 100644 --- a/libatalk/vfs/unix.c +++ b/libatalk/vfs/unix.c @@ -22,6 +22,7 @@ #include #include #include +#include /* ----------------------------- a dropbox is a folder where w is set but not r eg: @@ -32,29 +33,6 @@ int stickydirmode(const char *name, const mode_t mode, const int dropbox, const { int retval = 0; -#ifdef DROPKLUDGE - /* Turn on the sticky bit if this is a drop box, also turn off the setgid bit */ - if ((dropbox & AFPVOL_DROPBOX)) { - int uid; - - if ( ( (mode & S_IWOTH) && !(mode & S_IROTH)) || - ( (mode & S_IWGRP) && !(mode & S_IRGRP)) ) - { - uid=geteuid(); - if ( seteuid(0) < 0) { - LOG(log_error, logtype_afpd, "stickydirmode: unable to seteuid root: %s", strerror(errno)); - } - if ( (retval=chmod( name, ( (DIRBITS | mode | S_ISVTX) & ~v_umask) )) < 0) { - LOG(log_error, logtype_afpd, "stickydirmode: chmod \"%s\": %s", fullpathname(name), strerror(errno) ); - } else { - LOG(log_debug, logtype_afpd, "stickydirmode: chmod \"%s\": %s", fullpathname(name), strerror(retval) ); - } - seteuid(uid); - return retval; - } - } -#endif /* DROPKLUDGE */ - /* * Ignore EPERM errors: We may be dealing with a directory that is * group writable, in which case chmod will fail.