diff options
author | Jay Freeman <saurik@saurik.com> | 2008-10-11 06:35:44 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-10-11 06:35:44 +0000 |
commit | f595dfc4b1afab51164987c90b0975e4f969818e (patch) | |
tree | ab911f7c37ce12e47e85d56303ee4e7dffe7323b | |
parent | 0cb10758962334e6af5b02b3a72c5bfef897ac4c (diff) |
Root filesystem access.
git-svn-id: http://svn.telesphoreo.org/trunk@491 514c082c-b64e-11dc-b46d-3d985efe055d
-rw-r--r-- | data/netatalk/_metadata/conffiles | 1 | ||||
-rw-r--r-- | data/netatalk/_metadata/depiction | 1 | ||||
l--------- | data/netatalk/_metadata/mdnsresponder.dep | 1 | ||||
-rwxr-xr-x | data/netatalk/_metadata/postinst | 2 | ||||
-rwxr-xr-x | data/netatalk/_metadata/prerm | 2 | ||||
-rwxr-xr-x | data/netatalk/afpd-dns-sd | 2 | ||||
-rw-r--r-- | data/netatalk/com.saurik.afpd.dns-sd.plist | 16 | ||||
-rw-r--r-- | data/netatalk/make.sh | 16 | ||||
-rw-r--r-- | data/netatalk/root.diff | 15 |
9 files changed, 56 insertions, 0 deletions
diff --git a/data/netatalk/_metadata/conffiles b/data/netatalk/_metadata/conffiles index 6314e7e71..5aed5d7fe 100644 --- a/data/netatalk/_metadata/conffiles +++ b/data/netatalk/_metadata/conffiles @@ -4,4 +4,5 @@ /etc/netatalk/papd.conf /etc/netatalk/AppleVolumes.default /etc/netatalk/AppleVolumes.system +/System/Library/LaunchDaemons/com.saurik.afpd.dns-sd.plist /System/Library/LaunchDaemons/net.sourceforge.netatalk.afpd.plist diff --git a/data/netatalk/_metadata/depiction b/data/netatalk/_metadata/depiction new file mode 100644 index 000000000..40790e096 --- /dev/null +++ b/data/netatalk/_metadata/depiction @@ -0,0 +1 @@ +http://cydia.saurik.com/info/netatalk/ diff --git a/data/netatalk/_metadata/mdnsresponder.dep b/data/netatalk/_metadata/mdnsresponder.dep new file mode 120000 index 000000000..00b4bf695 --- /dev/null +++ b/data/netatalk/_metadata/mdnsresponder.dep @@ -0,0 +1 @@ +../../mdnsresponder
\ No newline at end of file diff --git a/data/netatalk/_metadata/postinst b/data/netatalk/_metadata/postinst index 4d874e08d..a7246567a 100755 --- a/data/netatalk/_metadata/postinst +++ b/data/netatalk/_metadata/postinst @@ -1,4 +1,6 @@ #!/bin/sh +/bin/launchctl list com.saurik.afpd.dns-sd &>/dev/null || + /bin/launchctl load /System/Library/LaunchDaemons/com.saurik.afpd.dns-sd.plist /bin/launchctl list net.sourceforge.netatalk.afpd &>/dev/null || /bin/launchctl load /System/Library/LaunchDaemons/net.sourceforge.netatalk.afpd.plist exit 0 diff --git a/data/netatalk/_metadata/prerm b/data/netatalk/_metadata/prerm index d132b11c2..4fd7ef15d 100755 --- a/data/netatalk/_metadata/prerm +++ b/data/netatalk/_metadata/prerm @@ -1,4 +1,6 @@ #!/bin/sh +! /bin/launchctl list com.saurik.afpd.dns-sd &>/dev/null || + /bin/launchctl unload /System/Library/LaunchDaemons/com.saurik.afpd.dns-sd.plist ! /bin/launchctl list net.sourceforge.netatalk.afpd &>/dev/null || /bin/launchctl unload /System/Library/LaunchDaemons/net.sourceforge.netatalk.afpd.plist exit 0 diff --git a/data/netatalk/afpd-dns-sd b/data/netatalk/afpd-dns-sd new file mode 100755 index 000000000..e5edf731e --- /dev/null +++ b/data/netatalk/afpd-dns-sd @@ -0,0 +1,2 @@ +#!/bin/bash +exec dns-sd -R "$(hostname)" _afpovertcp._tcp local. 548 diff --git a/data/netatalk/com.saurik.afpd.dns-sd.plist b/data/netatalk/com.saurik.afpd.dns-sd.plist new file mode 100644 index 000000000..c76b10304 --- /dev/null +++ b/data/netatalk/com.saurik.afpd.dns-sd.plist @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Label</key> + <string>com.saurik.afpd.dns-sd</string> + + <key>ProgramArguments</key> + <array> + <string>/usr/libexec/afpd-dns-sd</string> + </array> + + <key>OnDemand</key> + <false/> +</dict> +</plist> diff --git a/data/netatalk/make.sh b/data/netatalk/make.sh index 7aab2d8de..0d18da926 100644 --- a/data/netatalk/make.sh +++ b/data/netatalk/make.sh @@ -2,5 +2,21 @@ pkg:setup AR=$(which "${PKG_TARG}-ar") pkg:configure --enable-cups=no --sysconfdir=/etc make pkg:install + +pkg: mkdir -p /usr/libexec +pkg: cp -a %/afpd-dns-sd /usr/libexec + pkg: mkdir -p /System/Library/LaunchDaemons +pkg: cp -a %/com.saurik.afpd.dns-sd.plist /System/Library/LaunchDaemons pkg: cp -a %/net.sourceforge.netatalk.afpd.plist /System/Library/LaunchDaemons + +{ + pkg: grep '^#' /etc/netatalk/AppleVolumes.default + echo '~ home' + echo '/ root' +} >AppleVolumes.default + +chmod --reference="${PKG_DEST}/etc/netatalk/AppleVolumes.default" AppleVolumes.default +chown --reference="${PKG_DEST}/etc/netatalk/AppleVolumes.default" AppleVolumes.default + +pkg: mv AppleVolumes.default /etc/netatalk/AppleVolumes.default diff --git a/data/netatalk/root.diff b/data/netatalk/root.diff new file mode 100644 index 000000000..01645738c --- /dev/null +++ b/data/netatalk/root.diff @@ -0,0 +1,15 @@ +diff -ru netatalk-2.0.3/etc/afpd/auth.c netatalk-2.0.3+iPhone/etc/afpd/auth.c +--- netatalk-2.0.3/etc/afpd/auth.c 2005-03-11 15:36:58.000000000 +0000 ++++ netatalk-2.0.3+iPhone/etc/afpd/auth.c 2008-10-11 05:57:29.000000000 +0000 +@@ -223,11 +223,6 @@ + set_processname("afpd"); + syslog_setup(log_debug, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon); + +- if ( pwd->pw_uid == 0 ) { /* don't allow root login */ +- LOG(log_error, logtype_afpd, "login: root login denied!" ); +- return AFPERR_NOTAUTH; +- } +- + LOG(log_info, logtype_afpd, "login %s (uid %d, gid %d) %s", pwd->pw_name, + pwd->pw_uid, pwd->pw_gid , afp_versions[afp_version_index].av_name); + |