diff --git a/tsk/base/mymalloc.c b/tsk/base/mymalloc.c index 8c6b910d93a3f1258e8dc408eaccca75e4e5c3ce..efbf0aadcbd466518729625a4df7589e81d4c7eb 100644 --- a/tsk/base/mymalloc.c +++ b/tsk/base/mymalloc.c @@ -11,7 +11,7 @@ * when an error occurs. */ -/* The IBM Public Licence must be distributed with this software. +/* The IBM Public License must be distributed with this software. * AUTHOR(S) * Wietse Venema * IBM T.J. Watson Research diff --git a/tsk/fs/decmpfs.c b/tsk/fs/decmpfs.c index 7e522172ef21c3230ca4d4d46258a33c67025cf5..ff59281bf8a679aca2f4cc55cb9a8d792ecbdf36 100644 --- a/tsk/fs/decmpfs.c +++ b/tsk/fs/decmpfs.c @@ -1,3 +1,10 @@ +/* This file contains decompression routines used by APFS and HFS + * It has one method derived from public domain ZLIB and others + * that are TSK-specific. + * + * It would probably be cleaner to separate these into two files. + */ + #include "../libtsk.h" #include "tsk_fs_i.h" #include "decmpfs.h" @@ -13,7 +20,13 @@ /***************** ZLIB stuff *******************************/ -// Adapted from zpipe.c (part of zlib) at http://zlib.net/zpipe.c +/* The zlib_inflate method is adapted from the public domain + * zpipe.c (part of zlib) at http://zlib.net/zpipe.c + * + * zpipe.c: example of proper use of zlib's inflate() and deflate() + * Not copyrighted -- provided to the public domain + * Version 1.4 11 December 2005 Mark Adler */ + #define CHUNK 16384 /* @@ -140,6 +153,20 @@ zlib_inflate(char *source, uint64_t sourceLen, char *dest, uint64_t destLen, uin #endif + + +/********************* TSK STUFF **********************/ + +/* + * The Sleuth Kit + * + * Brian Carrier [carrier <at> sleuthkit [dot] org] + * Copyright (c) 2019-2020 Brian Carrier. All Rights reserved + * Copyright (c) 2018-2019 BlackBag Technologies. All Rights reserved + * + * This software is distributed under the Common Public License 1.0 + */ + typedef struct { uint32_t offset; uint32_t length; diff --git a/tsk/fs/decmpfs.h b/tsk/fs/decmpfs.h index 4ab40fd181472afbe135776ced488926dfd409c5..2bcfce8e1110c797979098c82047f984db6da600 100644 --- a/tsk/fs/decmpfs.h +++ b/tsk/fs/decmpfs.h @@ -1,3 +1,12 @@ +/* + * The Sleuth Kit + * + * Brian Carrier [carrier <at> sleuthkit [dot] org] + * Copyright (c) 2018-2019 BlackBag Technologies. All Rights reserved + * + * This software is distributed under the Common Public License 1.0 + */ + #pragma once #include <stdint.h> @@ -8,6 +17,11 @@ extern "C" { #endif +/** + * Contains the structures and function APIs dealing with compressed files + * in APFS and HFS+ file systems. + */ + /* * If a file is compressed, then it will have an extended attribute * with name com.apple.decmpfs. The value of that attribute is a data diff --git a/tsk/fs/lzvn.c b/tsk/fs/lzvn.c index f03afefa268346d4b02611191fe79a2d2d9d40c7..b264d0f4fd502030c3f419f89b2ca659b9c965d6 100644 --- a/tsk/fs/lzvn.c +++ b/tsk/fs/lzvn.c @@ -17,6 +17,9 @@ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +NOTE: This is distributed in licenses/bsd.txt + */ // LZVN low-level decoder diff --git a/tsk/util/crypto.cpp b/tsk/util/crypto.cpp index 263dc63708819db6eb65265c23a21b4015bcac01..870fe83e2132c36604b7f3400ce8beb59c7af19d 100644 --- a/tsk/util/crypto.cpp +++ b/tsk/util/crypto.cpp @@ -1,3 +1,16 @@ +/* + * The Sleuth Kit + * + * Brian Carrier [carrier <at> sleuthkit [dot] org] + * Copyright (c) 2018-2019 BlackBag Technologies. All Rights reserved + * + * This software is distributed under the Common Public License 1.0 + */ + +/* This file contains routines used by APFS code. + * It could probably move into the 'fs' folder. + * It is XTS wrappers around OpenSSL + */ #include "crypto.hpp" #ifdef HAVE_LIBOPENSSL @@ -195,4 +208,4 @@ std::unique_ptr<uint8_t[]> hash_buffer_sha256(const void *input, return hash; } -#endif \ No newline at end of file +#endif diff --git a/tsk/util/crypto.hpp b/tsk/util/crypto.hpp index 490a7924f77579700481da906f3cdcdcaaafa392..9ff99881fd67a173ae068677c7525e98a125c453 100644 --- a/tsk/util/crypto.hpp +++ b/tsk/util/crypto.hpp @@ -1,5 +1,18 @@ #pragma once +/* + * The Sleuth Kit + * + * Brian Carrier [carrier <at> sleuthkit [dot] org] + * Copyright (c) 2018-2019 BlackBag Technologies. All Rights reserved + * + * This software is distributed under the Common Public License 1.0 + */ + +/** + * This is currently being used only by APFS + */ + #include "../base/tsk_base.h" #ifdef HAVE_LIBOPENSSL @@ -48,4 +61,4 @@ std::unique_ptr<uint8_t[]> hash_buffer_md5(const void *input, std::unique_ptr<uint8_t[]> hash_buffer_sha256(const void *input, size_t len) noexcept; -#endif \ No newline at end of file +#endif