[Freeciv-Dev] Re: Passwd auth with MD5 hash
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Aug 21, 2001 at 01:09:23AM +0200, Auth Gábor wrote:
> Hi!
>
> Advanced password auth patch for civserver. Enable password
> authentication for clients, and passwords stored in MD5 hash.
I don't see the md5 method.
> See attachment.
> --
> Frank O'Yanco - Auth Gábor -=- Mobil/SMS +36203494743 /+36303687792
> Age of The Penguin -=- SuSE Linux 7.1 -=- http://andromeda.rgstudio.hu
> diff -ruP freeciv-1.12.0/common/player.h freeciv-1.12.0-pl1/common/player.h
> --- freeciv-1.12.0/common/player.h Wed Sep 6 23:41:16 2000
> +++ freeciv-1.12.0-pl1/common/player.h Tue Aug 21 00:49:30 2001
> @@ -129,6 +129,7 @@
> struct player {
> int player_no;
> char name[MAX_LEN_NAME];
> + char passwd[36];
A symbolic define would be nice.
> + char Salt[12];
> + int SaltCount;
> +
> + Salt[0]='$';
> + Salt[1]='1';
> + Salt[2]='$';
> + Salt[12]='\0';
You have to initialize Salt[0-11]. The access to Salt[12] is bad.
> + sscanf(name, "%[^:]:%s",buf_name,buf_passwd);
> + if ( sscanf(req->name,"%[^:]:%s",buf_name,buf_passwd)!=2 )
Could this be expressed with strchr()?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"brand memory are for windows users that think their stability
problems come from the memory"
-- bomek in #freeciv
|
|