diff options
-rw-r--r-- | databases/postgresql-devel-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql-devel/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql7/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql73-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql73/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql74-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql80-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql81-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql82-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql83-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql84-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql90-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql91-server/files/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql92-server/files/patch-aj | 69 |
14 files changed, 966 insertions, 0 deletions
diff --git a/databases/postgresql-devel-server/files/patch-aj b/databases/postgresql-devel-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql-devel-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql-devel/files/patch-aj b/databases/postgresql-devel/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql-devel/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql7/files/patch-aj b/databases/postgresql7/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql7/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql73-server/files/patch-aj b/databases/postgresql73-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql73-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql73/files/patch-aj b/databases/postgresql73/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql73/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql74-server/files/patch-aj b/databases/postgresql74-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql74-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql80-server/files/patch-aj b/databases/postgresql80-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql80-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql81-server/files/patch-aj b/databases/postgresql81-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql81-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql82-server/files/patch-aj b/databases/postgresql82-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql82-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql83-server/files/patch-aj b/databases/postgresql83-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql83-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql84-server/files/patch-aj b/databases/postgresql84-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql84-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql90-server/files/patch-aj b/databases/postgresql90-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql90-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql91-server/files/patch-aj b/databases/postgresql91-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql91-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql92-server/files/patch-aj b/databases/postgresql92-server/files/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql92-server/files/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++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]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + 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]; +@@ -252,7 +256,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; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; |