X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fmount_image.c;h=7b3a91470d7c7c5c6b57df3412a4f49bf6dd9b52;hp=7c480ebc76c02c7af9808b87f151c5188a8506ae;hb=668c363a59c521f48eecbc4dd549c07a3e36179e;hpb=320e646b45b894a25c4239d5a71d3bd9c2ec793b diff --git a/src/mount_image.c b/src/mount_image.c index 7c480ebc..7b3a9147 100644 --- a/src/mount_image.c +++ b/src/mount_image.c @@ -2410,6 +2410,15 @@ wimlib_mount_image(WIMStruct *wim, int image, const char *dir, if (!wim || !dir) return WIMLIB_ERR_INVALID_PARAM; + if (mount_flags & ~(WIMLIB_MOUNT_FLAG_READWRITE | + WIMLIB_MOUNT_FLAG_DEBUG | + WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_NONE | + WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_XATTR | + WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_WINDOWS | + WIMLIB_MOUNT_FLAG_UNIX_DATA | + WIMLIB_MOUNT_FLAG_ALLOW_OTHER)) + return WIMLIB_ERR_INVALID_PARAM; + if (mount_flags & WIMLIB_MOUNT_FLAG_READWRITE) { ret = can_delete_from_wim(wim); if (ret) @@ -2570,6 +2579,13 @@ wimlib_unmount_image(const char *dir, int unmount_flags, int ret; struct wimfs_context wimfs_ctx; + if (unmount_flags & ~(WIMLIB_UNMOUNT_FLAG_CHECK_INTEGRITY | + WIMLIB_UNMOUNT_FLAG_COMMIT | + WIMLIB_UNMOUNT_FLAG_REBUILD | + WIMLIB_UNMOUNT_FLAG_RECOMPRESS | + WIMLIB_UNMOUNT_FLAG_LAZY)) + return WIMLIB_ERR_INVALID_PARAM; + init_wimfs_context(&wimfs_ctx); ret = set_message_queue_names(&wimfs_ctx, dir);