diff --git a/INSTALL b/INSTALL index f3858a5..80f3e78 100644 --- a/INSTALL +++ b/INSTALL @@ -47,7 +47,7 @@ details, run it with the '-d' option to see detailed debug info. To mount a filesystem: -mount_afp "afp://username:password@servername/volumename" +mount_afp2 "afp://username:password@servername/volumename" After this, you should be able to access files on . diff --git a/Makefile.in b/Makefile.in index 4450bc9..abb4a6f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -108,7 +108,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBFUSE_LDFLAGS = @LIBFUSE_LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBS@ -liconv LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/NEWS b/NEWS index e9d722e..2242efe 100644 --- a/NEWS +++ b/NEWS @@ -23,7 +23,7 @@ What is new in afpfs-ng-0.8.1, March 8, 2008 1. Read only support You can mount volumes readonly with: -mount_afp -o ro afp://username:password@hostname/volumename /mountpoint +mount_afp2 -o ro afp://username:password@hostname/volumename /mountpoint Per request from various people. @@ -71,7 +71,7 @@ A simple tool to get the status information of a server without logging in. 2. FUSE client improvements Continuation of FUSE client development, including the introduction of a new tool -called mount_afp, which has the same syntax as in Mac OS X. Better status and +called mount_afp2, which has the same syntax as in Mac OS X. Better status and post-deployment debugging, proper forced or unforced exit and other bugs. diff --git a/README.md b/README.md index 1fed0ae..95089b5 100644 --- a/README.md +++ b/README.md @@ -1,98 +1,59 @@ -## Apple Filing Protocol Library - afpfs-ng - libafpclient +## afpfs-ng for macOS / OS X ### Description -AFPFS is a client implementation of the Apple Filing Protocol written in C which -can be used to access AFP shares exposed by multiple devices, notably Mac OS X -computers, linux devices exporting shares with netatalk, Apple Airport and -Time Capsule products as well as other NAS devices from various vendors. +macOS / OS X ships with the ability to mount volumes via AFP. However, OS X 10.6 and newer are not capable of AFP version 2.x or older which is needed to network with Classic MacOS (7.6 to 9.2 via IP). + +This version of afpfs-ng is based on Simon Vetter's version. It has fixes 'hacked in' to make it work with Fuse for macOS / OSXFUSE on macOS / OS X. As a consequence, it does not work with Fuse for Linux. + +It is of use for you if you emulate Classic MacOS, e.g. using SheepShaver or QEMU. And of course if you own an old Macintosh you want to exchange files with. + +macOS / OS X already makes use of the 'mount_afp' command. Thus in this version of afpfs-ng that command has been changed to 'mount_afp2' (to indicate it is for use with AFP v. 2.x). -### Changelog +### Prerequesites -This is afpfs-ng-0.8.2, it brings IPV6 support and includes many bugfixes. -Read NEWS for more details. +Download and install Fuse for macOS from https://osxfuse.github.io/ (v. 3.7.1 as of writing this). Make sure to also select the Fuse compatibility layer during installation. ### Installation -Pretty standard unix stuff: +AFP up to v. 2.x does not offer password encryption which is why we simply disable it rather than installing gcrypt on macOS / OS X first: ```bash -./configure && make && sudo make install && echo 'done!' +./configure --disable-gcrypt --enable-fuse +``` +```bash +make +``` +```bash +sudo make install ``` -Use --disable-fuse and/or --disable-gcrypt if your system cannot meet those dependancies. -(note that disabling gcrypt will prevent you from using login/password auth.) - -The command line tool needs ncurses-dev and libreadline-dev to compile. Install them -with sudo apt-get install ncurses-dev libreadline-dev on ubuntu/debian. - -### Usage - -You can either use afpfs to mount an AFP share with fuse or with the command-line client. - -#### fuse - -Mount the time_travel volume from delorean.local (in this example, my time capsule's hostname) -on /mnt/timetravel without authentication: - +Also, I couldn't figure how to make the fuse components compile automatically on macOS / OS X. This is how to do that manually: ```bash -$ mount_afp afp://delorean.local/time_travel /mnt/timetravel +cd fuse +``` +```bash +make +``` +```bash +sudo make install ``` -Same, with authentication: +### Usage, credits and license + +Don't forget to load Fuse for macOS first: ```bash -$ mount_afp afp://simon:mypassword@delorean.local/time_travel /mnt/timetravel +/Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse ``` +See README.old for examples on commands. But mind the change to 'mount_afp2'. -Same, with authentication, forcing the UAM of your choice (usually not needed): +There you can also find information on the license and credits. -```bash -$ mount_afp afp://simon;AUTH=DHX2:mypassword@delorean.local/time_travel /mnt/timetravel -``` - -Unmount the volume: - -```bash -$ fusermount -u /mnt/timetravel -``` - -#### command line client - -Open volume time_travel on delorean.local: - -```bash -$ afpcmd afp://simon:mypassword@delorean.local/time_travel -``` - -Connect anonymously to delorean.local, list all available volumes: - -```bash -$ afpcmd afp://simon:mypassword@delorean.local/ -``` - -cd to change directories, ls to list, get file to retrieve file, put file to put file... -and help for a list of supported commands. +Credits for this macOS / OS X version goes to 'adespoton' for his guidance. -### Credits and license - -This is a fork of the original afpfs-ng project that has gone unmaintained -for quite some time. It is so far the only available open source AFP client. - -This repository includes many patches collected by the XBMC project -(www.xbmc.org) as well as mine, in a bid to improve stability, performance and -to implement new features. - -Check AUTHORS for a somewhat complete list of contributors. - -The original afpfs-ng webiste can be found at https://sites.google.com/site/alexthepuffin/home - -This project retains the original author's license and is distributed under the GPL. - - -### Feedback and patches - -Feel free to send your feedback/patches/flames at simon (dot) vetter (at) gmx.com . +### Links / further reading +Information on the background and process of porting afpfs-ng to macOS / OS X can be found at http://emaculation.com/forum/viewtopic.php?f=34&p=57993#p57806 . Feel free to join the forum! \ No newline at end of file diff --git a/README.old b/README.old new file mode 100644 index 0000000..1fed0ae --- /dev/null +++ b/README.old @@ -0,0 +1,98 @@ +## Apple Filing Protocol Library - afpfs-ng - libafpclient + +### Description + +AFPFS is a client implementation of the Apple Filing Protocol written in C which +can be used to access AFP shares exposed by multiple devices, notably Mac OS X +computers, linux devices exporting shares with netatalk, Apple Airport and +Time Capsule products as well as other NAS devices from various vendors. + + +### Changelog + +This is afpfs-ng-0.8.2, it brings IPV6 support and includes many bugfixes. +Read NEWS for more details. + + +### Installation + +Pretty standard unix stuff: +```bash +./configure && make && sudo make install && echo 'done!' +``` + +Use --disable-fuse and/or --disable-gcrypt if your system cannot meet those dependancies. +(note that disabling gcrypt will prevent you from using login/password auth.) + +The command line tool needs ncurses-dev and libreadline-dev to compile. Install them +with sudo apt-get install ncurses-dev libreadline-dev on ubuntu/debian. + +### Usage + +You can either use afpfs to mount an AFP share with fuse or with the command-line client. + +#### fuse + +Mount the time_travel volume from delorean.local (in this example, my time capsule's hostname) +on /mnt/timetravel without authentication: + +```bash +$ mount_afp afp://delorean.local/time_travel /mnt/timetravel +``` + +Same, with authentication: + +```bash +$ mount_afp afp://simon:mypassword@delorean.local/time_travel /mnt/timetravel +``` + +Same, with authentication, forcing the UAM of your choice (usually not needed): + +```bash +$ mount_afp afp://simon;AUTH=DHX2:mypassword@delorean.local/time_travel /mnt/timetravel +``` + +Unmount the volume: + +```bash +$ fusermount -u /mnt/timetravel +``` + +#### command line client + +Open volume time_travel on delorean.local: + +```bash +$ afpcmd afp://simon:mypassword@delorean.local/time_travel +``` + +Connect anonymously to delorean.local, list all available volumes: + +```bash +$ afpcmd afp://simon:mypassword@delorean.local/ +``` + +cd to change directories, ls to list, get file to retrieve file, put file to put file... +and help for a list of supported commands. + + +### Credits and license + +This is a fork of the original afpfs-ng project that has gone unmaintained +for quite some time. It is so far the only available open source AFP client. + +This repository includes many patches collected by the XBMC project +(www.xbmc.org) as well as mine, in a bid to improve stability, performance and +to implement new features. + +Check AUTHORS for a somewhat complete list of contributors. + +The original afpfs-ng webiste can be found at https://sites.google.com/site/alexthepuffin/home + +This project retains the original author's license and is distributed under the GPL. + + +### Feedback and patches + +Feel free to send your feedback/patches/flames at simon (dot) vetter (at) gmx.com . + diff --git a/cmdline/Makefile.in b/cmdline/Makefile.in index c85325d..861e35e 100644 --- a/cmdline/Makefile.in +++ b/cmdline/Makefile.in @@ -112,7 +112,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBFUSE_LDFLAGS = @LIBFUSE_LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBS@ -liconv LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/cmdline/afpcmd.1 b/cmdline/afpcmd.1 index 05cc07a..dde5937 100644 --- a/cmdline/afpcmd.1 +++ b/cmdline/afpcmd.1 @@ -11,7 +11,7 @@ using AFP. This is typically either Netatalk or Mac OS or Mac OS X. This can be done as a non-root user. It offers either an interactive command-line (like a traditional FTP client) or for batch retrievals. -Do not confuse this with the FUSE mounting tools (mount_afp, afpfsd, afp_client), +Do not confuse this with the FUSE mounting tools (mount_afp2, afpfsd, afp_client), which offer the ability to mount an entire filesystem. .SH OPTIONS diff --git a/config.h.in b/config.h.in index c12a549..fa8d4fe 100644 --- a/config.h.in +++ b/config.h.in @@ -33,7 +33,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `fuse' library (-lfuse). */ +/* Define to 1 if you have the `fuse' library (/usr/local/lib/libosxfuse.la). */ #undef HAVE_LIBFUSE /* Define to 1 if you have the `gcrypt' library (-lgcrypt). */ diff --git a/configure b/configure index 2d1a274..a5ed1b2 100755 --- a/configure +++ b/configure @@ -21824,13 +21824,13 @@ echo "$as_me: error: FUSE is not installed. To build without fuse, configure wi { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: checking for fuse_main in -lfuse" >&5 -echo $ECHO_N "checking for fuse_main in -lfuse... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for fuse_main in /usr/local/lib/libosxfuse.la" >&5 +echo $ECHO_N "checking for fuse_main in /usr/local/lib/libosxfuse.la... $ECHO_C" >&6; } if test "${ac_cv_lib_fuse_fuse_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lfuse $LIBS" +LIBS="/usr/local/lib/libosxfuse.la $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21890,13 +21890,13 @@ if test $ac_cv_lib_fuse_fuse_main = yes; then #define HAVE_LIBFUSE 1 _ACEOF - LIBS="-lfuse $LIBS" + LIBS="/usr/local/lib/libosxfuse.la $LIBS" fi CFLAGS=$old_cflags CPPFLAGS=$old_cppflags - LIBFUSE_LDFLAGS="-lfuse" + LIBFUSE_LDFLAGS="/usr/local/lib/libosxfuse.la" if true; then HAVE_LIBFUSE_TRUE= diff --git a/configure.ac b/configure.ac index f4df5d7..610181c 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,7 @@ case $host in AC_CHECK_LIB([fuse], [fuse_main]) CFLAGS=$old_cflags CPPFLAGS=$old_cppflags - LIBFUSE_LDFLAGS="-lfuse" + LIBFUSE_LDFLAGS="/usr/local/lib/libosxfuse.la" AC_SUBST(LIBFUSE_LDFLAGS) AM_CONDITIONAL(HAVE_LIBFUSE, true) fi diff --git a/docs/Makefile.in b/docs/Makefile.in index e161e1a..649cba4 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -79,7 +79,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBFUSE_LDFLAGS = @LIBFUSE_LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBS@ -liconv LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/docs/README b/docs/README index efc0519..eafb597 100644 --- a/docs/README +++ b/docs/README @@ -16,12 +16,12 @@ details, run it with the '-d' option to see detailed debug info. To mount a filesystem: -mount_afp "afp://username:password@servername/volumename" +mount_afp2 "afp://username:password@servername/volumename" After this, you should be able to access files on . You can see status by running 'afp_client status'. See afpfsd(1), -mount_afp(1) and afp_client(1) for more info. +mount_afp2(1) and afp_client(1) for more info. To add an AFP mount to fstab so it mounts automatically on boot: diff --git a/fuse/Makefile.am b/fuse/Makefile.am index f8caa33..e3e6a38 100644 --- a/fuse/Makefile.am +++ b/fuse/Makefile.am @@ -1,21 +1,21 @@ -bin_PROGRAMS = afpfsd mount_afp +bin_PROGRAMS = afpfsd mount_afp2 -mount_afp_SOURCES = client.c -mount_afp_CFLAGS = -I$(top_srcdir)/include -D_FILE_OFFSET_BITS=64 @CFLAGS@ -mount_afp_LDADD = $(top_builddir)/lib/libafpclient.la +mount_afp2_SOURCES = client.c +mount_afp2_CFLAGS = -I$(top_srcdir)/include -D_FILE_OFFSET_BITS=64 @CFLAGS@ +mount_afp2_LDADD = $(top_builddir)/lib/libafpclient.la afpfsd_SOURCES = commands.c daemon.c fuse_int.c fuse_error.c -afpfsd_LDADD = $(top_builddir)/lib/libafpclient.la -lfuse -afpfsd_LDFLAGS = -export-dynamic -lfuse +afpfsd_LDADD = $(top_builddir)/lib/libafpclient.la /usr/local/lib/libosxfuse.la +afpfsd_LDFLAGS = -export-dynamic /usr/local/lib/libosxfuse.la afpfsd_CFLAGS = -I$(top_srcdir)/include -D_FILE_OFFSET_BITS=64 @CFLAGS@ install-data-hook: mkdir -p $(DESTDIR)/$(mandir)/man1 - cp mount_afp.1 $(DESTDIR)/$(mandir)/man1 + cp mount_afp2.1 $(DESTDIR)/$(mandir)/man1 cp afpfsd.1 $(DESTDIR)/$(mandir)/man1 cp afp_client.1 $(DESTDIR)/$(mandir)/man1 install-exec-hook: rm -f $(DESTDIR)$(bindir)/afp_client - $(LN_S) mount_afp $(DESTDIR)$(bindir)/afp_client + $(LN_S) mount_afp2 $(DESTDIR)$(bindir)/afp_client cp afpfs $(DESTDIR)$(bindir)/afpfs diff --git a/fuse/Makefile.in b/fuse/Makefile.in index 33d4541..0c5e22c 100644 --- a/fuse/Makefile.in +++ b/fuse/Makefile.in @@ -32,7 +32,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = afpfsd$(EXEEXT) mount_afp$(EXEEXT) +bin_PROGRAMS = afpfsd$(EXEEXT) mount_afp2$(EXEEXT) subdir = fuse DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -52,11 +52,11 @@ afpfsd_DEPENDENCIES = $(top_builddir)/lib/libafpclient.la afpfsd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(afpfsd_CFLAGS) $(CFLAGS) \ $(afpfsd_LDFLAGS) $(LDFLAGS) -o $@ -am_mount_afp_OBJECTS = mount_afp-client.$(OBJEXT) -mount_afp_OBJECTS = $(am_mount_afp_OBJECTS) -mount_afp_DEPENDENCIES = $(top_builddir)/lib/libafpclient.la -mount_afp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mount_afp_CFLAGS) \ +am_mount_afp2_OBJECTS = mount_afp2-client.$(OBJEXT) +mount_afp2_OBJECTS = $(am_mount_afp2_OBJECTS) +mount_afp2_DEPENDENCIES = $(top_builddir)/lib/libafpclient.la +mount_afp2_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mount_afp2_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -70,8 +70,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(afpfsd_SOURCES) $(mount_afp_SOURCES) -DIST_SOURCES = $(afpfsd_SOURCES) $(mount_afp_SOURCES) +SOURCES = $(afpfsd_SOURCES) $(mount_afp2_SOURCES) +DIST_SOURCES = $(afpfsd_SOURCES) $(mount_afp2_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -112,7 +112,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBFUSE_LDFLAGS = @LIBFUSE_LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBS@ -liconv LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -183,12 +183,12 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -mount_afp_SOURCES = client.c -mount_afp_CFLAGS = -I$(top_srcdir)/include -D_FILE_OFFSET_BITS=64 @CFLAGS@ -mount_afp_LDADD = $(top_builddir)/lib/libafpclient.la +mount_afp2_SOURCES = client.c +mount_afp2_CFLAGS = -I$(top_srcdir)/include -D_FILE_OFFSET_BITS=64 @CFLAGS@ +mount_afp2_LDADD = $(top_builddir)/lib/libafpclient.la afpfsd_SOURCES = commands.c daemon.c fuse_int.c fuse_error.c -afpfsd_LDADD = $(top_builddir)/lib/libafpclient.la -lfuse -afpfsd_LDFLAGS = -export-dynamic -lfuse +afpfsd_LDADD = $(top_builddir)/lib/libafpclient.la /usr/local/lib/libosxfuse.la +afpfsd_LDFLAGS = -export-dynamic /usr/local/lib/libosxfuse.la afpfsd_CFLAGS = -I$(top_srcdir)/include -D_FILE_OFFSET_BITS=64 @CFLAGS@ all: all-am @@ -254,9 +254,9 @@ clean-binPROGRAMS: afpfsd$(EXEEXT): $(afpfsd_OBJECTS) $(afpfsd_DEPENDENCIES) @rm -f afpfsd$(EXEEXT) $(afpfsd_LINK) $(afpfsd_OBJECTS) $(afpfsd_LDADD) $(LIBS) -mount_afp$(EXEEXT): $(mount_afp_OBJECTS) $(mount_afp_DEPENDENCIES) - @rm -f mount_afp$(EXEEXT) - $(mount_afp_LINK) $(mount_afp_OBJECTS) $(mount_afp_LDADD) $(LIBS) +mount_afp2$(EXEEXT): $(mount_afp2_OBJECTS) $(mount_afp2_DEPENDENCIES) + @rm -f mount_afp2$(EXEEXT) + $(mount_afp2_LINK) $(mount_afp2_OBJECTS) $(mount_afp2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -268,7 +268,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afpfsd-daemon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afpfsd-fuse_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afpfsd-fuse_int.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_afp-client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_afp2-client.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -347,19 +347,19 @@ afpfsd-fuse_error.obj: fuse_error.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(afpfsd_CFLAGS) $(CFLAGS) -c -o afpfsd-fuse_error.obj `if test -f 'fuse_error.c'; then $(CYGPATH_W) 'fuse_error.c'; else $(CYGPATH_W) '$(srcdir)/fuse_error.c'; fi` -mount_afp-client.o: client.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_afp_CFLAGS) $(CFLAGS) -MT mount_afp-client.o -MD -MP -MF $(DEPDIR)/mount_afp-client.Tpo -c -o mount_afp-client.o `test -f 'client.c' || echo '$(srcdir)/'`client.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mount_afp-client.Tpo $(DEPDIR)/mount_afp-client.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='client.c' object='mount_afp-client.o' libtool=no @AMDEPBACKSLASH@ +mount_afp2-client.o: client.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_afp2_CFLAGS) $(CFLAGS) -MT mount_afp2-client.o -MD -MP -MF $(DEPDIR)/mount_afp2-client.Tpo -c -o mount_afp2-client.o `test -f 'client.c' || echo '$(srcdir)/'`client.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mount_afp2-client.Tpo $(DEPDIR)/mount_afp2-client.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='client.c' object='mount_afp2-client.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_afp_CFLAGS) $(CFLAGS) -c -o mount_afp-client.o `test -f 'client.c' || echo '$(srcdir)/'`client.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_afp2_CFLAGS) $(CFLAGS) -c -o mount_afp2-client.o `test -f 'client.c' || echo '$(srcdir)/'`client.c -mount_afp-client.obj: client.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_afp_CFLAGS) $(CFLAGS) -MT mount_afp-client.obj -MD -MP -MF $(DEPDIR)/mount_afp-client.Tpo -c -o mount_afp-client.obj `if test -f 'client.c'; then $(CYGPATH_W) 'client.c'; else $(CYGPATH_W) '$(srcdir)/client.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mount_afp-client.Tpo $(DEPDIR)/mount_afp-client.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='client.c' object='mount_afp-client.obj' libtool=no @AMDEPBACKSLASH@ +mount_afp2-client.obj: client.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_afp2_CFLAGS) $(CFLAGS) -MT mount_afp2-client.obj -MD -MP -MF $(DEPDIR)/mount_afp2-client.Tpo -c -o mount_afp2-client.obj `if test -f 'client.c'; then $(CYGPATH_W) 'client.c'; else $(CYGPATH_W) '$(srcdir)/client.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mount_afp2-client.Tpo $(DEPDIR)/mount_afp2-client.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='client.c' object='mount_afp2-client.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_afp_CFLAGS) $(CFLAGS) -c -o mount_afp-client.obj `if test -f 'client.c'; then $(CYGPATH_W) 'client.c'; else $(CYGPATH_W) '$(srcdir)/client.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_afp2_CFLAGS) $(CFLAGS) -c -o mount_afp2-client.obj `if test -f 'client.c'; then $(CYGPATH_W) 'client.c'; else $(CYGPATH_W) '$(srcdir)/client.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -553,13 +553,13 @@ uninstall-am: uninstall-binPROGRAMS install-data-hook: mkdir -p $(DESTDIR)/$(mandir)/man1 - cp mount_afp.1 $(DESTDIR)/$(mandir)/man1 + cp mount_afp2.1 $(DESTDIR)/$(mandir)/man1 cp afpfsd.1 $(DESTDIR)/$(mandir)/man1 cp afp_client.1 $(DESTDIR)/$(mandir)/man1 install-exec-hook: rm -f $(DESTDIR)$(bindir)/afp_client - $(LN_S) mount_afp $(DESTDIR)$(bindir)/afp_client + $(LN_S) mount_afp2 $(DESTDIR)$(bindir)/afp_client cp afpfs $(DESTDIR)$(bindir)/afpfs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/fuse/afp_client.1 b/fuse/afp_client.1 index a4fb556..32ece2c 100644 --- a/fuse/afp_client.1 +++ b/fuse/afp_client.1 @@ -20,7 +20,7 @@ a unit number, for example for the first Ethernet interface. .TP .B mount [mount options] node -Using the authentication and server information provided with the mount options, mount the remove filesystem on node. For more information, see the "mount options" later in this man page. If you would prefer to use the AFP URL syntax, see mount_afp(1) for more information. +Using the authentication and server information provided with the mount options, mount the remove filesystem on node. For more information, see the "mount options" later in this man page. If you would prefer to use the AFP URL syntax, see mount_afp2(1) for more information. .TP .B unmount node Remove the AFP mount that is currently connected to @@ -93,6 +93,6 @@ Use this when you want all files to appear to be owned by the uid and gid of the afp_client is part of the FUSE implementation of afpfs-ng. .SH SEE ALSO -afpfsd(1), mount_afp(1) +afpfsd(1), mount_afp2(1) .SH AUTHORS Alex deVries, alexthepuffin@gmail.com diff --git a/fuse/afpfs b/fuse/afpfs index b8c47a3..65559db 100755 --- a/fuse/afpfs +++ b/fuse/afpfs @@ -1,3 +1,3 @@ #!/bin/bash -mount_afp $3 $4 $1 $2 +mount_afp2 $3 $4 $1 $2 diff --git a/fuse/afpfsd.1 b/fuse/afpfsd.1 index f1d2fbe..c18e16f 100644 --- a/fuse/afpfsd.1 +++ b/fuse/afpfsd.1 @@ -18,5 +18,5 @@ afpfsd will not start if another instance is already running. There needs to be \fB-f|--debug\fR puts the daemon in the foreground and dumps logs to stdout .SH "SEE ALSO" -\fBafp_client\fR(1), \fBmount_afp\fR(1) +\fBafp_client\fR(1), \fBmount_afp2\fR(1) diff --git a/fuse/client.c b/fuse/client.c index f29c5a3..a59383d 100644 --- a/fuse/client.c +++ b/fuse/client.c @@ -368,12 +368,12 @@ static int do_mount(int argc, char ** argv) return 0; } -static void mount_afp_usage(void) +static void mount_afp2_usage(void) { - printf("Usage:\n mount_afp [-o volpass=password] \n"); + printf("Usage:\n mount_afp2 [-o volpass=password] \n"); } -static int handle_mount_afp(int argc, char * argv[]) +static int handle_mount_afp2(int argc, char * argv[]) { struct afp_server_mount_request * req = (void *) outgoing_buffer+1; unsigned int uam_mask=default_uams_mask(); @@ -382,7 +382,7 @@ static int handle_mount_afp(int argc, char * argv[]) int readonly=0; if (argc<2) { - mount_afp_usage(); + mount_afp2_usage(); return -1; } if (strncmp(argv[1],"-o",2)==0) { @@ -567,8 +567,8 @@ int main(int argc, char *argv[]) volume.server=NULL; - if (strstr(argv[0],"mount_afp")) { - if (handle_mount_afp(argc,argv)<0) + if (strstr(argv[0],"mount_afp2")) { + if (handle_mount_afp2(argc,argv)<0) return -1; } else if (prepare_buffer(argc,argv)<0) diff --git a/fuse/commands.c b/fuse/commands.c index 874cb06..b01bc0b 100644 --- a/fuse/commands.c +++ b/fuse/commands.c @@ -35,7 +35,7 @@ #ifdef __linux #define FUSE_DEVICE "/dev/fuse" #else -#define FUSE_DEVICE "/dev/fuse0" +#define FUSE_DEVICE "/dev/osxfuse0" #endif diff --git a/fuse/fuse_int.c b/fuse/fuse_int.c index 640ea10..88464b6 100644 --- a/fuse/fuse_int.c +++ b/fuse/fuse_int.c @@ -20,7 +20,7 @@ #include "afpfs-ng/afp.h" -#include +#include #include #include #include diff --git a/fuse/mount_afp.1 b/fuse/mount_afp2.1 similarity index 91% rename from fuse/mount_afp.1 rename to fuse/mount_afp2.1 index 4e7fa77..0a90ee3 100644 --- a/fuse/mount_afp.1 +++ b/fuse/mount_afp2.1 @@ -21,7 +21,7 @@ .\" .\" **************************************** .\" * -.\" * mount_afp [-o options] [-i] host[:port][/path] node +.\" * mount_afp2 [-o options] [-i] host[:port][/path] node .\" * .\" * Created by randall on Wed May 8 2002. .\" * @@ -31,14 +31,14 @@ .\" * Required macros .\" **************************************** .Dd Feb 1, 2008 -.Dt MOUNT_AFP 8 +.Dt MOUNT_AFP2 8 .Os Mac\ OS\ X .\" .\" **************************************** .\" * NAME section .\" **************************************** .Sh NAME -.Nm mount_afp +.Nm mount_afp2 .Nd mount an afp (AppleShare) filesystem using FUSE .\" .\" **************************************** @@ -116,20 +116,20 @@ The following example illustrates how to mount the afp volume server.company.com/volumename/ at the mount point /Volumes/mntpnt: .Bd -literal -offset indent mkdir /Volumes/mntpnt -mount_afp afp://username:userpass@server.company.com/volumename/ /Volumes/mntpnt +mount_afp2 afp://username:userpass@server.company.com/volumename/ /Volumes/mntpnt .Ed This example shows the proper url to use to mount the volume guestVolume from the afp server myserver as guest: .Bd -literal -offset indent mkdir /Volumes/guest -mount_afp "afp://;AUTH=No%20User%20Authent@myserver/guestVolume" /Volumes/guest +mount_afp2 "afp://;AUTH=No%20User%20Authent@myserver/guestVolume" /Volumes/guest The following shows how to use a username of "user:name" and password of "p@ssword": server.company.com/volumename/ at the mount point /Volumes/mntpnt: .Bd -literal -offset indent mkdir /Volumes/mntpnt -mount_afp afp://user::name:p@@ssword@server.company.com/volumename/ /Volumes/mntpnt +mount_afp2 afp://user::name:p@@ssword@server.company.com/volumename/ /Volumes/mntpnt .Ed .Ed @@ -137,7 +137,7 @@ This example shows the proper url to use to mount the volume myVolume from the afp server myserver using Kerberos authentication: .Bd -literal -offset indent mkdir /Volumes/myVolume -mount_afp "afp://;AUTH=Client%20Krb%20v2@myserver/myVolume" /Volumes/myVolume +mount_afp2 "afp://;AUTH=Client%20Krb%20v2@myserver/myVolume" /Volumes/myVolume .Ed .\" @@ -158,7 +158,7 @@ command first appeared Mac OS X version 10.0. Kerberos authentication was added .\" .\" **************************************** .\" * RETURN VALUES section -.\" * (errors that mount_afp could return) +.\" * (errors that mount_afp2 could return) .\" **************************************** .Sh RETURN VALUES .Bl -tag -width Er diff --git a/lib/Makefile.in b/lib/Makefile.in index d09e4ef..1871b26 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -128,7 +128,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBFUSE_LDFLAGS = @LIBFUSE_LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBS@ -liconv LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/test/Makefile b/test/Makefile index ef27841..0b9b195 100644 --- a/test/Makefile +++ b/test/Makefile @@ -2,19 +2,19 @@ all: prepare fuse_anon fuse_auth fuse_anon: mkdir -p mnt - mount_afp afp://delorean.local/DeLorean `pwd`/mnt + mount_afp2 afp://delorean.local/DeLorean `pwd`/mnt ls -al mnt/ | grep com.apple.timemachine.supported >/dev/null fusermount -u `pwd`/mnt @echo 'fuse_anon test passed.' fuse_auth: mkdir -p mnt - mount_afp afp://test:test_pwd@delorean.local/test `pwd`/mnt/ + mount_afp2 afp://test:test_pwd@delorean.local/test `pwd`/mnt/ echo 'You should read this back' >mnt/sample.txt sleep 1 fusermount -u `pwd`/mnt sleep 1 - mount_afp afp://test:test_pwd@delorean.local/test `pwd`/mnt + mount_afp2 afp://test:test_pwd@delorean.local/test `pwd`/mnt grep -E '^You should read this back$$' mnt/sample.txt >/dev/null wc -l mnt/sample.txt | grep 1 >/dev/null rm mnt/sample.txt