diff options
author | Mario Izquierdo (mariodebian) <mariodebian@gmail.com> | 2008-09-13 09:30:40 +0000 |
---|---|---|
committer | Mario Izquierdo (mariodebian) <mariodebian@gmail.com> | 2008-09-13 09:30:40 +0000 |
commit | 25c97de295fdbe795a044ab6b79e41bca0508f15 (patch) | |
tree | 369086ad82c13098b7fd07deef775afa71715d01 | |
parent | 7b7f245fbbfa94ad5a406ff72fb14ccbcf5e53bc (diff) |
initramfs-tools-tcos (0.89.9)
* udev/mount_listener.c
- Compare device with /dev/disk/ and do nothing if match => pam-usb mount
* xmlrpc/sh/tcos-pam-usb.sh
- No clean /tmp/tcos-udev.log
* xmlrpc/pam-usb.c
- Read fwrite returned value too (fix amd64 warning_unused_result)
git-svn-id: http://tcosproject.org/svn/tcos/trunk/initramfs-tools-tcos@981 97557d6f-af72-4ac7-98cc-18709f36555f
-rw-r--r-- | debian/changelog | 13 | ||||
-rw-r--r-- | udev/mount_listener.c | 5 | ||||
-rw-r--r-- | xmlrpc/pam-usb.c | 6 | ||||
-rw-r--r-- | xmlrpc/sh/tcos-pam-usb.sh | 4 |
4 files changed, 22 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index 3083a94..02f983e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +initramfs-tools-tcos (0.89.9) unstable; urgency=low + + * udev/mount_listener.c + - Compare device with /dev/disk/ and do nothing if match => pam-usb mount + * xmlrpc/sh/tcos-pam-usb.sh + - No clean /tmp/tcos-udev.log + * xmlrpc/pam-usb.c + - Read fwrite returned value too (fix amd64 warning_unused_result) + + -- Mario Izquierdo (mariodebian) <mariodebian@gmail.com> Fri, 12 Sep 2008 17:35:22 +0200 + initramfs-tools-tcos (0.89.8) unstable; urgency=low * New XMLRPC method pamusb: @@ -13,7 +24,7 @@ initramfs-tools-tcos (0.89.8) unstable; urgency=low - Always copy xprop and ltsp-set-xprop * Update debian/copyright with base64 origin - -- Mario Izquierdo (mariodebian) <mariodebian@gmail.com> Thu, 11 Sep 2008 15:26:01 +0200 + -- Mario Izquierdo (mariodebian) <mariodebian@gmail.com> Fri, 12 Sep 2008 17:34:43 +0200 initramfs-tools-tcos (0.89.7) unstable; urgency=low diff --git a/udev/mount_listener.c b/udev/mount_listener.c index 9741492..4f8e855 100644 --- a/udev/mount_listener.c +++ b/udev/mount_listener.c @@ -102,6 +102,11 @@ void print_dev(char *txt, char *action) { debug("DEBUG: output \"%s %s\"\n", output, action); + if ( strncmp(output , "/dev/disk/", 10) == 0 ) { + debug("DEBUG: detected /dev/disk device => pam-usb IGNORING...\n"); + return; + } + snprintf( (char*) &cmd, MSG_BUFF, "%s %s %s", SAVE_UDEV, output, action); if ( file_exists(SAVE_UDEV) ) { diff --git a/xmlrpc/pam-usb.c b/xmlrpc/pam-usb.c index 03123a5..d134b38 100644 --- a/xmlrpc/pam-usb.c +++ b/xmlrpc/pam-usb.c @@ -39,7 +39,7 @@ static xmlrpc_value *tcos_pam_usb(xmlrpc_env *env, xmlrpc_value *in, void *ud) char *fret; unsigned char *buf, *e; - size_t len, elen; + size_t len, elen, fwret; static xmlrpc_value *result; dbgtcos("tcosxmlrpc::tcos_pam_usb() Init \n"); @@ -85,7 +85,7 @@ static xmlrpc_value *tcos_pam_usb(xmlrpc_env *env, xmlrpc_value *in, void *ud) fp = fopen(option, "w"); if (fp == NULL) return xmlrpc_build_value(env, "s", PAM_USB_READING_ERROR ); - fwrite(e, 1, elen, fp); + fwret = fwrite(e, 1, elen, fp); fclose(fp); free(e); dbgtcos("tcos_pam_usb() option savepad, ok, saving base64 code into '%s'...\n", option); @@ -101,7 +101,7 @@ static xmlrpc_value *tcos_pam_usb(xmlrpc_env *env, xmlrpc_value *in, void *ud) fp = fopen(option, "w+"); if (fp == NULL) return xmlrpc_build_value(env, "s", PAM_USB_READING_ERROR ); - fwrite(e, 1, elen, fp); + fwret = fwrite(e, 1, elen, fp); fclose(fp); free(e); dbgtcos("tcos_pam_usb() option newpad, ok, saving base64 code into '%s'...\n", option); diff --git a/xmlrpc/sh/tcos-pam-usb.sh b/xmlrpc/sh/tcos-pam-usb.sh index 3a34f66..1795378 100644 --- a/xmlrpc/sh/tcos-pam-usb.sh +++ b/xmlrpc/sh/tcos-pam-usb.sh @@ -52,13 +52,13 @@ mount_uuid() { else echo "error: mounting device UUID=$1" fi - cat /dev/null > /tmp/tcos-udevd.log + #cat /dev/null > /tmp/tcos-udevd.log } umount_uuid() { grep -q "$1" /proc/mounts || return umount /mnt/$1 >> /tmp/initramfs.debug 2>&1 - cat /dev/null > /tmp/tcos-udevd.log + #cat /dev/null > /tmp/tcos-udevd.log } |