Add existing file

This commit is contained in:
mabam 2017-10-31 00:26:38 +01:00
parent 8ff2d1120f
commit ca06f0191c
23 changed files with 211 additions and 152 deletions

View File

@ -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" <mountpoint>
mount_afp2 "afp://username:password@servername/volumename" <mountpoint>
After this, you should be able to access files on <mountpoint>.

View File

@ -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@

4
NEWS
View File

@ -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.

109
README.md
View File

@ -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!

98
README.old Normal file
View File

@ -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 .

View File

@ -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@

View File

@ -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

View File

@ -33,7 +33,7 @@
/* Define to 1 if you have the <inttypes.h> 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). */

10
configure vendored
View File

@ -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=

View File

@ -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

View File

@ -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@

View File

@ -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" <mountpoint>
mount_afp2 "afp://username:password@servername/volumename" <mountpoint>
After this, you should be able to access files on <mountpoint>.
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:

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -1,3 +1,3 @@
#!/bin/bash
mount_afp $3 $4 $1 $2
mount_afp2 $3 $4 $1 $2

View File

@ -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)

View File

@ -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] <afp url> <mountpoint>\n");
printf("Usage:\n mount_afp2 [-o volpass=password] <afp url> <mountpoint>\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)

View File

@ -35,7 +35,7 @@
#ifdef __linux
#define FUSE_DEVICE "/dev/fuse"
#else
#define FUSE_DEVICE "/dev/fuse0"
#define FUSE_DEVICE "/dev/osxfuse0"
#endif

View File

@ -20,7 +20,7 @@
#include "afpfs-ng/afp.h"
#include <fuse.h>
#include <usr/local/include/fuse.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

View File

@ -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

View File

@ -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@

View File

@ -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