acme: use global user string variable instead of getuser()

This commit is contained in:
cinap_lenrek 2020-12-19 15:50:30 +01:00
parent c7fc69bd6a
commit ba20914d01
4 changed files with 4 additions and 3 deletions

View file

@ -329,7 +329,7 @@ acmeerrorinit(void)
if(pipe(pfd) < 0)
error("can't create pipe");
sprint(acmeerrorfile, "/srv/acme.%s.%d", getuser(), mainpid);
sprint(acmeerrorfile, "/srv/acme.%s.%d", user, mainpid);
fd = create(acmeerrorfile, OWRITE, 0666);
if(fd < 0){
remove(acmeerrorfile);

View file

@ -538,6 +538,7 @@ Column *activecol;
Buffer snarfbuf;
Rectangle nullrect;
int fsyspid;
char *user;
char *cputype;
char *objtype;
char *home;

View file

@ -19,7 +19,7 @@ tempfile(void)
char buf[128];
int i, fd;
snprint(buf, sizeof buf, "/tmp/X%d.%.4sacme", getpid(), getuser());
snprint(buf, sizeof buf, "/tmp/X%d.%.4sacme", getpid(), user);
for(i='A'; i<='Z'; i++){
buf[5] = i;
if(access(buf, AEXIST) == 0)

View file

@ -667,7 +667,7 @@ rowload(Row *row, char *file, int initing)
textinsert(&w->tag, w->tag.file->nc, r+n+1, nr-(n+1), TRUE);
if(ndumped >= 0){
/* simplest thing is to put it in a file and load that */
sprint(buf, "/tmp/d%d.%.4sacme", getpid(), getuser());
sprint(buf, "/tmp/d%d.%.4sacme", getpid(), user);
fd = create(buf, OWRITE|ORCLOSE, 0600);
if(fd < 0){
free(r);