From a06daa242591a4f698027f7e7f4ac283ab6e0868 Mon Sep 17 00:00:00 2001 From: Florent Thoumie Date: Wed, 1 Jun 2005 15:35:25 +0000 Subject: - Add ##user form password patch. PR: ports/28803 Submitted by: motoyuki Approved by: maintainer timeout (3 years) --- comms/conserver/Makefile | 1 + comms/conserver/files/patch-etc_conserver_group.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 comms/conserver/files/patch-etc_conserver_group.c (limited to 'comms') diff --git a/comms/conserver/Makefile b/comms/conserver/Makefile index b279bf69e42f..30eafc861690 100644 --- a/comms/conserver/Makefile +++ b/comms/conserver/Makefile @@ -8,6 +8,7 @@ PORTNAME= conserver PORTVERSION= 8.5 +PORTREVISION= 1 CATEGORIES= comms MASTER_SITES= ftp://ftp.physics.purdue.edu/pub/pundits/ \ http://www.komquats.com/distfiles/ \ diff --git a/comms/conserver/files/patch-etc_conserver_group.c b/comms/conserver/files/patch-etc_conserver_group.c new file mode 100644 index 000000000000..75c5821c05bf --- /dev/null +++ b/comms/conserver/files/patch-etc_conserver_group.c @@ -0,0 +1,21 @@ +--- etc/conserver/group.c.orig Thu Aug 3 03:39:42 2000 ++++ etc/conserver/group.c Sat Jul 7 16:10:53 2001 +@@ -228,6 +228,18 @@ + struct passwd *pwd; + char *pcEPass, *pcWord; + { ++ if (pcEPass && '#' == pcEPass[0] && '#' == pcEPass[1] && '\0' != pcEPass[2] && (MAXLOGNAME + 1) > strlen(pcEPass)) { ++ /* If the encrypted password field from the config file ++ * looks like ##USER, look up the password for that ++ * user for the match. ++ */ ++ pwd = getpwnam(pcEPass+2); ++ if ((struct passwd *) NULL == pwd) { ++ return 0; ++ } ++ pcEPass = (char *)0; ++ } ++ + if (pcEPass && '\0' != pcEPass[0]) + if (MD5CheckPass(pcEPass, pcWord)) + return 1; -- cgit v1.2.3