Lines 140-151
Link Here
|
140 |
char client[MAXHOSTNAME], server[MAXHOSTNAME], *colon; |
140 |
char client[MAXHOSTNAME], server[MAXHOSTNAME], *colon; |
141 |
struct hostent *hostname; |
141 |
struct hostent *hostname; |
142 |
char *vc, *color; |
142 |
char *vc, *color; |
143 |
static char tmp_name[] = "/tmp/ctwmrcXXXXXX"; |
143 |
#define TMPLFILE "/tmp/ctwmrcXXXXXX" |
|
|
144 |
static char tmp_name[sizeof(TMPLFILE)]; |
144 |
int fd; |
145 |
int fd; |
145 |
FILE *tmpf; |
146 |
FILE *tmpf; |
146 |
char *user; |
147 |
char *user; |
147 |
|
148 |
|
148 |
/* Create temp file */ |
149 |
/* Create temp file */ |
|
|
150 |
strcpy(tmp_name, TMPLFILE); |
151 |
#undef TMPLFILE |
149 |
fd = mkstemp(tmp_name); |
152 |
fd = mkstemp(tmp_name); |
150 |
if(fd < 0) { |
153 |
if(fd < 0) { |
151 |
perror("mkstemp failed in m4_defs"); |
154 |
perror("mkstemp failed in m4_defs"); |