diff options
author | midipix <writeonce@midipix.org> | 2017-11-19 12:22:51 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-11-19 12:28:21 -0500 |
commit | 5cdc2a329d7f32814f1ed07857b1fa3f6bbe1dda (patch) | |
tree | f14f609ca6008bc26d405d09253a2fdbcf2cd1c8 /src/driver | |
parent | 5fdd8e0b49fbbb902963fa7b761d0cbccc487627 (diff) | |
download | mdso-5cdc2a329d7f32814f1ed07857b1fa3f6bbe1dda.tar.bz2 mdso-5cdc2a329d7f32814f1ed07857b1fa3f6bbe1dda.tar.xz |
driver: properly implement --libpath as an exclusive choice.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/mdso_driver_ctx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c index 9803391..ef08600 100644 --- a/src/driver/mdso_driver_ctx.c +++ b/src/driver/mdso_driver_ctx.c @@ -20,6 +20,10 @@ #include "mdso_driver_impl.h" #include "argv/argv.h" +#define MDSO_LOADER_FLAGS_MASK (MDSO_FLAG_LOADER_PATH \ + | MDSO_FLAG_PEB_PATH \ + | MDSO_FLAG_SYSTEM32) + /* package info */ static const struct mdso_source_version mdso_src_version = { MDSO_TAG_VER_MAJOR, @@ -226,6 +230,8 @@ int mdso_get_driver_ctx( break; case TAG_LIBPATH: + cctx.dsoflags &= ~(uint64_t)MDSO_LOADER_FLAGS_MASK; + if (!(strcmp(entry->arg,"loader"))) cctx.dsoflags |= MDSO_FLAG_LOADER_PATH; if (!(strcmp(entry->arg,"peb"))) |