* if we're using the noadouble option.
*/
- if (!vol_noadouble(vol) && (d_bitmap &
- ~((1<<DIRPBIT_ACCESS)|(1<<DIRPBIT_UNIXPR)|
- (1<<DIRPBIT_UID)|(1<<DIRPBIT_GID)|
- (1<<DIRPBIT_MDATE)|(1<<DIRPBIT_PDINFO)))) {
+ if (d_bitmap & ~((1<<DIRPBIT_ACCESS)
+ | (1<<DIRPBIT_UNIXPR)
+ | (1<<DIRPBIT_UID)
+ | (1<<DIRPBIT_GID)
+ | (1<<DIRPBIT_MDATE)
+ | (1<<DIRPBIT_PDINFO))) {
return AFPERR_ACCESS;
}
ad_init(&ad, vol);
if (ad_open(&ad, ".", ADFLAGS_HF | ADFLAGS_DIR | ADFLAGS_CREATE | ADFLAGS_RDWR, 0777) < 0) {
- if (vol_noadouble(vol))
- goto createdir_done;
return( AFPERR_ACCESS );
}
ad_setname(&ad, s_path->m_name);
}
}
if ( ad_meta_fileno( &ad ) == -1 ) { /* Hard META / HF */
- /* on noadouble volumes, just creating the data fork is ok */
- if (vol_noadouble(vol)) {
- ad_close( &ad, ADFLAGS_DF );
- goto createfile_done;
- }
/* FIXME with hard create on an existing file, we already
* corrupted the data file.
*/
* - change of modification date
* - UNIX privs (Bug-ID #2863424)
*/
- if (!vol_noadouble(vol) && (f_bitmap & ~(1<<FILPBIT_MDATE | 1<<FILPBIT_UNIXPR))) {
+ if (f_bitmap & ~(1<<FILPBIT_MDATE | 1<<FILPBIT_UNIXPR)) {
LOG(log_debug, logtype_afpd, "setfilparams: need adouble access");
return AFPERR_ACCESS;
}
if ( stickydirmode(name, DIRBITS | mode, 0, vol->v_umask) < 0 )
return -1;
}
- if (vol->vfs->vfs_setdirunixmode(vol, name, mode, NULL) < 0 && !vol_noadouble(vol)) {
+ if (vol->vfs->vfs_setdirunixmode(vol, name, mode, NULL) < 0) {
return -1 ;
}
if (!dir_rx_set(mode)) {
}
closedir( dir );
- if (vol->vfs->vfs_setdirmode(vol, name, mode, NULL) < 0 && !vol_noadouble(vol)) {
+ if (vol->vfs->vfs_setdirmode(vol, name, mode, NULL) < 0) {
return -1 ;
}
options[VOLOPT_FLAGS].i_value |= AFPVOL_MSWINDOWS | AFPVOL_USEDOTS;
} else if (strcasecmp(p, "crlf") == 0)
options[VOLOPT_FLAGS].i_value |= AFPVOL_CRLF;
- else if (strcasecmp(p, "noadouble") == 0)
- options[VOLOPT_FLAGS].i_value |= AFPVOL_NOADOUBLE;
else if (strcasecmp(p, "ro") == 0)
options[VOLOPT_FLAGS].i_value |= AFPVOL_RO;
else if (strcasecmp(p, "nohex") == 0)
volume->v_ad_options |= ADVOL_UNIXPRIV;
if ((volume->v_flags & AFPVOL_INV_DOTS))
volume->v_ad_options |= ADVOL_INVDOTS;
- if ((volume->v_flags & AFPVOL_NOADOUBLE))
- volume->v_ad_options |= ADVOL_NOADOUBLE;
if (options[VOLOPT_PASSWORD].c_value)
volume->v_password = strdup(options[VOLOPT_PASSWORD].c_value);
static int scanvol(struct volinfo *vi, dbd_flags_t flags)
{
- /* Dont scanvol on no-appledouble vols */
- if (vi->v_flags & AFPVOL_NOADOUBLE) {
- dbd_log( LOGSTD, "Volume without AppleDouble support: skipping volume scanning.");
- return 0;
- }
-
/* Make this stuff accessible from all funcs easily */
myvolinfo = vi;
dbd_flags = flags;
#define ADVOL_CACHE (1 << 1)
#define ADVOL_UNIXPRIV (1 << 2) /* adouble unix priv */
#define ADVOL_INVDOTS (1 << 3) /* dot files (.DS_Store) are invisible) */
-#define ADVOL_NOADOUBLE (1 << 4)
/* lock flags */
#define ADLOCK_CLR (0)
*/
#define AFPVOL_A2VOL (1 << 5) /* prodos volume */
#define AFPVOL_CRLF (1 << 6) /* cr/lf translation */
-#define AFPVOL_NOADOUBLE (1 << 7) /* don't create .AppleDouble by default */
#define AFPVOL_RO (1 << 8) /* read-only volume */
#define AFPVOL_MSWINDOWS (1 << 9) /* deal with ms-windows yuckiness.
this is going away. */
#define utf8_encoding() (afp_version >= 30)
-// TODO: remove AFPVOL_NOADOUBLE
-#define vol_noadouble(vol) (((vol)->v_flags & AFPVOL_NOADOUBLE) ? 1 : 0)
#define vol_nodev(vol) (((vol)->v_flags & AFPVOL_NODEV) ? 1 : 0)
#define vol_unix_priv(vol) (afp_version >= 30 && ((vol)->v_flags & AFPVOL_UNIX_PRIV))
#define vol_inv_dots(vol) (((vol)->v_flags & AFPVOL_INV_DOTS) ? 1 : 0)
static const vol_opt_name_t vol_opt_names[] = {
{AFPVOL_A2VOL, "PRODOS"}, /* prodos volume */
{AFPVOL_CRLF, "CRLF"}, /* cr/lf translation */
- {AFPVOL_NOADOUBLE, "NOADOUBLE"}, /* don't create .AppleDouble by default */
{AFPVOL_RO, "READONLY"}, /* read-only volume */
{AFPVOL_MSWINDOWS, "MSWINDOWS"}, /* deal with ms-windows yuckiness. this is going away. */
{AFPVOL_NOHEX, "NOHEX"}, /* don't do :hex translation */
* Ignore EPERM errors: We may be dealing with a directory that is
* group writable, in which case chmod will fail.
*/
- if ( (chmod_acl( name, (DIRBITS | mode) & ~v_umask ) < 0) && errno != EPERM &&
- !(errno == ENOENT && (dropbox & AFPVOL_NOADOUBLE)) )
- {
+ if ((chmod_acl( name, (DIRBITS | mode) & ~v_umask ) < 0) && errno != EPERM) {
LOG(log_error, logtype_afpd, "stickydirmode: chmod \"%s\": %s", fullpathname(name), strerror(errno) );
retval = -1;
}
return -1;
}
- if (for_each_adouble("setdirmode", adouble_p, setdirmode_adouble_loop, &hf_mode, vol_noadouble(vol), vol->v_umask))
+ if (for_each_adouble("setdirmode", adouble_p, setdirmode_adouble_loop, &hf_mode, 0, vol->v_umask))
return -1;
if (!dir_rx_set(mode)) {
static int RF_setdirowner_adouble(VFS_FUNC_ARGS_SETDIROWNER)
{
- int noadouble = vol_noadouble(vol);
char *adouble_p;
struct stat st;
struct perm owner;
adouble_p = ad_dir(vol->ad_path(name, ADFLAGS_DIR ));
- if (for_each_adouble("setdirowner", adouble_p, setdirowner_adouble_loop, &owner, noadouble, vol->v_umask))
+ if (for_each_adouble("setdirowner", adouble_p, setdirowner_adouble_loop, &owner, 0, vol->v_umask))
return -1;
/*
* We cheat: we know that chown doesn't do anything.
*/
if ( stat( ".AppleDouble", &st ) < 0) {
- if (errno == ENOENT && noadouble)
- return 0;
LOG(log_error, logtype_afpd, "setdirowner: stat %s: %s", fullpathname(".AppleDouble"), strerror(errno) );
return -1;
}