git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a962e38
)
Fix taint-checking on Solaris
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 22 Sep 2019 09:56:31 +0000
(10:56 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 22 Sep 2019 09:56:31 +0000
(10:56 +0100)
src/src/dbfn.c
patch
|
blob
|
history
diff --git
a/src/src/dbfn.c
b/src/src/dbfn.c
index 63a1aefe353818ea385feee3b6700828fc5e05e5..1f058ef7236621305af047b42c8e9def9d900799 100644
(file)
--- a/
src/src/dbfn.c
+++ b/
src/src/dbfn.c
@@
-206,7
+206,8
@@
if (created && geteuid() == root_uid)
if (Ustrncmp(ent->d_name, name, namelen) == 0)
{
struct stat statbuf;
- Ustrcpy(lastname, US ent->d_name);
+ /* Filenames from readdir() are trusted, so use a taint-nonchecking copy */
+ strcpy(CS lastname, CCS ent->d_name);
if (Ustat(filename, &statbuf) >= 0 && statbuf.st_uid != exim_uid)
{
DEBUG(D_hints_lookup) debug_printf_indent("ensuring %s is owned by exim\n", filename);