Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd4fb1b2

Browse files
committed
Move md5.h contents to crypt.h.
1 parentb5b0ce2 commitd4fb1b2

File tree

7 files changed

+17
-34
lines changed

7 files changed

+17
-34
lines changed

‎src/backend/commands/user.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.80 2001/08/1518:42:14 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.81 2001/08/1521:08:20 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -25,7 +25,6 @@
2525
#include"catalog/indexing.h"
2626
#include"commands/user.h"
2727
#include"libpq/crypt.h"
28-
#include"libpq/md5.h"
2928
#include"miscadmin.h"
3029
#include"utils/array.h"
3130
#include"utils/builtins.h"

‎src/backend/libpq/crypt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Dec 17, 1997 - Todd A. Brandys
1010
*Orignal Version Completed.
1111
*
12-
* $Id: crypt.c,v 1.33 2001/08/1518:42:14 momjian Exp $
12+
* $Id: crypt.c,v 1.34 2001/08/1521:08:21 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -19,7 +19,6 @@
1919

2020
#include"postgres.h"
2121
#include"libpq/crypt.h"
22-
#include"libpq/md5.h"
2322
#include"miscadmin.h"
2423
#include"storage/fd.h"
2524
#include"utils/nabstime.h"

‎src/backend/libpq/md5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include<errno.h>
1919

2020
#include"postgres.h"
21-
#include"libpq/md5.h"
21+
#include"libpq/crypt.h"
2222

2323
/*
2424
*PRIVATE FUNCTIONS
@@ -249,7 +249,7 @@ bytesToHex(unsigned8 b[16], char *s)
249249
*
250250
* Calculates the MD5 sum of the bytes in a buffer.
251251
*
252-
* SYNOPSIS #include "md5.h"
252+
* SYNOPSIS #include "crypt.h"
253253
* int md5_hash(const void *buff, size_t len, char *hexsum)
254254
*
255255
* INPUT buff the buffer containing the bytes that you want

‎src/include/libpq/crypt.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,13 @@ extern char *crypt_getpwdreloadfilename(void);
2424

2525
externintmd5_crypt_verify(constPort*port,constchar*user,constchar*pgpass);
2626

27+
externboolmd5_hash(constvoid*buff,size_tlen,char*hexsum);
28+
externboolCheckMD5Pwd(char*passwd,char*storedpwd,char*seed);
29+
externboolEncryptMD5(constchar*passwd,constchar*salt,char*buf);
30+
31+
#defineMD5_PASSWD_LEN35
32+
33+
#defineisMD5(passwd)(strncmp((passwd),"md5",3) == 0 && \
34+
strlen(passwd) == MD5_PASSWD_LEN)
35+
2736
#endif

‎src/include/libpq/md5.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎src/interfaces/libpq/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.54 2001/08/1518:42:15 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.55 2001/08/1521:08:21 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -33,7 +33,7 @@ endif
3333
SHLIB_LINK +=$(filter -L%,$(LDFLAGS))$(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl,$(LIBS))
3434

3535

36-
all: md5.cmd5.hall-lib
36+
all: md5.c all-lib
3737

3838
# Shared library stuff
3939
include$(top_srcdir)/src/Makefile.shlib
@@ -52,9 +52,6 @@ dllist.c: $(backend_src)/lib/dllist.c
5252
md5.c:$(backend_src)/libpq/md5.c
5353
rm -f$@&&$(LN_S)$<.
5454

55-
md5.h:$(backend_src)/../include/libpq/md5.h
56-
rm -f$@&&$(LN_S)$<.
57-
5855
# this only gets done if configure finds system doesn't have inet_aton()
5956
inet_aton.c:$(backend_src)/port/inet_aton.c
6057
rm -f$@&&$(LN_S)$<.

‎src/interfaces/libpq/fe-auth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.49 2001/08/1518:42:15 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.50 2001/08/1521:08:21 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -33,7 +33,7 @@
3333
#include"libpq-fe.h"
3434
#include"libpq-int.h"
3535
#include"fe-auth.h"
36-
#include"md5.h"
36+
#include"libpq/crypt.h"
3737

3838
#ifdefWIN32
3939
#include"win32.h"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp