[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#392605: marked as done (mldonkey-server: mldonkey_server fails with uncaught exception)



Your message dated Tue, 24 Oct 2006 14:47:31 -0700
with message-id <E1GcU7P-0003CL-KK@spohr.debian.org>
and subject line Bug#392605: fixed in mldonkey 2.8.1-2
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: mldonkey-server
Version: 2.8.1-1
Severity: normal
Tags: patch

Here is an example (trying to give a UID instead of a username):
    # mldonkey --chuid 1000
    Fatal error: exception Not_found
The same can happen with --chgid and --umask. The exception is not very
expressive.

Arg.parse is used to parse the command line but this function does not
intercept all exceptions, so a "conversion" has to be made. The proposed
patch:

--- mldonkey-2.8.1/debian/utils/mldonkey_server.ml.orig 2006-10-12
08:53:17.000000000 +0200
+++ mldonkey-2.8.1/debian/utils/mldonkey_server.ml      2006-10-12
09:46:48.000000000 +0200
@@ -181,7 +181,8 @@
     "--chuid",
     Arg.String (fun x ->
                   let passwd_ent =
-                    Unix.getpwnam x
+                    try Unix.getpwnam x with
+                      Not_found -> raise (Arg.Bad ("wrong argument
`"^x^"'; option `--chuid' expects a user name"))
                   in
                     state := {!state with chuid = passwd_ent.pw_uid}
     ),
@@ -189,13 +190,18 @@
     "--chgid",
     Arg.String (fun x ->
                   let group_ent =
-                    Unix.getgrnam x
+                    try Unix.getgrnam x with
+                      Not_found -> raise (Arg.Bad ("wrong argument
`"^x^"'; option `--chgid' expects a group name"))
                   in
                     state := {!state with chgid = group_ent.gr_gid}
     ),
     "Which group own the process";
     "--umask",
-    Arg.String (fun x -> state := {!state with umask = int_of_string (
"0o"^x )}),
+    Arg.String (fun x ->
+                  let mask =
+                    try int_of_string ( "0o"^x ) with
+                      Failure "int_of_string"|| -> raise (Arg.Bad
("wrong argument `"^x^"'; option `--umask' expects an octal umask"))
+                  in state := {!state with umask = mask}),
     "What umask to use";
     "--nice",
     Arg.Int (fun x -> state := {!state with nice = x}),



--- End Message ---
--- Begin Message ---
Source: mldonkey
Source-Version: 2.8.1-2

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

mldonkey-gui_2.8.1-2_i386.deb
  to pool/main/m/mldonkey/mldonkey-gui_2.8.1-2_i386.deb
mldonkey-server_2.8.1-2_i386.deb
  to pool/main/m/mldonkey/mldonkey-server_2.8.1-2_i386.deb
mldonkey_2.8.1-2.diff.gz
  to pool/main/m/mldonkey/mldonkey_2.8.1-2.diff.gz
mldonkey_2.8.1-2.dsc
  to pool/main/m/mldonkey/mldonkey_2.8.1-2.dsc



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 392605@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Samuel Mimram <smimram@debian.org> (supplier of updated mldonkey 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 24 Oct 2006 21:29:32 +0000
Source: mldonkey
Binary: mldonkey-gui mldonkey-server
Architecture: source i386
Version: 2.8.1-2
Distribution: unstable
Urgency: low
Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
Changed-By: Samuel Mimram <smimram@debian.org>
Description: 
 mldonkey-gui - Graphical frontend for mldonkey based on GTK
 mldonkey-server - Door to the 'donkey' network
Closes: 389455 391729 392604 392605 392617 395068
Changes: 
 mldonkey (2.8.1-2) unstable; urgency=low
 .
   * Added newdns.dpatch to fix the DNS resolution problem with
     www.mldonkey.net, closes: #395068.
   * Creating mldonkey group as system group, closes: #389455.
   * Flushing after password prompt in mldonkey_command, closes: #391729.
   * Patched mldonkey_server to be able to run mldonkey even when HOME is not
     set (thanks Géraud Meyer), closes: #392604.
   * Cleanly handle erroneous --chuid / --chgid / --umask arguments in
     mldonkey_server (thanks Géraud Meyer), closes: #392605.
   * Fixed a typo in mldonkey_server (thanks Géraud Meyer), closes: #392617.
   * Change address of Sylvain Le Gall to gildor@debian.org.
Files: 
 f1bca5d29b9ff350dcacbac5906c9b71 1054 net optional mldonkey_2.8.1-2.dsc
 e8b9b200b62697d30d8cdc8369f0a7a9 114336 net optional mldonkey_2.8.1-2.diff.gz
 9b65c47559c682612013fc2c919f9fda 2888226 net optional mldonkey-server_2.8.1-2_i386.deb
 2db8fe10957b3508cb94c3e83540139e 3264428 net optional mldonkey-gui_2.8.1-2_i386.deb

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

iD8DBQFFPoffIae1O4AJae8RAi6eAJ9yxhJ6TMDM7P2PMjkPs85W0Dct4gCdHpVv
luACFseY+vHIgVB+89Ul92Y=
=e0oI
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: