diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-19 08:19:51 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-19 08:19:51 +0200 |
| commit | 74a4fed6f40dc0a1ff03d6947969084537e3af9c (patch) | |
| tree | ff5a27bbf626b3f5d16280c049a10860090aae56 | |
| parent | 1071d8be6bcd707da1207ca9f25b80d54f45016a (diff) | |
fix: guard replay chown user lookups (task 472)
| -rw-r--r-- | ioriot/src/replay/rioop.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ioriot/src/replay/rioop.c b/ioriot/src/replay/rioop.c index 0ce19c5..b5c360e 100644 --- a/ioriot/src/replay/rioop.c +++ b/ioriot/src/replay/rioop.c @@ -402,6 +402,8 @@ void rioop_chown(rprocess_s *p, rthread_s *t, rtask_s *task) rworker_s *w = t->worker; options_s *opts = w->opts; struct passwd *pwd = getpwnam(opts->user); + if (pwd == NULL) + return; chown(path, pwd->pw_uid, -1); } @@ -412,6 +414,8 @@ void rioop_fchown(rprocess_s *p, rthread_s *t, rtask_s *task) rworker_s *w = t->worker; options_s *opts = w->opts; struct passwd *pwd = getpwnam(opts->user); + if (pwd == NULL) + return; fchown(vfd->fd, pwd->pw_uid, -1); } @@ -421,6 +425,7 @@ void rioop_lchown(rprocess_s *p, rthread_s *t, rtask_s *task) rworker_s *w = t->worker; options_s *opts = w->opts; struct passwd *pwd = getpwnam(opts->user); + if (pwd == NULL) + return; lchown(path, pwd->pw_uid, -1); } - |
