diff options
author | Zach van Rijn <me@zv.io> | 2023-11-29 22:31:21 -0600 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2023-11-29 22:31:21 -0600 |
commit | a187790a8827a4c2ef05a7b8e955bf26c827a55b (patch) | |
tree | 601cd450b4887f3e3e425c97d235b4c5e9a5d8ba /src | |
parent | f233ecb4897b14ad868152c76bcd9b3f566c0a22 (diff) | |
download | apk-tools-a187790a8827a4c2ef05a7b8e955bf26c827a55b.tar.gz apk-tools-a187790a8827a4c2ef05a7b8e955bf26c827a55b.tar.bz2 apk-tools-a187790a8827a4c2ef05a7b8e955bf26c827a55b.tar.xz apk-tools-a187790a8827a4c2ef05a7b8e955bf26c827a55b.zip |
database: run triggers with r*id = e*idzv/test
Diffstat (limited to 'src')
-rw-r--r-- | src/database.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c index 9939573..dc43d92 100644 --- a/src/database.c +++ b/src/database.c @@ -1949,6 +1949,16 @@ int apk_db_run_script(struct apk_database *db, char *fn, char **argv) exit(127); } + status = setgid(getegid()); + if (status != 0) { + apk_warning("%s: setgid: %s", basename(fn), strerror(errno)); + } + + status = setuid(geteuid()); + if (status != 0) { + apk_warning("%s: setuid: %s", basename(fn), strerror(errno)); + } + execve(fn, argv, environment); exit(127); /* should not get here */ } |