stolcke@ICSI.Berkeley.EDU (Andreas Stolcke) (11/03/90)
I just stumbled upon a tricky big (more an ommission) in xman (X11R4, fixes
1- 18).
I just want to know whether this is a well-know and reported problem
before I file a bug report.
If a paranoid user sets his or her umask to 077, man pages formatted by
xman will end up with permission rw-------. At least on SunOS4.1
systems this is in contrast to man(1) which always leaves formatted man pages
with perms rw-rw-rw-. Otherwise other users won't be able to view that
man page later on (and it won't be reformatted either since it's already
there).
The fix is simple enough: add a chmod() call to handler.c:
*** ./handler.c.dist Tue Oct 3 12:57:56 1989
--- ./handler.c Fri Nov 2 10:59:09 1990
***************
*** 325,330 ****
--- 325,337 ----
cmdbuf);
PrintWarning( man_globals, error_buf);
}
+
+ /* make sure the formatted man page is fully accessible by the world */
+ if (chmod(man_globals->save_file, 0666) != 0) {
+ sprintf(error_buf, "Couldn't set permissions on formatted man page '%s'.\n",
+ man_globals->save_file);
+ PrintWarning( man_globals, error_buf);
+ }
break;
case 'C':
case 'c':
--
Andreas Stolcke
International Computer Science Institute stolcke@icsi.Berkeley.EDU
1957 Center St., Suite 600, Berkeley, CA 94704 (415) 642-4274 ext. 126