Now opens devices and shared memory read/write for v4l2 compatibility.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@569 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan
2003-06-12 14:29:27 +00:00
parent 04ce08ef7e
commit c2fa12ccdd
2 changed files with 7 additions and 7 deletions

View File

@@ -52,21 +52,21 @@ bool fixDevice( int device )
if ( uid == stat_buf.st_uid )
{
// If we are the owner
mask = 00400;
mask = 00600;
}
else if ( gid == stat_buf.st_gid )
{
// If we are in the owner group
mask = 00040;
mask = 00060;
}
else
{
// We are neither the owner nor in the group
mask = 00004;
mask = 00006;
}
mode_t mode = stat_buf.st_mode;
if ( mode & mask )
if ( (mode & mask) == mask )
{
Info(( "Permissions on %s are ok at %o", device_path, mode ));
return( true );