]> arthur.barton.de Git - netatalk.git/commitdiff
Merge remote branch 'sf/develop' into develop
authorFrank Lahm <franklahm@googlemail.com>
Thu, 14 Jun 2012 13:44:07 +0000 (15:44 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Thu, 14 Jun 2012 13:44:07 +0000 (15:44 +0200)
NEWS
contrib/shell_utils/apple_dump.in
contrib/shell_utils/asip-status.pl.in
etc/afpd/icon.h
etc/afpd/status.c
include/atalk/globals.h
libatalk/util/netatalk_conf.c
macros/netatalk.m4

diff --git a/NEWS b/NEWS
index 6b276e07627f7170e6cfc3c93b58dc6d06edc92e..3dac72943195c4b83ef5bb673af7bf081e817ec9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Changes in 3.0 beta3
+====================
+* UPD: read only mode if cnid scheme is last
+* REM: global option "icon"
+
 Changes in 3.0 beta2
 ====================
 * UPD: Solaris and friends: Replace initscript with SMF manifest
index e7cc759adb828b9e31289f6c0a673c5ae8ed766f..e98ad357e31a7dcc70ab30706023ffb55618d30f 100755 (executable)
 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #  GNU General Public License for more details.
-# 
+#
 
-# 
+#
 # References:
-# 
+#
 # Applesingle and AppleDouble format internals (version 1)
 # http://users.phg-online.de/tk/netatalk/doc/Apple/v1/
-# 
+#
 # AppleSingle/AppleDouble Formats for Foreign Files Developer's Note (version2)
 # http://users.phg-online.de/tk/netatalk/doc/Apple/v2/AppleSingle_AppleDouble.pdf
-# 
+#
 # Inside Macintosh: Macintosh Toolbox Essentials /
 # Chapter 7 - Finder Interface / Finder Interface Reference
 # http://developer.apple.com/legacy/mac/library/documentation/mac/toolbox/Toolbox-463.html
-# 
+#
 # Finder Interface Reference
 # http://developer.apple.com/legacy/mac/library/documentation/Carbon/Reference/Finder_Interface/Reference/reference.html
-# 
+#
 # Technical Note TN1150  HFS Plus Volume Format
 # http://developer.apple.com/mac/library/technotes/tn/tn1150.html#FinderInfo
-# 
+#
 # CarbonHeaders source
 # http://www.opensource.apple.com/source/CarbonHeaders/CarbonHeaders-8A428/Finder.h
 # http://www.opensource.apple.com/source/CarbonHeaders/CarbonHeaders-9A581/Finder.h
-# 
+#
 # Xcode 3.2.1
 # /usr/bin/SetFile
 # /usr/bin/GetFileInfo
-# 
+#
 # Mac OS X 10.6.2 kernel source
 # http://www.opensource.apple.com/source/xnu/xnu-1486.2.11/bsd/vfs/vfs_xattr.c
-# 
+#
 
 use File::Basename;
 use File::Spec;
@@ -85,7 +85,7 @@ while ($arg = shift @ARGV)
         printf ("                   If FILE is not AppleSingle/AppleDouble format,\n");
         printf ("                   look for extended attribute, .AppleDouble/FILE and ._FILE.\n");
         printf ("                   If DIR, look for extended attribute,\n");
-       printf ("                   DIR/.AppleDouble/.Parent and ._DIR.\n");
+        printf ("                   DIR/.AppleDouble/.Parent and ._DIR.\n");
         printf ("  -e               Dump extended attribute of FILE or DIR\n");
         printf ("  -f               Dump FILE. Assume FinderInfo to be FileInfo.\n");
         printf ("  -d               Dump FILE. Assume FinderInfo to be DirInfo.\n");
@@ -106,19 +106,19 @@ while ($arg = shift @ARGV)
         $finderinfo = 0;
     } elsif ($arg eq "-e") {
         if ($eacommand == 0) {
-           printf (STDERR "%s: unsupported option -e\n", basename($0));
-           printf (STDERR "because neither getfattr, xattr nor runat is not found.\n");
-           exit 1;
-       }
-       $eaoption = 1;
+            printf (STDERR "%s: unsupported option -e\n", basename($0));
+            printf (STDERR "because neither getfattr, xattr nor runat is found.\n");
+            exit 1;
+        }
+        $eaoption = 1;
     } elsif ($arg eq "-f") {
         $finderinfo = 1;
     } elsif ($arg eq "-d") {
         $finderinfo = 2;
     } elsif ($arg =~ /^-/) {
-       printf (STDERR "%s: invalid option %s\n", basename($0), $arg);
-       printf (STDERR "Try \`%s\ -h' for more information.\n", basename($0));
-       exit 1;
+        printf (STDERR "%s: invalid option %s\n", basename($0), $arg);
+        printf (STDERR "Try \`%s\ -h' for more information.\n", basename($0));
+        exit 1;
     } else {
         $afile = $arg;
     }
@@ -129,7 +129,7 @@ if (!($afile)) {
     exit 1;
 }
 if (!( -e $afile)) {
-    printf (STDERR "\"%s\" not found.\n", $afile);
+    printf (STDERR "\"%s\" is not found.\n", $afile);
     exit 1;
 }
 
@@ -140,43 +140,43 @@ $abspath = File::Spec->rel2abs($afile);
 
 if ( $eaoption == 1 ) {
     if ( -f $afile ) {
-       $finderinfo = 1;
+        $finderinfo = 1;
     } elsif ( -d $afile ) {
-       $finderinfo = 2;
+        $finderinfo = 2;
     } else {
-       printf (STDERR "unknown error: %s\n", $afile);
-       exit 1;
+        printf (STDERR "unknown error: %s\n", $afile);
+        exit 1;
     }
     if ( 0 == checkea($afile) ) {
-       printf (STDERR "\"%s\"'s extended attribute is not found\n",  $afile);
-       exit 1;
+        printf (STDERR "\"%s\"'s extended attribute is not found\n",  $afile);
+        exit 1;
     }
     $openfile = eaopenfile($afile);
     $openmessage = "Dumping \"$afile\"'s extended attribute...\n";
 } elsif ( $finderinfo != 0 ) {
-    ;
+    $openfile = $afile;
 } elsif ( -f $afile ) {
     if ( $basename eq ".Parent") {
-       $finderinfo = 2;
+        $finderinfo = 2;
     } elsif ( $path =~ /\/.AppleDouble\/$/ ) {
         $finderinfo = 1;
     } elsif ( $basename =~ /^._/ ) {
-       if ( -f $path.substr($basename, 2) ) {
-           $finderinfo = 1;
-       } elsif ( -d $path.substr($basename, 2) ) {
-           $finderinfo = 2;
-       }
+        if ( -f $path.substr($basename, 2) ) {
+            $finderinfo = 1;
+        } elsif ( -d $path.substr($basename, 2) ) {
+            $finderinfo = 2;
+        }
     }
     if (!open(INFILE, "<$afile")) {
-       printf (STDERR "cannot open %s\n",  $afile);
-       exit 1;
+        printf (STDERR "cannot open %s\n",  $afile);
+        exit 1;
     }
     read(INFILE,$buf,4);
     $val = unpack("N", $buf );
     close(INFILE);
     if ($val == 0x00051600 || $val == 0x00051607) {
         $openfile = $afile;
-       $openmessage = "Dumping \"$openfile\"...\n";
+        $openmessage = "Dumping \"$openfile\"...\n";
     } else {
         printf ("\"%s\" is not AppleSingle/AppleDouble format.\n", $afile);
         $finderinfo = 1;
@@ -185,30 +185,30 @@ if ( $eaoption == 1 ) {
         $osxfile = $path."._".$basename;
 
         if ( 1 == checkea($afile) ) {
-           printf ("extended attribute of \"%s\" is found.\n", $afile);
+            printf ("\"%s\"\'s extended attribute is found.\n", $afile);
             $adcount++;
-           $openfile = eaopenfile($afile);
-           $openmessage = "Dumping \"$afile\"'s extended attribute...\n";
-       }
-       if ( -e $netatalkfile ) {
+            $openfile = eaopenfile($afile);
+            $openmessage = "Dumping \"$afile\"'s extended attribute...\n";
+        }
+        if ( -e $netatalkfile ) {
             printf ("\"%s\" is found.\n", $netatalkfile);
-           $openfile = $netatalkfile;
-           $openmessage = "Dumping \"$openfile\"...\n";
+            $openfile = $netatalkfile;
+            $openmessage = "Dumping \"$openfile\"...\n";
         }
-       if ( -e $osxfile ) {
+        if ( -e $osxfile ) {
             printf ("\"%s\" is found.\n", $osxfile);
             $adcount++;
-           $openfile = $osxfile;
-           $openmessage = "Dumping \"$openfile\"...\n";
+            $openfile = $osxfile;
+            $openmessage = "Dumping \"$openfile\"...\n";
         }
-       if ( $adcount == 0 ) {
+        if ( $adcount == 0 ) {
             printf ("AppleSingle/AppleDouble data is not found.\n");
             exit 1;
-       }
-       if ( $adcount != 1 ) {
-            printf ("Specify which.\n");
+        }
+        if ( $adcount != 1 ) {
+            printf ("Specify any one.\n");
             exit 1;
-       }
+        }
     }
 } elsif ( -d $afile) {
     printf ("\"%s\" is a directory.\n", $afile);
@@ -218,30 +218,30 @@ if ( $eaoption == 1 ) {
     $osxfile = $path."._".$basename;
 
     if ( 1 == checkea($afile) ) {
-       printf ("extended attribute of \"%s\" is found.\n", $afile);
-       $adcount++;
-       $openfile = eaopenfile($afile);
-       $openmessage = "Dumping \"$afile\"'s extended attribute...\n";
+        printf ("\"%s\"\'s extended attribute is found.\n", $afile);
+        $adcount++;
+        $openfile = eaopenfile($afile);
+        $openmessage = "Dumping \"$afile\"'s extended attribute...\n";
     }
     if ( -e $netatalkfile ) {
-       printf ("\"%s\" found.\n", $netatalkfile);
-       $adcount++;
-       $openfile= $netatalkfile;
-       $openmessage = "Dumping \"$openfile\"...\n";
+        printf ("\"%s\" is found.\n", $netatalkfile);
+        $adcount++;
+        $openfile= $netatalkfile;
+        $openmessage = "Dumping \"$openfile\"...\n";
     }
     if ( -e $osxfile ) {
-       printf ("\"%s\" found.\n", $osxfile);
-       $adcount++;
-       $openfile = $osxfile;
-       $openmessage = "Dumping \"$openfile\"...\n";
+        printf ("\"%s\" is found.\n", $osxfile);
+        $adcount++;
+        $openfile = $osxfile;
+        $openmessage = "Dumping \"$openfile\"...\n";
     }
     if ( $adcount == 0 ) {
-       printf ("AppleSingle/AppleDouble data is not found.\n");
-       exit 1;
+        printf ("AppleSingle/AppleDouble data is not found.\n");
+        exit 1;
     }
     if ( $adcount != 1 ) {
-       printf ("Specify which.\n");
-       exit 1;
+        printf ("Specify any one.\n");
+        exit 1;
     }
 } else {
     printf (STDERR "unknown error: %s\n", $afile);
@@ -249,7 +249,7 @@ if ( $eaoption == 1 ) {
 }
 
 if (!open(INFILE, "<$openfile")) {
-    printf (STDERR "cannot open %s\n",  $afile);
+    printf (STDERR "cannot open %s\n",  $openfile);
     exit 1;
 }
 
@@ -375,7 +375,7 @@ for ( $num = 0 ; $num < $entnum ; $num++) {
 #    if ( $entid == 13 ) { ; } # Short Name
 #    if ( $entid == 14 ) { ; } # AFP File Info 
     elsif ( $entid == 15 ) { print "\n"; bedump($ofst,$len); } # Directory ID
-    elsif ( $entid == 0x8053567E  ) { print "\n"; bedump($ofst,$len); } # CNID (Netatalk Extended)
+    elsif ( $entid == 0x8053567E  ) { print "\n"; bedump($ofst,$len); ledump($ofst,$len); } # CNID (Netatalk Extended)
     elsif ( $entid == 0x8053594E  ) { print "\n"; bedump($ofst,$len); ledump($ofst,$len); } # DB stamp (Netatalk Extended)
     elsif ( $entid == 0x80444556  ) { print "\n"; bedump($ofst,$len); ledump($ofst,$len); } # dev (Netatalk Extended)
     elsif ( $entid == 0x80494E4F  ) { print "\n"; bedump($ofst,$len); ledump($ofst,$len); } # inode (Netatalk Extended)
@@ -383,8 +383,8 @@ for ( $num = 0 ; $num < $entnum ; $num++) {
 #    RAW Dump ---------------------------------------------------
 
     if ( ($quo > 0) || ($rem > 0)) {
-       print "\n";
-       print "-RAW DUMP--:  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F : (ASCII)\n";
+        print "\n";
+        print "-RAW DUMP--:  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F : (ASCII)\n";
     }
 
     seek(INFILE, $ofst, 0);
@@ -434,16 +434,16 @@ sub finderinfodump {
     seek(INFILE, $ofst, 0);
 
     if ($finderinfo == 0) {
-       print "\n";
-       print "-NOTE------: cannot detect whether FInfo or DInfo. assume FInfo.\n";
+        print "\n";
+        print "-NOTE------: cannot detect whether FInfo or DInfo. assume FInfo.\n";
     }
 
     if ($finderinfo == 0 || $finderinfo == 1) {
-       filefinderinfodump();
+        filefinderinfodump();
     } elsif ($finderinfo == 2) {
-       dirfinderinfodump();
+        dirfinderinfodump();
     } else {
-       print STDERR "unknown FinderInfo type\n"
+        print STDERR "unknown FinderInfo type\n"
     }
 
     if ($len > 32) { eadump(); }
@@ -602,27 +602,27 @@ sub flagsdump {
     printf ("color      : %d%d%d      : %s\n", ($flags >>  3) & 1,
             ($flags >>  2) & 1,
             ($flags >>  1) & 1,
-           @colortype[($flags & 0xE)>>1]);
+            @colortype[($flags & 0xE)>>1]);
     printf ("isOnDesk   : %d\n", ($flags >>  0) & 1);
 
 }
 
 sub xflagsdump {
-    
+
     read(INFILE,$buf,2);
     $flags = unpack("n", $buf );
-    
+
     if (($flags >> 15) == 1) {
-       print "Script     : ";
-       hexdump($buf, 1, 4, "");
+        print "Script     : ";
+        hexdump($buf, 1, 4, "");
     } else {
-       printf ("AreInvalid : %d\n", ($flags >> 15) & 1);
-       printf ("unknown bit: %d\n", ($flags >> 14) & 1);
-       printf ("unknown bit: %d\n", ($flags >> 13) & 1);
-       printf ("unknown bit: %d\n", ($flags >> 12) & 1);
-       printf ("unknown bit: %d\n", ($flags >> 11) & 1);
-       printf ("unknown bit: %d\n", ($flags >> 10) & 1);
-       printf ("unknown bit: %d\n", ($flags >>  9) & 1);
+        printf ("AreInvalid : %d\n", ($flags >> 15) & 1);
+        printf ("unknown bit: %d\n", ($flags >> 14) & 1);
+        printf ("unknown bit: %d\n", ($flags >> 13) & 1);
+        printf ("unknown bit: %d\n", ($flags >> 12) & 1);
+        printf ("unknown bit: %d\n", ($flags >> 11) & 1);
+        printf ("unknown bit: %d\n", ($flags >> 10) & 1);
+        printf ("unknown bit: %d\n", ($flags >>  9) & 1);
     }
 
     printf ("CustomBadge: %d\n", ($flags >>  8) & 1);
@@ -638,7 +638,7 @@ sub xflagsdump {
 }
 
 sub eadump {
-    
+
     print "\n";
     print "-EA--------:\n";
 
@@ -692,45 +692,45 @@ sub eadump {
     printf("     : %d\n", $ea_num_attrs);
 
     $pos = tell(INFILE);
-    
+
     for ($i = 0 ; $i < $ea_num_attrs ; $i++) {
-       
-       $pos = (($pos & 0x3) == 0) ? ($pos) : ((($pos >> 2) + 1) << 2);
-       seek(INFILE, $pos, 0);
-
-       print "-EA ENTRY--:\n";
-       
-       read(INFILE,$buf,4);
-       $ea_offset = unpack("N", $buf );
-       printf("offset     : %08X", $ea_offset);
-       printf(" : %d\n", $ea_offset);
-       
-       read(INFILE,$buf,4);
-       $ea_length = unpack("N", $buf );
-       printf("length     : %08X", $ea_length);
-       printf(" : %d\n", $ea_length);
-       
-       read(INFILE,$buf,2);
-       print "flags      : ";
-       hexdump($buf, 2, 4, "");
-       
-       read(INFILE,$buf,1);
-       $ea_namelen = unpack("C", $buf );
-       printf("namelen    : %02X", $ea_namelen);
-       printf("       : %d\n", $ea_namelen);
-
-       $ea_namequo = $ea_namelen >> 4;
-       $ea_namerem = $ea_namelen & 0xF;
-       print "-EA NAME---:  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F : (ASCII)\n";
-       rawdump($ea_namequo, $ea_namerem);
-
-       $pos = tell(INFILE);
-
-       seek(INFILE, $ea_offset, 0);
-       $ea_quo = $ea_length >> 4;
-       $ea_rem = $ea_length & 0xF;
-       print "-EA VALUE--:  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F : (ASCII)\n";
-       rawdump($ea_quo, $ea_rem);
+
+        $pos = (($pos & 0x3) == 0) ? ($pos) : ((($pos >> 2) + 1) << 2);
+        seek(INFILE, $pos, 0);
+
+        print "-EA ENTRY--:\n";
+
+        read(INFILE,$buf,4);
+        $ea_offset = unpack("N", $buf );
+        printf("offset     : %08X", $ea_offset);
+        printf(" : %d\n", $ea_offset);
+
+        read(INFILE,$buf,4);
+        $ea_length = unpack("N", $buf );
+        printf("length     : %08X", $ea_length);
+        printf(" : %d\n", $ea_length);
+
+        read(INFILE,$buf,2);
+        print "flags      : ";
+        hexdump($buf, 2, 4, "");
+
+        read(INFILE,$buf,1);
+        $ea_namelen = unpack("C", $buf );
+        printf("namelen    : %02X", $ea_namelen);
+        printf("       : %d\n", $ea_namelen);
+
+        $ea_namequo = $ea_namelen >> 4;
+        $ea_namerem = $ea_namelen & 0xF;
+        print "-EA NAME---:  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F : (ASCII)\n";
+        rawdump($ea_namequo, $ea_namerem);
+
+        $pos = tell(INFILE);
+
+        seek(INFILE, $ea_offset, 0);
+        $ea_quo = $ea_length >> 4;
+        $ea_rem = $ea_length & 0xF;
+        print "-EA VALUE--:  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F : (ASCII)\n";
+        rawdump($ea_quo, $ea_rem);
     }
 }
 
@@ -738,56 +738,54 @@ sub bedump  {
     my ($ofst, $len) = @_;
     my ($i);
     my ($value);
-    
+
     seek(INFILE, $ofst, 0);
-    
+
     printf("%2dbit-BE   : ", $len * 8 );
-    
+
     $value = 0;
     for ( $i=0 ; $i < $len ; $i++ ) {
-       read(INFILE,$buf,1);
-       $bytedata[$i] = unpack("C", $buf );
-       $value += $bytedata[$i] << (($len - $i -1) * 8) ;
+        read(INFILE,$buf,1);
+        $bytedata[$i] = unpack("C", $buf );
+          $value += $bytedata[$i] << (($len - $i -1) * 8) ;
     }
 
     for ( $i=0 ; $i < $len ; $i++ ) {
-       printf("%02X", $bytedata[$i]);
+        printf("%02X", $bytedata[$i]);
     }
 
     printf(" : %s", $value);
     print "\n";
-    
 }
 
 sub ledump  {
     my ($ofst, $len) = @_;
     my ($i);
     my ($value);
-    
+
     seek(INFILE, $ofst, 0);
-    
+
     printf("%2dbit-LE   : ", $len * 8 );
-    
+
     $value = 0;
     for ( $i=0 ; $i < $len ; $i++ ) {
-       read(INFILE,$buf,1);
-       $bytedata[$len - $i - 1] = unpack("C", $buf );
-       $value += $bytedata[$len - $i -1] << ($i * 8) ;
+        read(INFILE,$buf,1);
+        $bytedata[$len - $i - 1] = unpack("C", $buf );
+          $value += $bytedata[$len - $i -1] << ($i * 8) ;
     }
 
     for ( $i=0 ; $i < $len ; $i++ ) {
-       printf("%02X", $bytedata[$i]);
+        printf("%02X", $bytedata[$i]);
     }
 
     printf(" : %s", $value);
     print "\n";
-    
 }
 
 sub rawdump {
     my ($quo, $rem) = @_;
     my ($addrs, $line, $buf);
-    
+
     $addrs = 0;
     for ( $line = 0 ; $line < $quo ; $line++) {
         read(INFILE, $buf, 16);
@@ -800,7 +798,6 @@ sub rawdump {
         printf ( "%08X   :", $addrs);
         hexdump($buf, $rem, 16, " ");
     }
-    
 }
 
 sub hexdump {
@@ -833,54 +830,62 @@ sub hexdump {
 sub checkea {
     my ($file) = @_;
 
+    $file =~ s/\\/\\\\/g;
+    $file =~ s/\"/\\\"/g;
+    $file =~ s/\$/\\\$/g;
+    $file =~ s/\`/\\\`/g;
     if ( $eacommand == 1 ) {
-       open(EALIST, "getfattr ".$file." |");
-       while(<EALIST>) {
-           if ( $_ eq "user.org.netatalk.Metadata\n" ) {
-               close (EALIST);
-               return 1;
-           }
-       }
-       close (EALIST);
-       return 0;
+        open(EALIST, "getfattr \"$file\" |");
+        while(<EALIST>) {
+            if ( $_ eq "user.org.netatalk.Metadata\n" ) {
+                close (EALIST);
+                return 1;
+            }
+        }
+        close (EALIST);
+        return 0;
     } elsif ( $eacommand == 2 ) {
-       open(EALIST, "attr -q -l ".$file." |");
-       while(<EALIST>) {
-           if ( $_ eq "org.netatalk.Metadata\n" ) {
-               close (EALIST);
-               return 1;
-           }
-       }
-       close (EALIST);
-       return 0;
+        open(EALIST, "attr -q -l \"$file\" |");
+        while(<EALIST>) {
+            if ( $_ eq "org.netatalk.Metadata\n" ) {
+                close (EALIST);
+                return 1;
+            }
+        }
+        close (EALIST);
+        return 0;
     } elsif ( $eacommand == 3 ) {
-       open(EALIST, "runat ".$file." ls -1 |");
-       while(<EALIST>) {
-           if ( $_ eq "org.netatalk.Metadata\n" ) {
-               close (EALIST);
-               return 1;
-           }
-       }
-       close (EALIST);
-       return 0;
+        open(EALIST, "runat \"$file\" ls -1 |");
+        while(<EALIST>) {
+            if ( $_ eq "org.netatalk.Metadata\n" ) {
+                close (EALIST);
+                return 1;
+            }
+        }
+        close (EALIST);
+        return 0;
     } else {
-       return 0;
+        return 0;
     }
 }
 
 sub eaopenfile {
     my ($file) = @_;
 
+    $file =~ s/\\/\\\\/g;
+    $file =~ s/\"/\\\"/g;
+    $file =~ s/\$/\\\$/g;
+    $file =~ s/\`/\\\`/g;
     ($eatempfh, $eatempfile) = tempfile(UNLINK => 1);
 
     if ( $eacommand == 1 ) {
-       system("getfattr --only-values -n user.org.netatalk.Metadata $file > $eatempfile");
+        system("getfattr --only-values -n user.org.netatalk.Metadata \"$file\" > $eatempfile");
     } elsif ( $eacommand == 2 ) {
-       system("attr -q -g org.netatalk.Metadata $file > $eatempfile");
+        system("attr -q -g org.netatalk.Metadata \"$file\" > $eatempfile");
     } elsif ( $eacommand == 3 ) {
-       system("runat $file cat org.netatalk.Metadata > $eatempfile");
+        system("runat \"$file\" cat org.netatalk.Metadata > $eatempfile");
     } else {
-       return "";
+        return "";
     }
 
     close($eatempfh);
index 4fa260947ca9c059fb354350d8cd22c2b71a5c8c..8814b8ecb0c9ec9c3c39841207bb741439f41b72 100755 (executable)
@@ -229,7 +229,12 @@ sub parse_FPGetSrvrInfo()
 
        my ($icon_offset) = unpack("n", @packet[6] . @packet[7]);
        print "Volume Icon & Mask offset: $icon_offset\n" if ($main::debug);
-       print "Volume Icon & Mask: exist\n" if ($icon_offset);
+       print "Volume Icon & Mask: ";
+       if ($icon_offset) {
+           print "Yes\n";
+       } else {
+           print "No\n";
+       }
 
        my ($flags) = unpack("n", @packet[8] . @packet[9]);
        my (@flags) = parse_afp_flags($flags);
index c26b6fd63e4e56cc647155f9f47e850a0274523f..ee0e56ca975e4c5d7fdd6546975e5e0516f10d5d 100644 (file)
@@ -8,224 +8,6 @@
 
 #include <atalk/globals.h>
 
-static const unsigned char apple_atalk_icon[] = { /* default appletalk icon */
-    0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
-    0x00,  0x01,  0x00,  0x00,  0x00,  0x02,  0x9F,  0xE0,
-    0x00,  0x04,  0x50,  0x30,  0x00,  0x08,  0x30,  0x28,
-    0x00,  0x10,  0x10,  0x3C,  0x07,  0xA0,  0x08,  0x04,
-    0x18,  0x7F,  0x04,  0x04,  0x10,  0x00,  0x82,  0x04,
-    0x10,  0x00,  0x81,  0x04,  0x10,  0x00,  0x82,  0x04,
-    0x10,  0x00,  0x84,  0x04,  0x10,  0x00,  0x88,  0x04,
-    0x10,  0x00,  0x90,  0x04,  0x10,  0x00,  0xB0,  0x04,
-    0x10,  0x00,  0xD0,  0x04,  0xFF,  0xFF,  0xFF,  0xFF,
-    0x40,  0x00,  0x00,  0x02,  0x3F,  0xFF,  0xFF,  0xFC,
-    0x00,  0x00,  0x07,  0x00,  0x00,  0x00,  0x05,  0x00,
-    0x00,  0x00,  0x05,  0x00,  0x00,  0x00,  0x05,  0x00,
-    0x00,  0x00,  0x0F,  0x80,  0x00,  0x00,  0x08,  0x80,
-    0x00,  0x00,  0x08,  0x80,  0x00,  0x00,  0x0F,  0x80,
-    0x00,  0x00,  0x0A,  0x80,  0xBF,  0xFF,  0xF2,  0x74,
-    0x00,  0x00,  0x05,  0x00,  0xBF,  0xFF,  0xF8,  0xF4,
-    0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
-    0x00,  0x01,  0x00,  0x00,  0x00,  0x03,  0x9F,  0xE0,
-    0x00,  0x07,  0xDF,  0xF0,  0x00,  0x0F,  0xFF,  0xF8,
-    0x00,  0x1F,  0xFF,  0xFC,  0x07,  0xBF,  0xFF,  0xFC,
-    0x1F,  0xFF,  0xFF,  0xFC,  0x1F,  0xFF,  0xFF,  0xFC,
-    0x1F,  0xFF,  0xFF,  0xFC,  0x1F,  0xFF,  0xFF,  0xFC,
-    0x1F,  0xFF,  0xFF,  0xFC,  0x1F,  0xFF,  0xFF,  0xFC,
-    0x1F,  0xFF,  0xFF,  0xFC,  0x1F,  0xFF,  0xFF,  0xFC,
-    0x1F,  0xFF,  0xFF,  0xFC,  0xFF,  0xFF,  0xFF,  0xFF,
-    0x7F,  0xFF,  0xFF,  0xFE,  0x3F,  0xFF,  0xFF,  0xFC,
-    0x00,  0x00,  0x07,  0x00,  0x00,  0x00,  0x07,  0x00,
-    0x00,  0x00,  0x07,  0x00,  0x00,  0x00,  0x07,  0x00,
-    0x00,  0x00,  0x0F,  0x80,  0x00,  0x00,  0x0F,  0x80,
-    0x00,  0x00,  0x0F,  0x80,  0x00,  0x00,  0x0F,  0x80,
-    0x00,  0x00,  0x0F,  0x80,  0xBF,  0xFF,  0xFF,  0xF4,
-    0xBF,  0xFF,  0xFD,  0xF4,  0xBF,  0xFF,  0xF8,  0xF4
-};
-
-static const unsigned char apple_tcp_icon[] = { /* default asip icon */
-    0x30,  0x00,  0x8f,  0xf8,  0xcc,  0x01,  0x48,  0x0c,
-    0xb3,  0x32,  0x28,  0x0a,  0x8c,  0xcc,  0x7c,  0x0f,
-    0x83,  0x02,  0xff,  0x01,  0x80,  0xc3,  0xc3,  0x81,
-    0x80,  0x33,  0xe3,  0xc1,  0x80,  0x0b,  0xd3,  0xc1,
-    0x80,  0x0b,  0xb1,  0x61,  0x80,  0x0b,  0xe0,  0xe1,
-    0x80,  0x0b,  0xe1,  0xe1,  0x80,  0x0b,  0xd1,  0xe1,
-    0xc0,  0x0a,  0xc0,  0xe1,  0x70,  0x0b,  0x78,  0xc1,
-    0x1c,  0x0b,  0x79,  0xc1,  0x17,  0x0b,  0x33,  0xff,
-    0x21,  0xcb,  0xff,  0xc4,  0x40,  0x7f,  0xff,  0x02,
-    0x80,  0x1e,  0x00,  0x01,  0xff,  0xff,  0xff,  0xff,
-    0x80,  0x00,  0x00,  0x01,  0xff,  0xff,  0xff,  0xff,
-    0x00,  0x02,  0x80,  0x00,  0x00,  0x02,  0x80,  0x00,
-    0x00,  0x07,  0xc0,  0x00,  0x00,  0x04,  0x40,  0x00,
-    0x00,  0x04,  0x40,  0x00,  0x00,  0x07,  0xc0,  0x00,
-    0x00,  0x05,  0x40,  0x00,  0x0f,  0xf9,  0x3f,  0xfc,
-    0x00,  0x02,  0x80,  0x00,  0x0f,  0xfc,  0x7f,  0xfc,
-    0x30,  0x00,  0x8f,  0xf8,  0xfc,  0x01,  0xcf,  0xfc,
-    0xff,  0x33,  0xef,  0xfe,  0xff,  0xff,  0xff,  0xff,
-    0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,
-    0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,
-    0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,
-    0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,
-    0xff,  0xff,  0xff,  0xff,  0x7f,  0xff,  0xff,  0xff,
-    0x1f,  0xff,  0xff,  0xff,  0x1f,  0xff,  0xff,  0xff,
-    0x3f,  0xff,  0xff,  0xfc,  0x7f,  0xff,  0xff,  0xfe,
-    0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,
-    0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,
-    0x00,  0x03,  0x80,  0x00,  0x00,  0x03,  0x80,  0x00,
-    0x00,  0x07,  0xc0,  0x00,  0x00,  0x07,  0xc0,  0x00,
-    0x00,  0x07,  0xc0,  0x00,  0x00,  0x07,  0xc0,  0x00,
-    0x00,  0x07,  0xc0,  0x00,  0xff,  0xff,  0xff,  0xff,
-    0x3f,  0xfe,  0xff,  0xff,  0xff,  0xfc,  0x7f,  0xff
-};
-
-#if defined( ultrix )
-static const unsigned char icon[] = { /* declogo */
-    0x0, 0x80, 0x0, 0x0, 0x1, 0xC0, 0x0, 0x0,
-    0x3, 0xE0, 0x0, 0x0, 0x7, 0xF0, 0x0, 0x0,
-    0xF, 0xB0, 0x0, 0x0, 0x13, 0x6C, 0x0, 0x0,
-    0x2C, 0xDE, 0x0, 0x0, 0x6D, 0xBB, 0x0, 0x0,
-    0xF3, 0x7F, 0x80, 0x0, 0x7E, 0xEF, 0x40, 0x0,
-    0x3D, 0xDE, 0xE0, 0x0, 0x1B, 0xBD, 0xF0, 0x0,
-    0x7, 0x7B, 0xF8, 0x0, 0x7, 0xF7, 0xF8, 0x0,
-    0x3, 0xEC, 0xF6, 0x0, 0x1, 0xDB, 0x6F, 0x0,
-    0x0, 0xBB, 0x5D, 0x80, 0x0, 0x6C, 0xBF, 0xC0,
-    0x0, 0x2D, 0x77, 0xA0, 0x0, 0x12, 0xEF, 0x70,
-    0x0, 0xD, 0xDE, 0xF8, 0x7F, 0xFF, 0xFF, 0xFE,
-    0x20, 0x0, 0x0, 0x4, 0x1F, 0xFF, 0xFF, 0xF8,
-    0x0, 0x4, 0x40, 0x0, 0x0, 0x4, 0x40, 0x0,
-    0x0, 0x3, 0x80, 0x0, 0x0, 0x4, 0x40, 0x0,
-    0xAF, 0xF9, 0x3F, 0xF5, 0x0, 0x2, 0x80, 0x0,
-    0xAF, 0xFC, 0x7F, 0xF5, 0x0, 0x0, 0x0, 0x0,
-    0x0, 0x80, 0x0, 0x0, 0x1, 0xC0, 0x0, 0x0,
-    0x3, 0xE0, 0x0, 0x0, 0x7, 0xF0, 0x0, 0x0,
-    0xF, 0xF8, 0x0, 0x0, 0x1F, 0xFC, 0x0, 0x0,
-    0x3F, 0xFE, 0x0, 0x0, 0x7F, 0xFF, 0x0, 0x0,
-    0xFF, 0xFF, 0x80, 0x0, 0x7F, 0xFF, 0xC0, 0x0,
-    0x3F, 0xFF, 0xE0, 0x0, 0x1F, 0xFF, 0xF0, 0x0,
-    0xF, 0xFF, 0xF8, 0x0, 0x7, 0xFF, 0xFC, 0x0,
-    0x3, 0xFF, 0xFE, 0x0, 0x1, 0xFF, 0xFF, 0x0,
-    0x0, 0xFF, 0xFF, 0x80, 0x0, 0x7F, 0xFF, 0xC0,
-    0x0, 0x3F, 0xFF, 0xE0, 0x0, 0x1F, 0xFF, 0xF0,
-    0x0, 0xF, 0xFF, 0xF8, 0x7F, 0xFF, 0xFF, 0xFE,
-    0x3F, 0xFF, 0xFF, 0xFC, 0x1F, 0xFF, 0xFF, 0xF8,
-    0x0, 0x7, 0xC0, 0x0, 0x0, 0x7, 0xC0, 0x0,
-    0x0, 0x3, 0x80, 0x0, 0x0, 0x7, 0xC0, 0x0,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF,
-    0xFF, 0xFC, 0x7F, 0xFF, 0x0, 0x0, 0x0, 0x0
-};
-
-#else
-#if defined( vax )
-static const unsigned char icon[] = { /* daemon */
-    0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x2, 0x0,
-    0x1, 0x80, 0x3, 0x0, 0x2, 0x80, 0x2, 0x80,
-    0x2, 0x80, 0x2, 0x80, 0x4, 0x80, 0x2, 0x40,
-    0x4, 0x87, 0xC2, 0x40, 0x4, 0x58, 0x34, 0x40,
-    0x4, 0x20, 0x8, 0x40, 0x2, 0x16, 0xD0, 0x80,
-    0x1, 0x1, 0x1, 0x0, 0x2, 0x80, 0x2, 0x80,
-    0x2, 0x9C, 0x72, 0x80, 0x4, 0x22, 0x88, 0x40,
-    0x4, 0x41, 0x4, 0x40, 0x4, 0x41, 0x4, 0x40,
-    0x4, 0x41, 0x4, 0x40, 0x4, 0x49, 0x24, 0x40,
-    0xE, 0x55, 0x54, 0xE0, 0x10, 0x5D, 0x74, 0x10,
-    0x10, 0x3E, 0xF8, 0x10, 0x7F, 0xFC, 0x7F, 0xFE,
-    0x20, 0x4, 0x40, 0x4, 0x1F, 0xFC, 0x7F, 0xF8,
-    0x0, 0x7, 0xC0, 0x0, 0x0, 0x4, 0x40, 0x0,
-    0x0, 0x3, 0x80, 0x0, 0x0, 0x4, 0x40, 0x0,
-    0xAF, 0xF9, 0x3F, 0xF5, 0x0, 0x2, 0x80, 0x0,
-    0xAF, 0xFC, 0x7F, 0xF5, 0x0, 0x0, 0x0, 0x0,
-    0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x2, 0x0,
-    0x1, 0x80, 0x3, 0x0, 0x3, 0x80, 0x3, 0x80,
-    0x3, 0x80, 0x3, 0x80, 0x7, 0x80, 0x3, 0xC0,
-    0x7, 0x87, 0xC3, 0xC0, 0x7, 0xDF, 0xF7, 0xC0,
-    0x7, 0xFF, 0xFF, 0xC0, 0x3, 0xFF, 0xFF, 0x80,
-    0x1, 0xFF, 0xFF, 0x0, 0x3, 0xFF, 0xFF, 0x80,
-    0x3, 0xFF, 0xFF, 0x80, 0x7, 0xFF, 0xFF, 0xC0,
-    0x7, 0xFF, 0xFF, 0xC0, 0x7, 0xFF, 0xFF, 0xC0,
-    0x7, 0xFF, 0xFF, 0xC0, 0x7, 0xFF, 0xFF, 0xC0,
-    0xF, 0xFF, 0xFF, 0xE0, 0x1F, 0xFF, 0xFF, 0xF0,
-    0x1F, 0xFF, 0xFF, 0xF0, 0x7F, 0xFF, 0xFF, 0xFE,
-    0x3F, 0xFF, 0xFF, 0xFC, 0x1F, 0xFF, 0xFF, 0xF8,
-    0x0, 0x7, 0xC0, 0x0, 0x0, 0x7, 0xC0, 0x0,
-    0x0, 0x3, 0x80, 0x0, 0x0, 0x4, 0x40, 0x0,
-    0xAF, 0xF9, 0x3F, 0xF5, 0x0, 0x2, 0x80, 0x0,
-    0xAF, 0xFC, 0x7F, 0xF5, 0x0, 0x0, 0x0, 0x0
-};
-
-#else
-#if defined( sun )
-static const unsigned char icon[] = { /* sunlogo */
-    0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x80, 0x0,
-    0x0, 0x2, 0x40, 0x0, 0x0, 0x2, 0x20, 0x0,
-    0x0, 0x9, 0x10, 0x0, 0x0, 0x4, 0x88, 0x0,
-    0x0, 0x22, 0x44, 0x0, 0x0, 0x11, 0x20, 0x0,
-    0x0, 0x88, 0x91, 0x0, 0x1, 0x4, 0x42, 0x0,
-    0x2, 0x22, 0x44, 0x40, 0x4, 0x41, 0x88, 0x80,
-    0x8, 0x98, 0x11, 0x30, 0x11, 0x24, 0x22, 0x48,
-    0x12, 0x44, 0x24, 0x88, 0xC, 0x88, 0x19, 0x10,
-    0x1, 0x11, 0x82, 0x20, 0x2, 0x22, 0x44, 0x40,
-    0x0, 0x42, 0x20, 0x80, 0x0, 0x89, 0x11, 0x0,
-    0x0, 0x4, 0x88, 0x0, 0x7F, 0xFF, 0xFF, 0xFE,
-    0x20, 0x0, 0x0, 0x4, 0x1F, 0xFF, 0xFF, 0xF8,
-    0x0, 0x4, 0x40, 0x0, 0x0, 0x4, 0x40, 0x0,
-    0x0, 0x3, 0x80, 0x0, 0x0, 0x4, 0x40, 0x0,
-    0xAF, 0xF9, 0x3F, 0xF5, 0x0, 0x2, 0x80, 0x0,
-    0xAF, 0xFC, 0x7F, 0xF5, 0x0, 0x0, 0x0, 0x0,
-    0x0, 0x1, 0x80, 0x0, 0x0, 0x3, 0xC0, 0x0,
-    0x0, 0x7, 0xE0, 0x0, 0x0, 0xF, 0xF0, 0x0,
-    0x0, 0x1F, 0xF8, 0x0, 0x0, 0x3F, 0xFC, 0x0,
-    0x0, 0x7F, 0xFE, 0x0, 0x0, 0xFF, 0xFF, 0x0,
-    0x1, 0xFF, 0xFF, 0x80, 0x3, 0xFF, 0xFF, 0xC0,
-    0x7, 0xFF, 0xFF, 0xE0, 0xF, 0xFF, 0xFF, 0xF0,
-    0x1F, 0xFF, 0xFF, 0xF8, 0x3F, 0xFF, 0xFF, 0xFC,
-    0x3F, 0xFF, 0xFF, 0xFC, 0x1F, 0xFF, 0xFF, 0xF8,
-    0xF, 0xFF, 0xFF, 0xF0, 0x7, 0xFF, 0xFF, 0xE0,
-    0x3, 0xFF, 0xFF, 0xC0, 0x1, 0xFF, 0xFF, 0x80,
-    0x0, 0xFF, 0xFF, 0x0, 0x7F, 0xFF, 0xFF, 0xFE,
-    0x3F, 0xFF, 0xFF, 0xFC, 0x1F, 0xFF, 0xFF, 0xF8,
-    0x0, 0x7, 0xC0, 0x0, 0x0, 0x7, 0xC0, 0x0,
-    0x0, 0x3, 0x80, 0x0, 0x0, 0x7, 0xC0, 0x0,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFC, 0x7F, 0xFF, 0x0, 0x0, 0x0, 0x0
-};
-
-#else
-#if defined( _IBMR2 )
-static const unsigned char icon[] = { /* hagar */
-    0x0, 0x0, 0x0, 0x0, 0x18, 0x0, 0x0, 0x18,
-    0x24, 0x0, 0x0, 0x24, 0x44, 0x3, 0xC0, 0x22,
-    0x44, 0xC, 0x30, 0x22, 0x42, 0x30, 0xC, 0x42,
-    0x41, 0x40, 0x2, 0x82, 0x41, 0x80, 0x1, 0x82,
-    0x21, 0x0, 0x0, 0x84, 0x11, 0x41, 0x2, 0x88,
-    0xE, 0xA2, 0x85, 0x70, 0x4, 0x41, 0x2, 0x20,
-    0x4, 0x0, 0x0, 0x20, 0x3, 0xFF, 0xFF, 0xC0,
-    0x3, 0xC0, 0x3, 0xC0, 0x3, 0x82, 0x41, 0xC0,
-    0x7, 0x81, 0x81, 0xE0, 0x7, 0xC2, 0x43, 0xE0,
-    0x7, 0xFC, 0x3F, 0xE0, 0x7, 0xFC, 0x3F, 0xE0,
-    0x7F, 0xFC, 0x3F, 0xFE, 0x20, 0x3, 0xC0, 0x4,
-    0x1F, 0xFF, 0xFF, 0xF8, 0x0, 0x2, 0x40, 0x0,
-    0x0, 0x2, 0x40, 0x0, 0x0, 0x3, 0xC0, 0x0,
-    0x0, 0x4, 0x20, 0x0, 0xAF, 0xF9, 0x9F, 0xF5,
-    0x0, 0x2, 0x40, 0x0, 0xAF, 0xFC, 0x3F, 0xF5,
-    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-    0x0, 0x0, 0x0, 0x0, 0x18, 0x0, 0x0, 0x18,
-    0x3C, 0x0, 0x0, 0x3C, 0x7C, 0x3, 0xC0, 0x3E,
-    0x7C, 0xF, 0xF0, 0x3E, 0x7E, 0x3F, 0xFC, 0x7E,
-    0x7F, 0x7F, 0xFE, 0xFE, 0x7F, 0xFF, 0xFF, 0xFE,
-    0x3F, 0xFF, 0xFF, 0xFC, 0x1F, 0xFF, 0xFF, 0xF8,
-    0xF, 0xFF, 0xFF, 0xF0, 0x7, 0xFF, 0xFF, 0xE0,
-    0x7, 0xFF, 0xFF, 0xE0, 0x3, 0xFF, 0xFF, 0xC0,
-    0x3, 0xFF, 0xFF, 0xC0, 0x3, 0xFF, 0xFF, 0xC0,
-    0x7, 0xFF, 0xFF, 0xE0, 0x7, 0xFF, 0xFF, 0xE0,
-    0x7, 0xFF, 0xFF, 0xE0, 0x7, 0xFF, 0xFF, 0xE0,
-    0x7F, 0xFF, 0xFF, 0xFE, 0x3F, 0xFF, 0xFF, 0xFC,
-    0x1F, 0xFF, 0xFF, 0xF8, 0x0, 0x3, 0xC0, 0x0,
-    0x0, 0x3, 0xC0, 0x0, 0x0, 0x3, 0xC0, 0x0,
-    0x0, 0x7, 0xE0, 0x0, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFE, 0x7F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF,
-    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
-};
-
-#else
 static const unsigned char icon[] = { /* globe */
     0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0xF0, 0x0,
     0x0, 0x30, 0xC, 0x0, 0x0, 0xC0, 0x3, 0x0,
@@ -260,9 +42,5 @@ static const unsigned char icon[] = { /* globe */
     0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF,
     0xFF, 0xFC, 0x7F, 0xFF, 0x0, 0x0, 0x0, 0x0
 };
-#endif /*_IBMR2*/
-#endif /*sun*/
-#endif /*vax*/
-#endif /*ultrix*/
 
 #endif
index bdee676dcfe646c62900db4043d9eabf8d03b845..f42bf5ec0ef97d657caca080f4a095b36f3db6b4 100644 (file)
@@ -613,10 +613,7 @@ void status_init(AFPObj *obj, DSI *dsi)
     status_machine(status);
     status_versions(status, dsi);
     status_uams(status, options->uamlist);
-    if (options->flags & OPTION_CUSTOMICON)
-        status_icon(status, icon, sizeof(icon), c);
-    else
-        status_icon(status, apple_atalk_icon, sizeof(apple_atalk_icon), c);
+    status_icon(status, icon, sizeof(icon), c);
 
     sigoff = status_signature(status, &c, options);
     /* c now contains the offset where the netaddress offset lives */
@@ -630,10 +627,6 @@ void status_init(AFPObj *obj, DSI *dsi)
     if ( statuslen < maxstatuslen) 
         statuslen = status_utf8servername(status, &c, dsi, options);
 
-    if ((options->flags & OPTION_CUSTOMICON) == 0) {
-        status_icon(status, apple_tcp_icon, sizeof(apple_tcp_icon), 0);
-    }
-
     dsi->signature = status + sigoff;
     dsi->statuslen = statuslen;
 }
index 124c398865500dac322c971d9ae7f7234093c426..28d928b418a2264d51103628db3a82cb38a2bfd3 100644 (file)
@@ -38,7 +38,7 @@
 #define OPTION_CLOSEVOL      (1 << 1)
 #define OPTION_SERVERNOTIF   (1 << 2)
 #define OPTION_NOSENDFILE    (1 << 3)
-#define OPTION_CUSTOMICON    (1 << 4)
+/* #define OPTION_CUSTOMICON    (1 << 4) */
 #define OPTION_AFP_READ_LOCK (1 << 5) /* whether to do AFP spec conforming read locks (default: no) */
 #define OPTION_ANNOUNCESSH   (1 << 6)
 #define OPTION_UUID          (1 << 7)
index 0b6e4b7b5695e7918986ce23ee9927b78d99f495..4479116991d27a422638fb33700b7e64d5e86f2b 100644 (file)
@@ -756,12 +756,15 @@ static struct vol *creatvol(AFPObj *obj,
      * 1) neither the rolist nor the rwlist exist -> rw
      * 2) rolist exists -> ro if user is in it.
      * 3) rwlist exists -> ro unless user is in it.
+     * 4) cnid scheme = last -> ro forcibly.
      */
     if (pwd) {
         if (accessvol(obj, getoption(obj->iniconfig, section, "rolist", preset, NULL), pwd->pw_name) == 1
             || accessvol(obj, getoption(obj->iniconfig, section, "rwlist", preset, NULL), pwd->pw_name) == 0)
             volume->v_flags |= AFPVOL_RO;
     }
+    if (0 == strcmp(volume->v_cnidscheme, "last"))
+        volume->v_flags |= AFPVOL_RO;
 
     if ((volume->v_flags & AFPVOL_NODEV))
         volume->v_ad_options |= ADVOL_NODEV;
@@ -1423,8 +1426,6 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
     /* "server options" boolean options */
     if (!iniparser_getboolean(config, INISEC_GLOBAL, "zeroconf", 1))
         options->flags |= OPTION_NOZEROCONF;
-    if (iniparser_getboolean(config, INISEC_GLOBAL, "icon", 0))
-        options->flags |= OPTION_CUSTOMICON;
     if (iniparser_getboolean(config, INISEC_GLOBAL, "advertise ssh", 0))
         options->flags |= OPTION_ANNOUNCESSH;
     if (iniparser_getboolean(config, INISEC_GLOBAL, "map acls", 1))
index ed57db0ccb07f7e1c7be7d9bcc4e354b1b79e398..71c72447c5bbb0321252c2770a201eaee51824ac 100644 (file)
@@ -36,12 +36,16 @@ AC_MSG_CHECKING([whether to use Filesystem Hierarchy Standard (FHS) compatibilit
 AC_ARG_ENABLE(fhs,
        [  --enable-fhs            use Filesystem Hierarchy Standard (FHS) compatibility],[
        if test "$enableval" = "yes"; then
-               uams_path="${libdir}/netatalk"
+               bindir="/bin"
+               sbindir="/sbin"
                sysconfdir="/etc"
-               PKGCONFDIR=${sysconfdir}/netatalk
-               SERVERTEXT="${PKGCONFDIR}/msg"
-               use_pam_so=yes
+               libdir="/lib"
+               localstatedir="/var"
                mandir="/usr/share/man"
+               uams_path="${libdir}/netatalk"
+               PKGCONFDIR="${sysconfdir}"
+               SERVERTEXT="${localstatedir}/netatalk/msg"
+               use_pam_so=yes
                AC_DEFINE(FHS_COMPATIBILITY, 1, [Define if you want compatibily with the FHS])
                AC_MSG_RESULT([yes])
        else