pass3b.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980, 1986, 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. Neither the name of the University nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fsck.h"
int pass3bcheck(struct inodesc *);
int aclblksort();
void dodump(char *, int);
void listshadows(void);
pass3b()
{
int64_t maxaclsize = 0;
struct shadowclientinfo *sci;
struct shadowclients *scc;
int i;
/*
* Sort the acl list into disk block order.
*/
/*
* Scan all the acl inodes, finding the largest acl file.
*/
/* ACL file will not be >=2GB */
}
return (1);
}
/*
* Scan all the acl inodes, checking contents
*/
aclbufoff = 0;
continue;
}
if (preen)
printf("\n");
}
}
}
/*
* Now scan all shadow inodes, checking that any inodes that previously
* had an acl still have an acl.
*/
if (preen)
printf("\n");
/*
* Decrement link count -
* pass1 made sure the shadow
* inode # is a valid inode
* number.
*/
inodirty();
}
}
}
}
}
/* listshadows(); */
}
/*
* Collect all the (data) blocks of an acl file into a buffer.
* Later we'll scan the buffer and validate the acl data.
*/
int
{
return (STOP);
}
return (KEEPON);
}
/*
* Routine to sort disk blocks.
*/
{
}
int
{
int numacls;
int i;
int nuser_objs = 0;
int ngroup_objs = 0;
int nother_objs = 0;
int nclass_objs = 0;
int ndef_user_objs = 0;
int ndef_group_objs = 0;
int ndef_other_objs = 0;
int ndef_class_objs = 0;
int nusers = 0;
int ngroups = 0;
int ndef_users = 0;
int ndef_groups = 0;
int numdefs = 0;
case FSD_ACL:
case FSD_DFACL:
sizeof (ufs_acl_t);
case USER_OBJ: /* Owner */
nuser_objs++;
break;
case GROUP_OBJ: /* Group */
ngroup_objs++;
break;
case OTHER_OBJ: /* Other */
nother_objs++;
break;
case CLASS_OBJ: /* Mask */
nclass_objs++;
break;
case DEF_USER_OBJ: /* Default Owner */
break;
case DEF_GROUP_OBJ: /* Default Group */
break;
case DEF_OTHER_OBJ: /* Default Other */
break;
case DEF_CLASS_OBJ: /* Default Mask */
break;
case USER: /* Users */
nusers++;
break;
case GROUP: /* Groups */
ngroups++;
break;
case DEF_USER: /* Default Users */
ndef_users++;
break;
case DEF_GROUP: /* Default Groups */
ndef_groups++;
break;
default:
return (1);
}
/*
* if ((ufsaclp->acl_perm & ~07) != 0) {
* return (1);
* }
*/
numacls--;
}
break;
default:
break;
}
}
return (1);
}
/* If we didn't find any acls, ignore the unknown attribute */
return (0);
/* Check relationships amoung acls */
return (1);
}
if (ngroups && !nclass_objs) {
return (1);
}
return (1);
}
/* Check relationships amoung default acls */
return (1);
}
if (ndef_groups && !ndef_class_objs) {
return (1);
}
if ((ndef_users || ndef_groups) &&
return (1);
}
return (0);
}