Your message dated Sat, 21 Apr 2012 16:02:13 +0000
with message-id <[email protected]>
and subject line Bug#660098: fixed in djmount 0.71-5
has caused the Debian Bug report #660098,
regarding djmount: support /etc/fstab mounting
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
660098: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660098
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: djmount
Version: 0.71-3
Severity: wishlist
Tags: patch upstream

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


(Transcription of a Bug report received by email from: Kevin Vargo 
<[email protected]>)

Hello Dario,

I'd like to submit a patch for djmount, to permit "ignoring" of non-relevant 
mount options, 
as per -s/sloppy from mount.

I've attached my patch vs. 0.71-3.

If I need to provide something 
else/somehow else, please advise, I'll be happy to try. 

I've not submitted a separate bug report, as I couldn't see how to submit the 
patch with it.


Bug report is basically:

`djmount' can't be used from /etc/fstab, because djmount considers any unknown 
options to be 
an error, and exits.  `mount' supports a '-s' option for "sloppy" where unknown 
options are 
ignored.

I've added both '-s' and '-o sloppy' to the latest (0.71-3) to engage behavior 
that reports, 
but really ignores unknown options.  That is, this patch permits specification 
of 'sloppy' 
as an /etc/fstab option, and thereafter permits unknown options to be logged as 
warnings, but 
`djmount' continues.

Then, an /etc/fstab entry like:

djmount                 /media/upnp             fuse    
noauto,ro,user,allow_other,sloppy    0    0


succeeds, whereas prior, it would fail because 'standard' options like 'nodev' 
and 'nosuid' are 
unknown to djmount as in:


[W] Found unknown option = noexec; ignoring
[W] Found unknown option = nosuid; ignoring
[W] Found unknown option = nodev; ignoring
[I]   Mount options = ro,noexec,nosuid,nodev,s,allow_other
[I] Charset : successfully initialised charset='UTF-8'
total 0


Thanks,
Kevin


- -- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages djmount depends on:
ii  fuse-utils  2.8.6-4
ii  libc6       2.13-26
ii  libfuse2    2.8.6-4
ii  libtalloc2  2.0.7+git20120207-1
ii  libupnp3    1:1.6.6-5.1

djmount recommends no packages.

djmount suggests no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJPPPCnAAoJEKgvu4Pz1XAzD3sQAL8ctwNwUl3hHaArHQI232C1
7MSGvBDjGEBXGTwm/jseqjBPscdVb8VLMbTgjz+vw1ZKIFYGF0w/0K69y0gDyU4R
NXpUyKo0ueXW4dYyPrAzTGmdwuQtyizrzLImUacCRBs/wVeI1/AWaJDiqrpAq4o2
Fm06Mc2H0HPGcEZc4PofENz0TdsQxJwt2MscdyB9AcISuO8hAFDLImGnW7wbyY15
NJAjsvPHRCMwEG9rB20TRs9eh/klCN5KIggi2blE1x+X75DZZXnPGp1yFpvxFLzX
L0ey+e+zZdL8HrQotbhhZSkPv33D9J4Rt8JHWwZBDI1/PVymES/bti3wtB068w4S
vKPX1JMrPIpuQ7+97ObOlzeO7Tdg4q4lbpydRy1BGtb0ypuA6enXhU7hu5KiybRs
vyyvpjGg2uiSEvXvb4Bo4BuspGeVOFwhRLnajsf3d2uRK6MgGMPpuX50JMtiGJuw
ltO4fdqikftR0LXRV2giaFgxwoDC3rvVHK/YMnytXsnZjvvf1FIv38u7v+hUu875
jb5+mLr5MQBnLK3lK7Ytl8xDk0VqMnKoyc8odQvfKNgSxXzPmdhiNB0RPqKafPSz
qlYLVm17VCXnBshG2NFDoQ0jp2y9qLQaDfne9fYJ1PdY3TVrOCj0Xtwvv2FZ6apR
LOF/CIUBCewhyOtRbc7F
=Nt5Z
-----END PGP SIGNATURE-----
--- djmount-0.71.orig/djmount/fuse_main.c	2006-08-27 16:12:20.000000000 -0400
+++ djmount-0.71/djmount/fuse_main.c	2011-12-23 15:39:29.000000000 -0500
@@ -529,6 +529,7 @@
      "    --version              print version number, then exit\n"
      "    -o [options]           mount options (see below)\n"
      "    -d[levels]             enable debug output (implies -f)\n"
+     "    -s                     sloppy -- ignore unknown options\n"
      "    -f                     foreground operation (default: daemonized)\n"
      "\n"
      "Mount options (one or more comma separated options) :\n"
@@ -538,6 +539,7 @@
      "    playlists              use playlists for AV files, instead of plain files\n"
      "    search_history=<size>  number of remembered searches (default: %d)\n"
      "                           (set to 0 to disable search)\n"
+     "    sloppy                 ignore unknown options (e.g., for /etc/fstab)\n"
      "\n", DEFAULT_SEARCH_HISTORY_SIZE);
   fprintf 
     (stream,
@@ -635,6 +637,9 @@
 	Log_Printf (LOG_DEBUG, "  Fuse option = %s", fuse_argv[fuse_argc]); \
 	fuse_argc++
 
+	//Ignore unknown options "sloppy" -- mount -s
+	bool options_sloppy = false;
+
 	int opt = 1;
 	char* o;
 	while ((o = argv[opt++])) {
@@ -646,6 +651,9 @@
 			
 		} else if (strcmp(o, "-f") == 0) {
 			background = false;
+			
+		} else if (strcmp(o, "-s") == 0) {
+			options_sloppy = true;
 
 		} else if (*o != '-') { 
 			// mount point
@@ -657,6 +665,10 @@
 			char* options_copy = strdup (options);
 			char* tokptr = 0;
 			char* s;
+
+			char** unknown_options = talloc_size(tmp_ctx, sizeof(char) * strlen(options_copy));
+			int unknown_ptr = -1;
+
 			for (s = strtok_r (options_copy, ",", &tokptr); 
 			     s != NULL; 
 			     s = strtok_r (NULL, ",", &tokptr)) {
@@ -669,16 +681,43 @@
 				} else if (strncmp(s, "search_history=", 15)
 					   == 0) {
 					search_history_size = atoi (s+15);
+				//check for '-s|-o sloppy' -- ignore unknown options
+				} else if (strncmp(s, "sloppy", 15) == 0 ||
+						(strlen(s) == 1 && strncmp(s, "s", 1) == 0)) {
+					options_sloppy = true;
 				} else if (strncmp(s, "fsname=", 7) == 0 ||
 					   strstr (FUSE_ALLOWED_OPTIONS, s)) {
 					FUSE_ARG ("-o");
 					FUSE_ARG (talloc_strdup (tmp_ctx, s));
 				} else {
+					//Record unknown options for analysis, after we're sure
+					//we don't see '-o sloppy'
+					unknown_options[++unknown_ptr] = strdup(s);
+				}
+			}
+
+			//Now, we should know if we have invalid option(s), or can
+			//ignore:
+			if (unknown_ptr >= 0) {
+				//If debug...
+				int i = 0;
+				for (i = 0; i <= unknown_ptr; i++) {
+					char* message = talloc_size(tmp_ctx, sizeof(char) * 100);
+					snprintf(message, 100, "Found unknown option = %s%s",
+						unknown_options[i], (options_sloppy ? "; ignoring" : ""));
+					//printf("%s\n", message);
+					Log_Printf (LOG_WARNING, message);
+					talloc_free (message);
+				}
+				//If 'sloppy' is not enabled...
+				if (! options_sloppy) {
 					bad_usage (argv[0], 
-						   "unknown mount option '%s'",
-						   s); // ---------->
+						   "unknown mount option '%s' (and [-s|-o sloppy] not provided)",
+						   unknown_options[0]); // ---------->
 				}
 			}
+			talloc_free(unknown_options);
+
 			free (options_copy);
 			Log_Printf (LOG_INFO, "  Mount options = %s", options);
 			

--- End Message ---
--- Begin Message ---
Source: djmount
Source-Version: 0.71-5

We believe that the bug you reported is fixed in the latest version of
djmount, which is due to be installed in the Debian FTP archive:

djmount_0.71-5.debian.tar.gz
  to main/d/djmount/djmount_0.71-5.debian.tar.gz
djmount_0.71-5.dsc
  to main/d/djmount/djmount_0.71-5.dsc
djmount_0.71-5_i386.deb
  to main/d/djmount/djmount_0.71-5_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dario Minnucci <[email protected]> (supplier of updated djmount package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 21 Apr 2012 16:56:57 +0200
Source: djmount
Binary: djmount
Architecture: source i386
Version: 0.71-5
Distribution: unstable
Urgency: low
Maintainer: Dario Minnucci <[email protected]>
Changed-By: Dario Minnucci <[email protected]>
Description: 
 djmount    - file system client for mounting network media servers
Closes: 660098
Changes: 
 djmount (0.71-5) unstable; urgency=low
 .
   * debian/patches:
     - Added: 003-support-fstab-mounting.diff:
       - Adds support for mounting via /etc/fstab.
         Thanks to Kevin Vargo. (Closes: #660098)
Checksums-Sha1: 
 ff18e74ffa0b7a9f4a0f8e28011589129f4708b6 1893 djmount_0.71-5.dsc
 390d5df4a379341f6981a4194018fab3854219d0 7942 djmount_0.71-5.debian.tar.gz
 f8c83640ae863a6303401c1d81dd64a69d04a0ec 70578 djmount_0.71-5_i386.deb
Checksums-Sha256: 
 9d634d0ad34939bb272bfde1ce80cee1c7e4ad6b747314ede232a1355c8eb14e 1893 
djmount_0.71-5.dsc
 8c6282e017a0137d15b282bab85524f1b058d404ae19ccf8cf5f15e299e1f422 7942 
djmount_0.71-5.debian.tar.gz
 277e4804c4782e9e1718c9fb59bb1468f40d2fba43238e7016996234627ae075 70578 
djmount_0.71-5_i386.deb
Files: 
 a77404606b2a3bf5f3fc87c4485af730 1893 net extra djmount_0.71-5.dsc
 0bd20ec989f03a590d5001da0f2e64ac 7942 net extra djmount_0.71-5.debian.tar.gz
 001503f29c11fad436d4e39a9563446f 70578 net extra djmount_0.71-5_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJPktd7AAoJEKgvu4Pz1XAzpOYP/j89YljzDlStJ0B0znAXIyzZ
I83AUT/98GTEhQPgs8UfQkQEZEb5fSL84yZhlRka9BZdsOKHUwumkWNyGKFKALj1
QD4EdkvOTYOvG8w7rYT5X3fhAM2XMaokoAEF4X/QP4576XfBSaRO9qP6ELjiK027
KJeUsDdknLqGHimbWYTwU0VUvFqARv9nh6H2FUClBePEubGkyc8Pa6tL70oCMOWL
L7+yIlJowJCNRNFmX2En2YZV4enpjh1iI9w8fG+13ND2P/QpJEUZGwxCX3wQM0rf
gV/+XlSsMPWLXUWij73cRPcXaJY3PMSL4/8g9CHGIZ2dg8KYIOLvNRZPl5rYSPEz
I6KU5DC32KmCSxxyZLIFkgClBGjQyOAD7qj/o9yNRpCWZyeI4LSuEcnQrsLXtKo1
K6cWIBOY9I/itMvvD2y/EySQcPda8EESepSXMAxYAAAh1pPfOopzSKrjVW5mtRCD
NnHtql8J/NKUHszlqXSDICqSxTUr6V7K4VDtVfA9OiCGJykBStGZWQG4ZjMWQ4H4
3T1yoOl6rtKA8nildRK7OXIVUoqYTTuD84GXAiGIqj4bfVLANC1KYb2ns2eIH3EO
kknrhT9vcy3DX5n6EQA+HcdCN36cKhAjTA+2Lza7HeRuzCfmBAVDgJNwcBoKALHH
XgOJjlaBBhjhBIe+zYRk
=N4bz
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to