Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Bug#392605: mldonkey-server: mldonkey_server fails with un..

 
   Linux (Home) -> Ocaml Maint RSS
Next:  Bug#392604: mldonkey-server: mldonkey_server requ..  
Author Message
Géraud

External


Since: Mar 14, 2008
Posts: 14



(Msg. 1) Posted: Thu Oct 12, 2006 5:00 pm
Post subject: Bug#392605: mldonkey-server: mldonkey_server fails with uncaught exception
Archived from groups: linux>debian>bugs>dist, others (more info?)

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}),



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Bug#392604: mldonkey-server: mldonkey_server requires that.. - Package: mldonkey-server Version: 2.8.1-1 Severity: normal Tags: patch mldonkey_server cannot run if the HOME variable is unset, whether the --chdir option is used or not: # mldonkey_server Set niceness of the process: 0 Set uid/gid of the..

mldonkey-server package - fails to install fully; message is: Errors were encountered while processing: mldonkey-server E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up mldonkey-server (2.7.7-5) .....

Bug#379128: mldonkey-server: cannot install nor remove - Package: mldonkey-server Version: 2.7.7-4 Severity: grave Justification: renders package unusable after trying to upgrade mldonkey server, for each action I get : Please set both variables MLDONKEY_USER and MLDONKEY_GROUP in..

Bug#401273: mldonkey-server: error on post-install on upgr.. - Package: mldonkey-server Version: 2.8.2-1 Severity: normal Hi, I get the following error when trying to upgrade to 2.8.2-1: Fatal error: exception Mldonkey_users.Invalid_format dpkg: error processing mldonkey-server (--configure): subprocess..

RFS: mldonkey, ocamldap - Hello, As usual, i need some help to upload some packages: - ocamldap 2.1.5: new upstream release - mldonkey 2.6.4: not so new upstream release ;-) The two packages are ready in the svn repository. Thanks in advance Kind regard Sylvain Le Gall -- ....
       Linux (Home) -> Ocaml Maint All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact