diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-08-23 21:49:58 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-08-23 21:49:58 +0100 |
commit | ce80202cfcf7f0dcb80e055eba3f6475232a5961 (patch) | |
tree | cbcbc1415a53efca01b7bc3daab62ea7fde9d047 /mail-mta/courier | |
parent | 41ba6a36cf63678ca63fdd9788e84e3e032dc4ba (diff) |
gentoo auto-resync : 23:08:2023 - 21:49:58
Diffstat (limited to 'mail-mta/courier')
-rw-r--r-- | mail-mta/courier/Manifest | 1 | ||||
-rw-r--r-- | mail-mta/courier/files/courier-1.2.2-fix-getgrnam-buffer.diff | 120 |
2 files changed, 0 insertions, 121 deletions
diff --git a/mail-mta/courier/Manifest b/mail-mta/courier/Manifest index 7edb277ecdb5..d9d7596b4846 100644 --- a/mail-mta/courier/Manifest +++ b/mail-mta/courier/Manifest @@ -1,5 +1,4 @@ AUX apache-sqwebmail.inc 347 BLAKE2B e77a680065e064c300d01ec21db524f3a440623b685ecd870607b563ebbaaf1106091074e55346743877cfa44d425c29592ec3f60dedf8c7e2b6355cdc84e558 SHA512 e3f8f4f01563184ec4afc98d61ab739d5900f7d8757638fb06ff21ca3604f8c6f708730af514f6ca662559980503dee5955ba48c5a643e473054f3eec49b89a0 -AUX courier-1.2.2-fix-getgrnam-buffer.diff 2468 BLAKE2B ba01b7a98aad1df059ab8135a94fbbfdb10ae9196ddf3985ce41a365946e5a0ec25f4e4d932cf1b76ecd971e3e17837d02f7f86e957192888b44668dbf0ff948 SHA512 7ce3ef8c3db636370b60ac04c18390fef9b9d0702e99aaf82b7d899e07fe23c47cea2cde26e22270db7788de70508d0686b0df02311987388d0f59969f094331 AUX courier-init-r4 4965 BLAKE2B 09f29543599abfb6dd5df058f832e979bde471be3f9d293d975fdfc28787e8622ddab797c9d51fa89207fbc1a1ee23fb82471617366bf1467d1e7f2d7d3f2bcc SHA512 ca5e12bfa4fe2166cd2c1ef8c68e3cda957fd33011971237f3f76ec9d4ec1503eb22d78ec08ed42671d8858790ea7761c272a4896c680a51691c094696fee5f9 AUX norewrite.patch 488 BLAKE2B 663b52ff5936d5c8aa24ce2a226cd803f09a972a2f358b7f81d1711319b4fee2d7a9c4a8b498e8550b27d796939f6ba042790211592e55072bbff6b7f7172ea3 SHA512 5c2329f497951220bb1276058fe7fe2e0eba710fcad65c9ff1143827fec7c8d9745703fbebf624fecf740fb767401eeba9f0e91b09cd891622d01899578326db AUX password.dist 247 BLAKE2B 1803a6663c32ccc74c4dfb1d591a01d4416f9de9c4bf35c9a7ca277c2007b8c29a8899f4285c78eeb8592766457eef0caf377a344adee7a61be15bbf8b80c7de SHA512 f488b0ab1a909c9b878b9f3f3147641a9ed6d8d2ad44c67cd641934b800b18a62de2a7f5f51fdbecfbbcdd7c39c753734984cc0836c905a3b708858e1b91093d diff --git a/mail-mta/courier/files/courier-1.2.2-fix-getgrnam-buffer.diff b/mail-mta/courier/files/courier-1.2.2-fix-getgrnam-buffer.diff deleted file mode 100644 index 73384098189c..000000000000 --- a/mail-mta/courier/files/courier-1.2.2-fix-getgrnam-buffer.diff +++ /dev/null @@ -1,120 +0,0 @@ -diff -Naurp a/libs/numlib/changeuidgid.c b/libs/numlib/changeuidgid.c ---- a/libs/numlib/changeuidgid.c 2022-03-06 20:02:45.000000000 +0100 -+++ b/libs/numlib/changeuidgid.c 2023-02-24 17:26:02.452835861 +0100 -@@ -52,10 +52,11 @@ void libmail_changeuidgid(uid_t uid, gid - */ - uid_t libmail_getuid(const char *uname, gid_t *pw_gid) - { -- size_t bufsize; -+ int bufsize; - char *buf; - struct passwd pwbuf; - struct passwd *pw; -+ int s; - - /* - ** uname might be a pointer returned from a previous called to getpw(), -@@ -70,35 +71,39 @@ uid_t libmail_getuid(const char *uname, - } - strcpy(p, uname); - --#ifdef _SC_GETGR_R_SIZE_MAX -- bufsize = sysconf(_SC_GETGR_R_SIZE_MAX); -+#ifdef _SC_GETPW_R_SIZE_MAX -+ bufsize = sysconf(_SC_GETPW_R_SIZE_MAX); - if (bufsize == -1) /* Value was indeterminate */ -- { - #endif -- bufsize = 16384; /* Should be more than enough */ -- } -- -- buf = malloc(bufsize); -- if (buf == NULL) - { -- perror("malloc"); -- exit(1); -+ bufsize = 16384; /* Should be more than enough */ - } - -+ do { -+ buf = malloc(bufsize); -+ if (buf == NULL) -+ { -+ perror("malloc"); -+ exit(1); -+ } - -- errno=ENOENT; -- -- getpwnam_r(p, &pwbuf, buf, bufsize, &pw); -+ s = getpwnam_r(p, &pwbuf, buf, bufsize, &pw); -+ if (s == ERANGE) { -+ free(buf); -+ bufsize += 1024; -+ } -+ } while (s == ERANGE && bufsize <= 65536); - -- free(buf); -+ free(p); - - if (pw == 0) - { -- free(p); -- perror("getpwnam"); -+ errno = s; -+ perror("getpwnam_r"); - exit(1); - } -- free(p); -+ -+ free(buf); - - if ( pw_gid ) *pw_gid = pw->pw_gid; - -@@ -149,7 +154,7 @@ gid_t libmail_getgid(const char *gname) - struct group grp; - struct group *result; - char *buf; -- size_t bufsize; -+ int bufsize; - int s; - char *p=malloc(strlen(gname)+1); - -@@ -168,14 +173,21 @@ gid_t libmail_getgid(const char *gname) - bufsize = 16384; /* Should be more than enough */ - } - -- buf = malloc(bufsize); -- if (buf == NULL) -- { -- perror("malloc"); -- exit(1); -- } -+ do { -+ buf = malloc(bufsize); -+ if (buf == NULL) -+ { -+ perror("malloc"); -+ exit(1); -+ } -+ -+ s = getgrnam_r(p, &grp, buf, bufsize, &result); -+ if (s == ERANGE) { -+ free(buf); -+ bufsize += 1024; -+ } -+ } while (s == ERANGE && bufsize <= 65536); - -- s = getgrnam_r(p, &grp, buf, bufsize, &result); - free(p); - - if (result == NULL) -@@ -187,7 +199,7 @@ gid_t libmail_getgid(const char *gname) - else - { - errno = s; -- perror("getpwnam_r"); -+ perror("getgrnam_r"); - } - exit(1); - } |