[net.bugs.4bsd] Bizzar Modem Problems

rynes@cwruecmp.UUCP (07/20/86)

  We have just installed 4.3BSD on our VAX 780.  (We were running
4.2BSD)  We have 3 dialin lines (d0-d2) connected to a DH port.
(ttyh0-ttyh2)  The problem is that when you login on one of the
dialin line while someone else is logged into another dialin line
you inherit the other persons environment.  I have dialed in without
any problem while one other person was logged in.  But I have received
many reports from people who have had this happen.  And I watched it
happen once while two other people (one user and one uucp) were logged
in.  When this happened, 1) `w' said the user was `user1' but mail
from them said `user2', 2) when they logged out and logged back in
their shell was `uucico'.  Any ideas?  I tried not using the `-p'
flag on login but that didn't help.

-- 

______________________________________________________________________________

Edward Rynes	Facilities Manager	|	    "The next time, I dedicate
Dept. of Computer Eng. and Science	| My life's work to the friends I make.
Case Western Reserve University		|   I give them what they want to hear.
Cleveland, Ohio   44106			| They think I'm up to something weird.
...!decvax!cwruecmp!rynes		| And up rears the head of fear in me."
rynes@case.csnet	(216) 368-6471	|			Kate Bush
______________________________________________________________________________

rynes@cwruecmp.UUCP (07/20/86)

  The following program fragment is supposed to remake directories
that have many unused entries in them. (uucp/news spool directories)
The first pass apears to run fine.  But in the second pass all of the
`stat's fail (bad address).  Something in the first pass appears to
be screwing up the directory.  Am I missing something?



	<path is the original directory>
	<ptmp is a newly created temp directory>
	<dp = opendir(path)>

	/* First pass  --  copy all non-empty files */

	for(dent=readdir(dp); dent; dent=readdir(dp)){
		if(!strcmp(dent->d_name, ".") || ! strcmp(dent->d_name, ".."))
			continue;
		if(dent->d_ino != 0){
			sprintf(pent, "%s/%s", path, dent->d_name);
			sprintf(tpent, "%s/%s", ptmp, dent->d_name);
			link(pent, tpent);
			}
		}

	closedir(dp);

	unlink(path);

	if(rename(ptmp, path)){
		fprintf(stderr,"Can't rename directory!\n");
		exit(-1);
		}

	/* Second pass  --  trim sub directories */

	if((dp=opendir(path)) == NULL){
		fprintf(stderr, "Can't access `%s'!\n", path);
		exit(3);
		}

	for(dent=readdir(dp); dent; dent=readdir(dp)){
		if(!strcmp(dent->d_name, ".") || ! strcmp(dent->d_name, ".."))
			continue;
		sprintf(pent, "%s/%s", path, dent->d_name);

		if(stat(pent, buf))
			perror("trimdirs");

		if(buf && buf->st_mode & S_IFDIR)
			trimdir(path, dent->d_name);
		}

	closedir(dp);
-- 

______________________________________________________________________________

Edward Rynes	Facilities Manager	|	    "The next time, I dedicate
Dept. of Computer Eng. and Science	| My life's work to the friends I make.
Case Western Reserve University		|   I give them what they want to hear.
Cleveland, Ohio   44106			| They think I'm up to something weird.
...!decvax!cwruecmp!rynes		| And up rears the head of fear in me."
rynes@case.csnet	(216) 368-6471	|			Kate Bush
______________________________________________________________________________