summaryrefslogtreecommitdiffstats
path: root/contrib/bind/lib/irs/gen_gr.c
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2000-10-31 12:35:45 +0000
committerasmodai <asmodai@FreeBSD.org>2000-10-31 12:35:45 +0000
commit90887e8f5bdae690c1ceca0ae12853e5e66c5282 (patch)
treeded7434aeb301ad84d14ba3ce978e6cf9daa040d /contrib/bind/lib/irs/gen_gr.c
parent0cde5af39957d47be39dccb2c23851221c739115 (diff)
downloadFreeBSD-src-90887e8f5bdae690c1ceca0ae12853e5e66c5282.zip
FreeBSD-src-90887e8f5bdae690c1ceca0ae12853e5e66c5282.tar.gz
Virgin import of BIND v8.2.3-T6B
Diffstat (limited to 'contrib/bind/lib/irs/gen_gr.c')
-rw-r--r--contrib/bind/lib/irs/gen_gr.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/bind/lib/irs/gen_gr.c b/contrib/bind/lib/irs/gen_gr.c
index ae23d2c..14dfa2d 100644
--- a/contrib/bind/lib/irs/gen_gr.c
+++ b/contrib/bind/lib/irs/gen_gr.c
@@ -16,7 +16,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: gen_gr.c,v 1.21 1999/10/13 16:39:29 vixie Exp $";
+static const char rcsid[] = "$Id: gen_gr.c,v 1.22 2000/07/11 05:51:56 vixie Exp $";
#endif
/* Imports */
@@ -325,7 +325,7 @@ static void
grmerge(struct irs_gr *this, const struct group *src, int preserve) {
struct pvt *pvt = (struct pvt *)this->private;
char *cp, **m, **p;
- int n, ndst, nnew;
+ int n, ndst, nnew, memadj;
if (!preserve) {
pvt->group.gr_gid = src->gr_gid;
@@ -377,6 +377,7 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
/* No harm done, no work done. */
return;
}
+ memadj = cp - pvt->membuf;
pvt->membuf = cp;
cp += pvt->membufsize;
pvt->membufsize += n;
@@ -391,7 +392,10 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
strcpy(cp, *m);
cp += strlen(cp) + 1;
}
- if (!preserve) {
+ if (preserve) {
+ pvt->group.gr_name += memadj;
+ pvt->group.gr_passwd += memadj;
+ } else {
pvt->group.gr_name = cp;
strcpy(cp, src->gr_name);
cp += strlen(src->gr_name) + 1;
OpenPOWER on IntegriCloud