| 10 |
|
|
| 11 |
|
#include <stdio.h> |
| 12 |
|
#include <sys/types.h> |
| 13 |
+ |
#include <sys/param.h> |
| 14 |
|
#include <signal.h> |
| 15 |
|
#include <fcntl.h> |
| 16 |
|
#include "netproc.h" |
| 38 |
|
static PROC *pindex[FD_SETSIZE]; /* process index table */ |
| 39 |
|
|
| 40 |
|
static char ourhost[64]; /* this host name */ |
| 41 |
< |
static char ourdir[128]; /* our working directory */ |
| 41 |
> |
static char ourdir[MAXPATHLEN]; /* our working directory */ |
| 42 |
|
static char ouruser[32]; /* our user name */ |
| 43 |
|
static char *ourshell; /* our user's shell */ |
| 44 |
|
|
| 64 |
|
if (ps == NULL) |
| 65 |
|
return(NULL); |
| 66 |
|
if (!ourhost[0]) { /* initialize */ |
| 67 |
< |
char dirtmp[128]; |
| 67 |
> |
char dirtmp[MAXPATHLEN]; |
| 68 |
|
register char *cp; |
| 69 |
|
register int len; |
| 70 |
|
|
| 71 |
|
strcpy(ourhost, myhostname()); |
| 72 |
< |
getcwd(dirtmp, sizeof(dirtmp)); |
| 72 |
> |
getwd(dirtmp); |
| 73 |
|
if ((cp = getenv("HOME")) != NULL) { |
| 74 |
|
if (!strcmp(cp, dirtmp)) |
| 75 |
|
ourdir[0] = '\0'; |
| 170 |
|
char *command; |
| 171 |
|
int (*compf)(); |
| 172 |
|
{ |
| 173 |
< |
char udirt[128]; |
| 173 |
> |
char udirt[MAXPATHLEN]; |
| 174 |
|
char *av[16]; |
| 175 |
|
int pfd[2], pid; |
| 176 |
|
register int i; |