On Sun, Dec 04, 2022 at 01:19:45PM +0100, William Orr wrote:
> Hey,
>
> getpwnam hasn't filled in passwd->pw_passwd since 5.9. This fixes a
> crash in uucpd that relied on the legacy behavior.
>
> Please cc me; not subscribed to this list.
Thanks. While the diff is clearly correct, doesn't that mean that no one
has used this port in >= 5 years? Is it worth keeping?
>
> Thanks,
> worr
>
> ---
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/uucpd/Makefile,v
> retrieving revision 1.3
> diff -u -b -w -p -r1.3 Makefile
> --- Makefile 11 Mar 2022 19:48:03 -0000 1.3
> +++ Makefile 4 Dec 2022 11:57:40 -0000
> @@ -1,6 +1,7 @@
> COMMENT = UUCP inetd program
>
> DISTNAME = uucpd-1.0
> +REVISION = 0
>
> CATEGORIES = net mail news
>
> Index: patches/patch-uucpd_c
> ===================================================================
> RCS file: /cvs/ports/net/uucpd/patches/patch-uucpd_c,v
> retrieving revision 1.2
> diff -u -b -w -p -r1.2 patch-uucpd_c
> --- patches/patch-uucpd_c 11 Mar 2022 19:48:03 -0000 1.2
> +++ patches/patch-uucpd_c 4 Dec 2022 11:57:40 -0000
> @@ -1,5 +1,6 @@
> ---- uucpd.c.orig Wed Mar 12 15:35:25 2014
> -+++ uucpd.c Sun Jan 18 16:44:38 2015
> +Index: uucpd.c
> +--- uucpd.c.orig
> ++++ uucpd.c
> @@ -43,6 +43,7 @@
> #include <sys/socket.h>
> #include <netinet/in.h>
> @@ -8,12 +9,15 @@
> #include <netdb.h>
> #include <signal.h>
> #include <fcntl.h>
> -@@ -170,7 +171,7 @@ doit(struct sockaddr *sa)
> +@@ -170,9 +171,9 @@ doit(struct sockaddr *sa)
> return;
> }
> } while (user[0] == '\0');
> - user[MAXLOGNAME] = '\0';
> + user[LOGIN_NAME_MAX] = '\0';
>
> - pw = getpwnam(user);
> +- pw = getpwnam(user);
> ++ pw = getpwnam_shadow(user);
> if (pw == NULL) {
> + printf("Password: ");
> + fflush(stdout);
>
No comments:
Post a Comment