X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Finode.h;h=3fbb4039d658af19289762946dd16cd127f7bf60;hp=08f414d0d7ca6857b90dbffa0396fabfd59784a0;hb=7b587995ba7f2fb4e3a8d23f4be0ad91f1ab066a;hpb=6027146334e72aa77c71ed62357e159375afb677 diff --git a/include/wimlib/inode.h b/include/wimlib/inode.h index 08f414d0..3fbb4039 100644 --- a/include/wimlib/inode.h +++ b/include/wimlib/inode.h @@ -157,10 +157,8 @@ struct wim_inode { /* Corresponds to 'security_id' in `struct wim_dentry_on_disk': The * index of this inode's security descriptor in the WIM image's table of - * security descriptors, or -1. Note: when a WIM image is loaded, - * wimlib sets out-of-bounds indices and values less than -1 in this - * field to -1. So the extraction code need not do an upper bound check - * after checking for -1 (or equivalently < 0). */ + * security descriptors, or -1 if this inode does not have a security + * descriptor. */ s32 i_security_id; /* Unknown field that we only read into memory so we can re-write it @@ -324,6 +322,13 @@ inode_has_children(const struct wim_inode *inode) return inode->i_children != NULL; } +/* Does the inode have a security descriptor? */ +static inline bool +inode_has_security_descriptor(const struct wim_inode *inode) +{ + return inode->i_security_id >= 0; +} + extern struct wim_inode_stream * inode_get_stream(const struct wim_inode *inode, int stream_type, const utf16lechar *stream_name);