Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!think!ames!ptsfa!ihnp4!inuxc!pur-ee!j.cc.purdue.edu!i.cc.purdue.edu!arthur.cs.purdue.edu!trinkle From: trinkle@arthur.cs.purdue.edu.UUCP Newsgroups: comp.bugs.4bsd Subject: Rdist (4.3) gives bogus gid when no group name for group Message-ID: <1091@arthur.cs.purdue.edu> Date: Mon, 23-Mar-87 16:54:07 EST Article-I.D.: arthur.1091 Posted: Mon Mar 23 16:54:07 1987 Date-Received: Wed, 25-Mar-87 06:21:19 EST Organization: Department of Computer Science, Purdue University Lines: 51 Keywords: rdist, group Index: ucb/rdist/server.c 4.3BSD Description: Rdist prints a bogus group id when complaining about a non-existent group name for a file. It is something like: /tmp/foo: no name for group 2147476189 The problem is that the fourth argument to the log() call is missing. Repeat-By: As root (only necessary for chgrp), change the group of a file to a numeric group that has no name (does not appear in /etc/group). Then rdist this file to localhost with at different installation localion. # touch /tmp/foo # chgrp 990 /tmp/foo # rdist -c /tmp/foo localhost:/tmp/bar updating host localhost /tmp/foo: no name for group 2147476189 installing: /tmp/foo # Fix: Add the fourth argument to the log() call complaining about the group. *** /tmp/,RCSt1028282 Mon Mar 23 16:46:29 1987 --- /usr/src/ucb/rdist/server.c Mon Mar 23 16:38:32 1987 *************** *** 289,295 **** } if (gr == NULL || gr->gr_gid != stb.st_gid) if ((gr = getgrgid(stb.st_gid)) == NULL) { ! log(lfp, "%s: no name for group %d\n", target); gr = NULL; sprintf(group, ":%d", stb.st_gid); } --- 289,295 ---- } if (gr == NULL || gr->gr_gid != stb.st_gid) if ((gr = getgrgid(stb.st_gid)) == NULL) { ! log(lfp, "%s: no name for group %d\n", target, stb.st_gid); gr = NULL; sprintf(group, ":%d", stb.st_gid); } -- Daniel Trinkle trinkle@cs.purdue.edu ARPA Computer Science Department trinkle%purdue.edu@relay.cs.net CSNET Purdue University {ucbvax,decvax,ihnp4}!purdue!trinkle UUCP West Lafayette, IN 47907 (317) 494-7832 PHONE