This is an automated notification sent by Gna!.
It relates to:
bugs #1957, project Savane
==============================================================================
LATEST MODIFICATIONS of bugs #1957:
==============================================================================
Posted by: Mathieu Roy <yeupou>
Posted on: 2005-01-13 10:22 (Europe/Paris)
_______________________________________________________
Status: None -> Fixed
Open/Closed: Open -> Closed
_______________________________________________________
Follow-up Comment:
Seems ok by now.
==============================================================================
OVERVIEW of bugs #1957:
==============================================================================
URL:
<http://gna.org/bugs/?func=detailitem&item_id=1957>
Summary: non working code related to ssh keys prefix
Project: Savane
Submitted by: yeupou
Submitted on: dim 02.01.2005 � 15:08
Category: Backend
Severity: 3 - Average
Priority: B - Low
Status: Fixed
Privacy: Public
Assigned to: beuc
Open/Closed: Closed
Release: DEV_2004-12-28_Savannah
Planned Release:
_______________________________________________________
I commented a bit of code in the function GetUserSSHKeyReal that was causing
the output to be different than the actual content of the file.
The purpose of this function is to return the exact content of the ssh user
file, in the same format as the equivalent field in the database. It is
important that it stays that way. I'm not sure to understand the purpose of
the code commented. As least, if this code is really needed, a comment should
be added.
At the same time, I remove a bit of code in sv_user that was apparently
removing line break (under the form ###, since it is the format of the ssh key
in the database). It was not obvious to me why such removal was necessary - it
was before a comparison, having 2 extra line break would not break the
comparison, as long as we have these each time.
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: jeu 13.01.2005 � 10:22 By: Mathieu Roy <yeupou>
Seems ok by now.
-------------------------------------------------------
Date: dim 02.01.2005 � 16:15 By: Mathieu Roy <yeupou>
Yes, but the test apparently involved something else at some point.
But whatever, we can just assume the format of the ssh key end with a newline
and we'll have no further test to make.
-------------------------------------------------------
Date: dim 02.01.2005 � 16:03 By: Sylvain Beucler <beuc>
No hard feelings :)
> It is likely related to what you mentioned about the
> format of SSH keys in the database - this will probably
> be resolved by adding the missing newline where it
> should be.
Well, the test was supposed to prevent this from happening, so if you got keys
recreated with the test, then there is a problem :/
I'll perform some tests.
-------------------------------------------------------
Date: dim 02.01.2005 � 15:43 By: Mathieu Roy <yeupou>
> An alternative way to fix the problem would be to create > a script to add a
newline to all the registered SSH keys, > put in update/.
I think we should do that. It is better to keep coherent database. Easier for
code changes, easier to avoid cluttering up the code with workarounds.
> In general, I think it is best to ask first and then
> change, instead of changing first and then asking, don't
> you think? :)
Hum, I'd say it depends on the circumstances. I meant no hostility toward you.
I've just put in production this branch in order to test it more completely
and this was a blocker item to me. I hope I did not hurt your feelings, that
would be a bad start for 2005 :]
(before my changes, there was more than 100 users keys thatg were recreated
each time on gna members system).
> It is strange that the test can fail; do you have an
> sample list of keys (database and system versions) that is
> recreated because of the test?
It is likely related to what you mentioned about the format of SSH keys in the
database - this will probably be resolved by adding the missing newline where
it should be.
-------------------------------------------------------
Date: dim 02.01.2005 � 15:23 By: Sylvain Beucler <beuc>
AFAIR a version of Savane was saving the SSH keys without an ending newline (I
think, not the latest one), and another one was doing so. The changes, I
think, happened when the interface to enter SSH keys was changed from a
<textarea> to a sequence of <input>.
So, if the user submitted his key with the previous version, it would be
always recreated with the new version, because the authorized_keys present in
the system would have ending newline, and the database would not.
An alternative way to fix the problem would be to create a script to add a
newline to all the registered SSH keys, put in update/.
In general, I think it is best to ask first and then change, instead of
changing first and then asking, don't you think? :)
It is strange that the test can fail; do you have an sample list of keys
(database and system versions) that is recreated because of the test?
==============================================================================
This item URL is:
<http://gna.org/bugs/?func=detailitem&item_id=1957>
_______________________________________________
Message post� via/par Gna!
http://gna.org/
_______________________________________________
Savane-dev mailing list
[email protected]
https://mail.gna.org/listinfo/savane-dev