diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2003-11-20 05:09:20 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2003-11-20 05:09:20 +0000 |
commit | 2bd1b7fa390387603a0c2560598845e969b84075 (patch) | |
tree | 0d21908e4fc87afd27811b38ce409d014e571ec9 /shells/fd | |
parent | b5d1057a02df982777cd2b8d0e239c064a74810d (diff) | |
download | ports-2bd1b7fa390387603a0c2560598845e969b84075.tar.gz ports-2bd1b7fa390387603a0c2560598845e969b84075.zip |
Notes
Diffstat (limited to 'shells/fd')
-rw-r--r-- | shells/fd/Makefile | 1 | ||||
-rw-r--r-- | shells/fd/files/patch-pathname.c | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/shells/fd/Makefile b/shells/fd/Makefile index 6a209a9998d1..8024758ad77e 100644 --- a/shells/fd/Makefile +++ b/shells/fd/Makefile @@ -7,6 +7,7 @@ PORTNAME= fd PORTVERSION= 2.04c +PORTREVISION= 1 CATEGORIES= shells MASTER_SITES= http://hp.vector.co.jp/authors/VA012337/soft/fd/ \ ftp://ftp.vector.co.jp/pack/unix/util/file/filer/fd/ diff --git a/shells/fd/files/patch-pathname.c b/shells/fd/files/patch-pathname.c new file mode 100644 index 000000000000..0d3f5f67b5e5 --- /dev/null +++ b/shells/fd/files/patch-pathname.c @@ -0,0 +1,31 @@ +Taken from: [FDclone-users:00244] Re: SEGV caused by group lookups + +diff -u ../old/FD-2.04c/pathname.c ./pathname.c +--- ../old/FD-2.04c/pathname.c Wed Oct 15 00:00:00 2003 ++++ ./pathname.c Wed Nov 19 12:40:17 2003 +@@ -2917,7 +2917,7 @@ + gidlist = b_realloc(gidlist, maxgid, gidtable); + gidlist[maxgid].gid = grp -> gr_gid; + gidlist[maxgid].name = strdup2(grp -> gr_name); +- gidlist[maxgid].gr_mem = grp -> gr_mem; ++ gidlist[maxgid].gr_mem = duplvar(grp -> gr_mem, -1); + gidlist[maxgid].ismem = 0; + return(&(gidlist[maxgid++])); + } +@@ -2932,13 +2932,15 @@ + if (!(gp = findgid(gid, NULL))) return(0); + if (!(gp -> ismem)) { + gp -> ismem++; +- if ((up = finduid(geteuid(), NULL))) ++ if (gp -> gr_mem && (up = finduid(geteuid(), NULL))) + for (i = 0; gp -> gr_mem[i]; i++) { + if (!strpathcmp(up -> name, gp -> gr_mem[i])) { + gp -> ismem++; + break; + } + } ++ freevar(gp -> gr_mem); ++ gp -> gr_mem = NULL; + } + + return(gp -> ismem - 1); |