[7755] in Athena Bugs
attach
daemon@ATHENA.MIT.EDU (John Carr)
Sat Jul 20 10:29:09 1991
To: bugs@ATHENA.MIT.EDU
Date: Sat, 20 Jul 91 10:29:16 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>
2 bugs with attach:
1. It won't compile unless AFS is defined
2. It checks to see if it is being run as root too early
(it should be possible to run it as "attach" with no arguments
if it is not setuid root).
*** /tmp/main.c Mon Jul 01 09:47:25 1991
--- main.c Sat Jul 20 10:13:34 1991
***************
*** 453,459 ****
read_config_file(ATTACHCONFFILE);
- check_root_privs(progname);
default_suid = (access(NOSUID_FILENAME, 0) == 0);
gotname = 0;
--- 453,458 ----
***************
*** 471,476 ****
--- 470,476 ----
if (argc == 1)
return (attach_print(0));
+ check_root_privs(progname);
for (i=1;i<argc;i++) {
if (*argv[i] == '-') {
*** /tmp/attach.c Mon Jul 01 09:47:11 1991
--- attach.c Sat Jul 20 10:10:09 1991
***************
*** 348,360 ****
--- 348,364 ----
*/
#ifdef ZEPHYR
if (use_zephyr && at.fs->flags & AT_FS_REMOTE) {
+ #ifdef AFS
if(at.fs->type == TYPE_AFS) {
afs_zinit(at.hesiodname, at.hostdir);
} else {
+ #endif
sprintf(instbfr, "%s:%s", at.host, at.hostdir);
zephyr_addsub(instbfr);
zephyr_addsub(at.host);
+ #ifdef AFS
}
+ #endif
}
#endif
free_attachtab();