diff --git a/Makefile b/Makefile index aef9a30..bb15270 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PACKAGE=a2pi -VERSION=0.1.5 +VERSION=0.1.7 DIST=$(PACKAGE)-$(VERSION) DISTDIR=./$(DIST) diff --git a/debian/changelog b/debian/changelog old mode 100644 new mode 100755 index cdce0c4..ba29170 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +a2pi (0.1.7-2) unstable; urgency=low + + * Adjust file permissions for FUSE driver to allow group access + * Add options to allow root to access FUSE mount point (for GSport) + + -- David Schmenk Fri, 06 Dec 2013 20:39:14 -0800 + +a2pi (0.1.6-1) unstable; urgency=low + + * One more attempt at mouse acceleration. Better inital Apple client setup. + + -- David Schmenk Sun, 1 Dec 2013 18:59:17 -0800 + a2pi (0.1.5-1) unstable; urgency=low * One more attempt at mouse acceleration, Apple ][/][+ support diff --git a/debian/postinst b/debian/postinst index 92c9016..2a57cc0 100755 --- a/debian/postinst +++ b/debian/postinst @@ -51,6 +51,13 @@ case "$1" in addgroup pi fuse # addgroup pi input # already there by default # + # Allow other users (root) to access FUSE mount points + # + if [ "$(grep \#user_allow_other /etc/fuse.conf)" != "" ] ; then + mv /etc/fuse.conf /etc/fuse.conf.bak + sed 's/^#user_allow_other/user_allow_other/' /etc/fuse.conf.bak > /etc/fuse.conf + fi + # # Add schmenk.is-a-geek.com to apt sources # if [ "$(grep schmenk /etc/apt/sources.list)" = "" ] ; then diff --git a/share/A2PI-1.2.PO b/share/A2PI-1.2.PO old mode 100644 new mode 100755 index 9c46bf0..d3cf645 Binary files a/share/A2PI-1.2.PO and b/share/A2PI-1.2.PO differ diff --git a/src/a2mount b/src/a2mount index 216fb1c..6802530 100755 --- a/src/a2mount +++ b/src/a2mount @@ -1,2 +1,2 @@ #!/bin/bash -fusea2pi $1 -o uid=`id -u` -o gid=`id -g` $2 +fusea2pi $1 -o allow_root -o uid=`id -u` -o gid=`id -g` $2 diff --git a/src/fusea2pi.c b/src/fusea2pi.c index 7c5ffe3..51f98bf 100755 --- a/src/fusea2pi.c +++ b/src/fusea2pi.c @@ -115,9 +115,10 @@ pthread_mutex_t a2pi_busy = PTHREAD_MUTEX_INITIALIZER; #define A2PI_WAIT pthread_mutex_lock(&a2pi_busy) #define A2PI_RELEASE pthread_mutex_unlock(&a2pi_busy) /* - * Raw device write flag. + * Write flags. */ int raw_dev_write = FALSE; +int write_perms = 0; /* * Filename & date/time conversion routines. */ @@ -216,12 +217,12 @@ struct stat *unix_stat(struct stat *stbuf, int storage, int access, int blocks, memset(stbuf, 0, sizeof(struct stat)); if (storage == 0x0F || storage == 0x0D) { - stbuf->st_mode = (access & 0xC3) == 0xC3 ? S_IFDIR | 0744 : S_IFDIR | 0544; + stbuf->st_mode = (access & 0xC3) == 0xC3 ? S_IFDIR | (write_perms | 0555) : S_IFDIR | 0555; stbuf->st_nlink = 2; } else { - stbuf->st_mode = (access & 0xC3) == 0xC3 ? S_IFREG | 0644 : S_IFREG | 0444; + stbuf->st_mode = (access & 0xC3) == 0xC3 ? S_IFREG | (write_perms | 0444) : S_IFREG | 0444; stbuf->st_nlink = 1; stbuf->st_blocks = blocks; stbuf->st_size = size; @@ -868,7 +869,7 @@ static int a2pi_getattr(const char *path, struct stat *stbuf) /* * Root directory of volumes. */ - unix_stat(stbuf, 0x0F, 0x01, 0, 0, 0, 0); + unix_stat(stbuf, 0x0F, 0xC3, 0, 0, 0, 0); } else { @@ -1378,6 +1379,7 @@ int main(int argc, char *argv[]) if (strcmp(argv[argc - 1], "+rw") == 0) { raw_dev_write = TRUE; + write_perms = 0220; argc--; } umask(0);