rdist annoyance
Ron Stanonik
stanonik at nprdc.arpa
Sat Nov 26 02:27:53 AEST 1988
We're finally thinking about using rdist (4.3BSD) to
distribute software changes locally. We assumed that
any user would be able to verify (rdist -v), but we
found that if the user doesn't have write permission
in the directory and the directory contains any symbolic
links, then for each link the user gets an error message:
rdist: pacific.nprdc.mil:/bin/rdista13112: Permission denied
The client rdist first queries about each file. For symbolic
links the server indicates the file is a symlink, but doesn't
return any information (eg, times, ownership, or link contents).
The client then does a COMPARE|VERIFY. The server (running
setuid the user) tries to make a temporary symlink (in anticipation
of updating), and that's where the error message come from.
We've "fixed" this by changing the server to not make the
temporary symlink if the opts include VERIFY. Now we don't
need to su root to verify.
Ron Stanonik
stanonik at nprdc.arpa
diff -c -r1.1 server.c
*** /tmp/,RCSt1026989 Wed Nov 23 11:39:18 1988
--- server.c Wed Nov 23 11:33:56 1988
***************
*** 768,774 ****
err();
return;
}
! if (symlink(buf, new) < 0) {
if (errno != ENOENT || chkparent(new) < 0 ||
symlink(buf, new) < 0)
goto badn;
--- 768,774 ----
err();
return;
}
! if (!(opts & VERIFY) && symlink(buf, new) < 0) {
if (errno != ENOENT || chkparent(new) < 0 ||
symlink(buf, new) < 0)
goto badn;
More information about the Comp.unix.wizards
mailing list