Lines Matching refs:cmdbuf
314 static int rsynccmd(const char * src, const char *dst, char **cmdbuf) in rsynccmd() argument
363 *cmdbuf=newbuf; in rsynccmd()
366 *cmdbuf=NULL; in rsynccmd()
384 char *cmdbuf = NULL; in cleanup_tmpdir() local
389 …if (asprintf(&cmdbuf, "/usr/bin/rsync --exclude=.X11-unix -utrlHDq --delete '%s/' '%s/'", tmpdir, … in cleanup_tmpdir()
391 cmdbuf = NULL; in cleanup_tmpdir()
394 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) { in cleanup_tmpdir()
398 free(cmdbuf); cmdbuf = NULL; in cleanup_tmpdir()
402 if (asprintf(&cmdbuf, "/bin/rm -r '%s/' 2>/dev/null", tmpdir) == -1) { in cleanup_tmpdir()
404 cmdbuf = NULL; in cleanup_tmpdir()
408 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) rc++; in cleanup_tmpdir()
409 free(cmdbuf); cmdbuf = NULL; in cleanup_tmpdir()
437 char *cmdbuf = NULL; in create_tmpdir() local
524 if (rsynccmd(src, tmpdir, &cmdbuf) < 0) { in create_tmpdir()
532 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) { in create_tmpdir()
542 free(cmdbuf); cmdbuf = NULL; in create_tmpdir()