patchmldonkey, a multi-networks file-sharing client - Patches: patch #3919, Move passwords to users.ini which...


You are not allowed to post comments on this tracker with your current authentication level.

patch #3919: Move passwords to users.ini which has rights 600

Submitted by:  spiralvoice <spiralvoice>
Submitted on:  Mon 18 Apr 2005 07:12:13 PM UTC  
Category:  Bug fixes Priority:  7 - High
Status:  Done Assigned to:  None
Open/Closed:  Closed

( Jump to the original submission)

Sat 23 Apr 2005 10:15:24 PM UTC, comment #6: 


spiralvoice <spiralvoice>
Project Administrator
Sat 23 Apr 2005 04:41:38 PM UTC, comment #5: 

Updated patch for

spiralvoice <spiralvoice>
Project Administrator
Fri 22 Apr 2005 08:37:43 PM UTC, comment #4: 

I updated the patch, there is now a new function:
Options.save_with_help_private which should set the file rights
quickly after saving the opfile.

spiralvoice <spiralvoice>
Project Administrator
Wed 20 Apr 2005 02:33:05 PM UTC, comment #3: 

The file is chmod-ed after it is saved. This must be done after or at the time of the creation, because otherwise there is a time when it has the permission from the default umask.
Perhaps Options.save_with_help should be enhanced with an argument private that is true or false and create the file with the appropriate permissions.

I guess cp of the download.ini won't work, if the downloads.ini was just created because it was not there, or is that not the case?
Perhaps one can first load users.ini and then when loading downloads.ini after that and there are no users load them from downloads.ini like it was done before and if that fails create the default user. Would this be possible?

Amorphous <amorphous>
Tue 19 Apr 2005 05:46:34 PM UTC, comment #2: 

options_version is used to change the value of some options (web_infos, loop_delay, min_reask_delay) but these options keep
their name in the same options file. But here I want to move an
option from one file to another, it seems reading an option is
only possible if that option is defined for that ini-file which
is not the case here.

I think I solved the problem by copying downloads.ini with the
old users entries to users.ini if users.ini does not exist.
Not used options are thrown out of the ini files so downloads.ini
will loose the "users = " entry and in users.ini only the users
are kept, so upgrading should work without problems.

+  let exists_users_ini = Sys.file_exists
+      (options_file_name users_ini) in
+  if not exists_users_ini then begin
+      lprintf "No config file (users.ini) found. Generating one.\n";
+      (try Unix2.copy "downloads.ini" "users.ini" with _ -> ());
+    end;

spiralvoice <spiralvoice>
Project Administrator
Tue 19 Apr 2005 02:01:25 PM UTC, comment #1: 

there is at least one example for option migration in the code (downloads.ini with the options_version option).

the idea is good, didn't look at the actual code. this will only be applied when someone has enhanced it so that it migrates the old data.

Amorphous <amorphous>
Mon 18 Apr 2005 07:12:13 PM UTC, original submission:  

This solves bug #11185, old users are not transfered from
downloads.ini to users.ini (does anybody know how to do this?).

Users have to newly submit passwords, default after starting the
new core with this patch is user "admin" with a blank password,
just like when starting a core in a blank directory.

spiralvoice <spiralvoice>
Project Administrator


Attached Files
file #8717:  3919_4.patch added by spiralvoice (3KiB - text/x-patch - some additions from Amorphous r278, apply 3919_3.patch first)
file #8710:  3919_3.patch added by spiralvoice (9KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




Follow 16 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-04-23 spiralvoice Open/ClosedOpen => Closed
2005-04-23 spiralvoice Attached File- => Added 3919_4.patch, #4502
2005-04-23 amorphous StatusNone => Done
2005-04-23 spiralvoice Attached File- => Added 3919_3.patch, #4495
2005-04-23 spiralvoice Attached File#4491 => Removed
2005-04-23 spiralvoice Attached File#4474 => Removed
2005-04-22 spiralvoice Attached File- => Added 3919_2.patch, #4491
2005-04-22 spiralvoice Attached File#4490 => Removed
2005-04-22 spiralvoice Attached File- => Added 3919_2.patch, #4490
2005-04-22 spiralvoice Attached File#4489 => Removed
2005-04-22 spiralvoice Attached File- => Added 3919_2.patch, #4489
2005-04-19 spiralvoice Attached File#4472 => Removed
2005-04-19 spiralvoice StatusPostponed => None
2005-04-19 spiralvoice Attached File- => Added users_ini2.patch, #4474
2005-04-19 amorphous StatusNone => Postponed
2005-04-18 spiralvoice Attached File- => Added users_ini.patch, #4472

Back to the top

Powered by Savane 3.5