diff options
Diffstat (limited to 'japanese/postgresql-tcltk/files/patch-ab')
-rw-r--r-- | japanese/postgresql-tcltk/files/patch-ab | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/japanese/postgresql-tcltk/files/patch-ab b/japanese/postgresql-tcltk/files/patch-ab index cb53b5b7de93..3be237663dd4 100644 --- a/japanese/postgresql-tcltk/files/patch-ab +++ b/japanese/postgresql-tcltk/files/patch-ab @@ -1,25 +1,22 @@ ---- bin/pg_passwd/pg_passwd.c.orig Thu May 27 16:00:40 1999 -+++ bin/pg_passwd/pg_passwd.c Tue Jun 15 19:27:47 1999 -@@ -26,11 +26,17 @@ +--- bin/pg_passwd/pg_passwd.c.orig Mon Apr 17 12:45:18 2000 ++++ bin/pg_passwd/pg_passwd.c Wed May 10 03:39:18 2000 +@@ -18,11 +18,14 @@ #endif +#ifndef _POSIX_SOURCE -+# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ +#endif -+ -+ char *comname; - static void usage(FILE *stream); - static void read_pwd_file(char *filename); -+static void encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]); -+int check_pwd(char key[9], char passwd[_PASSWORD_LEN+1]); - static void write_pwd_file(char *filename, char *bkname); --static void encrypt_pwd(char key[9], char salt[3], char passwd[14]); - static void prompt_for_username(char *username); - static void prompt_for_password(char *prompt, char *password); + static void usage(FILE *stream); + static void read_pwd_file(char *filename); + static void write_pwd_file(char *filename, char *bkname); +-static void encrypt_pwd(char key[9], char salt[3], char passwd[14]); ++static void encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]); + static void prompt_for_username(char *username); + static void prompt_for_password(char *prompt, char *password); -@@ -158,7 +164,7 @@ +@@ -150,7 +153,7 @@ if (q != NULL) *(q++) = '\0'; @@ -28,7 +25,7 @@ { fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", filename, npwds + 1); -@@ -222,7 +228,7 @@ +@@ -214,7 +217,7 @@ } static void @@ -37,26 +34,28 @@ { int n; -@@ -254,9 +260,7 @@ +@@ -246,9 +249,9 @@ #ifdef NOT_USED static int -check_pwd(char key[9], char passwd[14]) ++check_pwd(char key[9], char passwd[_PASSWORD_LEN+1]) { - char shouldbe[14]; ++ char shouldbe[_PASSWORD_LEN+1]; char salt[3]; salt[0] = passwd[0]; -@@ -264,7 +268,7 @@ +@@ -256,7 +259,7 @@ salt[2] = '\0'; encrypt_pwd(key, salt, shouldbe); - return strncmp(shouldbe, passwd, 13) == 0 ? 1 : 0; -+ return strncmp(shouldbe, passwd, _PASSWORD_LEN) == 0 ? 1 : 0; ++ return strncmp(shouldbe, passwd, _PASSWORD_LEN+1) == 0 ? 1 : 0; } - #endif -@@ -339,7 +343,7 @@ + #endif +@@ -332,7 +335,7 @@ char salt[3]; char key[9], key2[9]; |