#filegid()
DESCRIPTION
returns the group id (gid) of a file's group owner
SYNOPSIS
#fileguid(s)
ARGUMENTS
s - a quoted string, or string expression, representing a filepath
EXAMPLES
# pikt +C 'output $text(#filegid("/etc/passwd"))'
0
rule
set #fg = #filegid($inlin)
rule
if #fg != %fg
output mail "for $inlin, gid has changed"
fi
rule // check devfile ownerships and permissions
set $devfile = =devfile($mount)
# ifdef debug
output $devfile
# endifdef
if #fileuid($devfile) != 0 // root
output "$mount devfile $devfile not root-owned"
fi
if #filegid($devfile) != =sysgid
output "$mount devfile $devfile not sys-owned"
fi
if $filemode($devfile) ne "060640"
output "$mount devfile $devfile perms not 060640,
are $filemode($devfile)"
fi
rule // check rawdevfile ownerships and permissions
set $rawdevfile = =rawdevfile($mount)
# ifdef debug
output $rawdevfile
# endifdef
if #fileuid($rawdevfile) != 0 // root
output "$mount rawdevfile $rawdevfile not root-owned"
fi
if #filegid($rawdevfile) != =sysgid
output "$mount rawdevfile $rawdevfile not sys-owned"
fi
if $filemode($rawdevfile) ne "020640"
output "$mount rawdevfile $rawdevfile perms not 020640,
are $filemode($rawdevfile)"
fi
SEE ALSO
#fileino()
#filelinks()
#fileuid()
#fileatime()
#filectime()
#filemtime()
#filesize()
Numerical Functions
String Functions