search for: tsk_fs_isdot

Displaying 20 results from an estimated 29 matches for "tsk_fs_isdot".

2016 Aug 26
2
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...moved, put it at the right place already in this patch. > int > @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) > CLEANUP_FREE char *fname = NULL; > struct guestfs_int_tsk_dirent dirent; > > - /* Ignore ./ and ../ */ > - ret = TSK_FS_ISDOT (fsfile->name->name); > - if (ret != 0) > + if (entry_is_dot(fsfile)) > return TSK_WALK_CONT; Nitpick: add a space between the function name and the opening round bracket. > /* Build the full relative path of the entry */ > @@ -271,6 +270,18 @@ reply_with_tsk_error...
2016 Aug 26
1
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...gt; int > >> @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) > >> CLEANUP_FREE char *fname = NULL; > >> struct guestfs_int_tsk_dirent dirent; > >> > >> - /* Ignore ./ and ../ */ > >> - ret = TSK_FS_ISDOT (fsfile->name->name); > >> - if (ret != 0) > >> + if (entry_is_dot(fsfile)) > >> return TSK_WALK_CONT; > > Nitpick: add a space between the function name and the opening round > > bracket. > > > >> /* Build the full relative pa...
2016 Aug 26
0
Re: [PATCH v2 1/6] filesystem_walk: fixed root inode listing
...eady in this patch. > >> int >> @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) >> CLEANUP_FREE char *fname = NULL; >> struct guestfs_int_tsk_dirent dirent; >> >> - /* Ignore ./ and ../ */ >> - ret = TSK_FS_ISDOT (fsfile->name->name); >> - if (ret != 0) >> + if (entry_is_dot(fsfile)) >> return TSK_WALK_CONT; > Nitpick: add a space between the function name and the opening round > bracket. > >> /* Build the full relative path of the entry */ >> @@ -271...
2016 Aug 24
1
[PATCH] filesystem_walk: fixed root inode listing
...ns(+), 3 deletions(-) diff --git a/daemon/tsk.c b/daemon/tsk.c index dd368d7..4a0517b 100644 --- a/daemon/tsk.c +++ b/daemon/tsk.c @@ -114,9 +114,12 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) struct guestfs_int_tsk_dirent dirent; /* Ignore ./ and ../ */ - ret = TSK_FS_ISDOT (fsfile->name->name); - if (ret != 0) - return TSK_WALK_CONT; + if (TSK_FS_ISDOT (fsfile->name->name)) { + /* Root is represented as . */ + if (fsfile->fs_info->root_inum != fsfile->name->meta_addr || + strcmp (fsfile->name->name, ".")) +...
2016 Aug 25
10
[PATCH v2 0/6] New API: find_inode
v2: - refactor logic to reduce code duplication - better functions naming Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 156 ++++++++++++++++++++++++++++++------------- generator/actions.ml
2016 Aug 25
0
[PATCH v2 1/6] filesystem_walk: fixed root inode listing
...static int entry_is_dot(TSK_FS_FILE *); static void reply_with_tsk_error (const char *); int @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) CLEANUP_FREE char *fname = NULL; struct guestfs_int_tsk_dirent dirent; - /* Ignore ./ and ../ */ - ret = TSK_FS_ISDOT (fsfile->name->name); - if (ret != 0) + if (entry_is_dot(fsfile)) return TSK_WALK_CONT; /* Build the full relative path of the entry */ @@ -271,6 +270,18 @@ reply_with_tsk_error (const char *funcname) reply_with_error ("%s: unknown error", funcname); } +/* Check...
2016 Sep 15
0
[PATCH v5 1/6] filesystem_walk: fixed root inode listing
...entry_is_dot(TSK_FS_FILE *); int do_internal_filesystem_walk (const mountable_t *mountable) @@ -113,9 +114,7 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) CLEANUP_FREE char *fname = NULL; struct guestfs_int_tsk_dirent dirent; - /* Ignore ./ and ../ */ - ret = TSK_FS_ISDOT (fsfile->name->name); - if (ret != 0) + if (entry_is_dot (fsfile)) return TSK_WALK_CONT; /* Build the full relative path of the entry */ @@ -271,6 +270,23 @@ reply_with_tsk_error (const char *funcname) reply_with_error ("%s: unknown error", funcname); } +/* Check...
2016 Sep 15
9
[PATCH v5 0/6] New API - find_inode
v5: - small doc fix: filesystem_walk claimed '.' and '..' entries were not reported but Root is now reported as '.' - bump to 1.35.6 Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c
2016 Apr 04
2
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...callback (TSK_FS_FILE *fsfile, const char *path, void *data) > > > +{ > > > + int ret = 0; > > > + CLEANUP_FREE char *fname = NULL; > > > + struct guestfs_int_tsk_dirent dirent; > > > + > > > + /* Ignore ./ and ../ */ > > > + ret = TSK_FS_ISDOT (fsfile->name->name); > > > + if (ret != 0) > > > + return TSK_WALK_CONT; > > > + > > > + /* Build the full relative path of the entry */ > > > + ret = asprintf_nowarn (&fname, "%Q%Q", path, fsfile->name->name); > >...
2016 Aug 26
6
[PATCH v4 0/6] New API: find_inode
...callback will be called for the following entries: . <-- the Root entry etc/. etc/.. <-- again the Root entry etc/systemd/. etc/systemd/.. bin/. bin/.. <-- again the Root entry We want to return the Root entry only once. Therefore, once we know that the entry under analysis is a dot if (TSK_FS_ISDOT (fsfile->name->name)) We check whether the inode is root if (fsfile->fs_info->root_inum == fsfile->name->meta_addr) But we want to make sure is the first root entry and not the parent directory of other directories. if (STREQ(fsfile->name->name, ".") I opened...
2016 Apr 04
2
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...ERROR on error. > + */ > +static TSK_WALK_RET_ENUM > +fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) > +{ > + int ret = 0; > + CLEANUP_FREE char *fname = NULL; > + struct guestfs_int_tsk_dirent dirent; > + > + /* Ignore ./ and ../ */ > + ret = TSK_FS_ISDOT (fsfile->name->name); > + if (ret != 0) > + return TSK_WALK_CONT; > + > + /* Build the full relative path of the entry */ > + ret = asprintf_nowarn (&fname, "%Q%Q", path, fsfile->name->name); Why the quoting? We don't quote results in similar API...
2016 Aug 24
0
[PATCH 1/3] New API: internal_find_inode
...TSK_FS_FILE *fsfile, const char *path, void *data) +{ + int ret = 0; + CLEANUP_FREE char *fname = NULL; + uint64_t *inode = (uint64_t *) data; + struct guestfs_int_tsk_dirent dirent; + + if (*inode != fsfile->name->meta_addr) + return TSK_WALK_CONT; + + /* Ignore ./ and ../ */ + if (TSK_FS_ISDOT (fsfile->name->name)) { + /* Root is represented as . */ + if (fsfile->fs_info->root_inum != fsfile->name->meta_addr || + strcmp (fsfile->name->name, ".")) + return TSK_WALK_CONT; + } + + /* Build the full relative path of the entry */ + ret =...
2016 Aug 26
6
[PATCH v3 0/6] New API: find_inode
v3: - coding style fixes - comment entry_is_dot logic Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 157 ++++++++++++++++++++++++++++++------------- generator/actions.ml | 21 ++++++
2016 Sep 16
7
[PATCH v6 0/6] New API - find_inode
This series should be ready for merge v6: - rebase on master - changes according to last comments Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 155 ++++++++++++++++++++++++++++++-------------
2016 Mar 29
0
[PATCH 1/2] added filesystem_walk0 API
...R structure and send it to the appliance. + * Return 0 on success, -1 on error. + */ +static TSK_WALK_RET_ENUM +fswalk_callback(TSK_FS_FILE *fsfile, const char *path, void *data) +{ + CLEANUP_FREE char *file_name = NULL; + struct guestfs_int_tsk_node node_info; + + /* Ignore ./ and ../ */ + if (TSK_FS_ISDOT(fsfile->name->name)) + return 0; + + if ((file_name = join_path(path, fsfile->name->name)) == NULL) + return -1; + + node_info.tsk_name = file_name; + node_info.tsk_inode = fsfile->name->meta_addr; + if (fsfile->name->flags & TSK_FS_NAME_FLAG_UNALLOC) + node...
2016 Mar 29
5
[PATCH 0/2] added filesystem_walk0 low level API
The filesystem_walk0 API parses the FS internals of a partition and returns a list of all the files and directories contained within. It list deleted files and directories as well. For each node, it reports its relative path, its inode and its allocation status. The output is serialised in XDR format and written to the given file. The command is similar to The Sleuth Kit "fls -rp
2016 Apr 05
0
[PATCH v3 3/5] daemon: Added internal_filesystem_walk command
...ce. + * Return TSK_WALK_CONT on success, TSK_WALK_ERROR on error. + */ +static TSK_WALK_RET_ENUM +fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + int ret = 0; + CLEANUP_FREE char *fname = NULL; + struct guestfs_int_tsk_dirent dirent; + + /* Ignore ./ and ../ */ + ret = TSK_FS_ISDOT (fsfile->name->name); + if (ret != 0) + return TSK_WALK_CONT; + + /* Build the full relative path of the entry */ + ret = asprintf_nowarn (&fname, "%s%s", path, fsfile->name->name); + if (ret < 0) { + fprintf (stderr, "asprintf: %m"); + return TSK...
2016 Apr 03
0
[PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...ce. + * Return TSK_WALK_CONT on success, TSK_WALK_ERROR on error. + */ +static TSK_WALK_RET_ENUM +fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + int ret = 0; + CLEANUP_FREE char *fname = NULL; + struct guestfs_int_tsk_dirent dirent; + + /* Ignore ./ and ../ */ + ret = TSK_FS_ISDOT (fsfile->name->name); + if (ret != 0) + return TSK_WALK_CONT; + + /* Build the full relative path of the entry */ + ret = asprintf_nowarn (&fname, "%Q%Q", path, fsfile->name->name); + if (ret < 0) { + fprintf (stderr, "asprintf: %m"); + return TSK...
2016 Jun 13
0
[PATCH v8 1/3] New API: internal_filesystem_walk
...ce. + * Return TSK_WALK_CONT on success, TSK_WALK_ERROR on error. + */ +static TSK_WALK_RET_ENUM +fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) +{ + int ret = 0; + CLEANUP_FREE char *fname = NULL; + struct guestfs_int_tsk_dirent dirent; + + /* Ignore ./ and ../ */ + ret = TSK_FS_ISDOT (fsfile->name->name); + if (ret != 0) + return TSK_WALK_CONT; + + /* Build the full relative path of the entry */ + ret = asprintf (&fname, "%s%s", path, fsfile->name->name); + if (ret < 0) { + perror ("asprintf"); + return TSK_WALK_ERROR; + } +...
2016 Apr 04
0
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...SK_WALK_RET_ENUM > > +fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) > > +{ > > + int ret = 0; > > + CLEANUP_FREE char *fname = NULL; > > + struct guestfs_int_tsk_dirent dirent; > > + > > + /* Ignore ./ and ../ */ > > + ret = TSK_FS_ISDOT (fsfile->name->name); > > + if (ret != 0) > > + return TSK_WALK_CONT; > > + > > + /* Build the full relative path of the entry */ > > + ret = asprintf_nowarn (&fname, "%Q%Q", path, fsfile->name->name); > > Why the quoting? We don&...