Lines Matching defs:cf_ent
81 extern int cp_cfent(struct cfent *cf_ent, struct cfextra *el_ent);
97 static int merg(struct cfextra *el_ent, struct cfent *cf_ent);
99 struct cfent *cf_ent, int ctrl);
101 static int typechg(struct cfent *el_ent, struct cfent *cf_ent,
105 static void chgclass(struct cfent *cf_ent, struct pinfo *pinfo);
118 static struct cfent cf_ent; /* scratch area */
124 cf_ent.pinfo = (NULL);
136 if ((el_ent->cf_ent.ftype == 'i') ||
137 (el_ent->cf_ent.ftype == 'n')) {
146 if ((eptnum > 0) && (strncmp(el_ent->cf_ent.path,
147 extlist[eptnum-1]->cf_ent.path, PATH_MAX) == 0)) {
166 if (cl_dvfy(el_ent->cf_ent.pkg_class_idx) ==
180 if (cl_dvfy(el_ent->cf_ent.pkg_class_idx) ==
183 cl_nam(el_ent->cf_ent.pkg_class_idx));
188 cl_def_dverify(el_ent->cf_ent.pkg_class_idx);
196 if (is_setuid(&(el_ent->cf_ent))) {
199 if (is_setgid(&(el_ent->cf_ent))) {
209 el_ent->cf_ent.ainfo.mode &= ~(S_ISUID | S_ISGID);
213 n = srchcfile(&cf_ent, el_ent->cf_ent.path, server);
223 (cf_ent.path && *cf_ent.path) ?
224 cf_ent.path : "Unknown");
238 if (is_setuid(&cf_ent)) {
242 if (is_setgid(&cf_ent)) {
252 if ((cf_ent.ftype == 's') &&
253 (el_ent->cf_ent.ftype == 'd')) {
255 int plen = strlen(el_ent->cf_ent.path);
257 if (strncmp(el_ent->cf_ent.path,
258 extlist[i]->cf_ent.path,
266 if (do_like_ent(tmpvfp, el_ent, &cf_ent, assume_ok)) {
290 do_like_ent(VFP_T *vfpo, struct cfextra *el_ent, struct cfent *cf_ent, int ctrl)
309 pkginfo = cf_ent->pinfo;
319 cf_ent->pinfo = el_ent->cf_ent.pinfo;
322 pkgpinfo = eptstat(cf_ent, pkginst, DUP_ENTRY);
330 if (el_ent->cf_ent.ftype == RM_RDY) {
332 pkgpinfo = eptstat(cf_ent, pkginst, RM_RDY);
345 if (putcvfpfile(cf_ent, vfpo)) {
356 el_ent->cf_ent.pinfo =
359 el_ent->cf_ent.pinfo->next = NULL;
360 el_ent->cf_ent.pinfo->status = SERVED_FILE;
371 progerr(gettext(ERR_PINFO), cf_ent->path);
384 if ((nocnflct && el_ent->mstat.shared && el_ent->cf_ent.ftype != 'e')) {
395 if (cp_cfent(cf_ent, el_ent) == 0)
400 mrg_result = merg(el_ent, cf_ent);
412 * We'll pick one or the other later. For now, cf_ent
442 pkgpinfo = eptstat(&(el_ent->cf_ent), pkginst,
461 eptstat(&(el_ent->cf_ent), pkginst,
465 eptstat(&(el_ent->cf_ent), pkginst,
469 eptstat(&(el_ent->cf_ent), pkginst,
473 pkgpinfo = eptstat(&(el_ent->cf_ent),
486 output(vfpo, cf_ent, pkgpinfo);
489 output(vfpo, &(el_ent->cf_ent), pkgpinfo);
494 (void) strcpy(el_ent->cf_ent.pkg_class, pkgpinfo->aclass);
508 el_ent->cf_ent.pinfo = NULL;
528 if (el_ent->cf_ent.ftype == RM_RDY) {
561 if (el_ent->cf_ent.ainfo.mode == WILDCARD) {
562 if (el_ent->cf_ent.ftype == 'd') {
563 el_ent->cf_ent.ainfo.mode = DEFAULT_MODE;
565 el_ent->cf_ent.ainfo.mode = DEFAULT_MODE_FILE;
567 logerr(WRN_SET_DEF_MODE, el_ent->cf_ent.path,
568 (int)el_ent->cf_ent.ainfo.mode);
571 if (strcmp(el_ent->cf_ent.ainfo.owner, DB_UNDEFINED_ENTRY) == 0)
572 (void) strcpy(el_ent->cf_ent.ainfo.owner,
574 if (strcmp(el_ent->cf_ent.ainfo.group, DB_UNDEFINED_ENTRY) == 0)
575 (void) strcpy(el_ent->cf_ent.ainfo.group,
590 pinfo = eptstat(&(el_ent->cf_ent), pkginst, DUP_ENTRY);
592 el_ent->cf_ent.npkgs = 1;
599 el_ent->cf_ent.pinfo = pinfo;
618 output(vfpo, &(el_ent->cf_ent), pinfo);
622 el_ent->cf_ent.pinfo = NULL;
649 if ((el_ent->cf_ent.ftype == 'f') || (el_ent->cf_ent.ftype == 'e') ||
650 (el_ent->cf_ent.ftype == 'v')) {
651 if (cverify(0, &(el_ent->cf_ent.ftype), tp,
652 &(el_ent->cf_ent.cinfo), 1)) {
655 if (averify(0, &(el_ent->cf_ent.ftype), tp,
656 &(el_ent->cf_ent.ainfo)))
660 ((el_ent->cf_ent.ftype == 'd') ||
661 (el_ent->cf_ent.ftype == 'x') ||
662 (el_ent->cf_ent.ftype == 'c') ||
663 (el_ent->cf_ent.ftype == 'b') ||
664 (el_ent->cf_ent.ftype == 'p'))) {
665 n = averify(0, &(el_ent->cf_ent.ftype), tp,
666 &(el_ent->cf_ent.ainfo));
673 ((el_ent->cf_ent.ftype == 's') ||
674 (el_ent->cf_ent.ftype == 'l'))) {
675 n = averify(0, &(el_ent->cf_ent.ftype), tp,
676 &(el_ent->cf_ent.ainfo));
727 typechg(struct cfent *el_ent, struct cfent *cf_ent, struct mergstat *mstat)
732 if (cf_ent->ftype == el_ent->ftype)
739 if (cf_ent->ftype == BADFTYPE) {
740 cf_ent->ftype = el_ent->ftype;
753 if (el_ent->ftype == 'x' && cf_ent->ftype == 'd') {
770 if (strchr(types[i], cf_ent->ftype)) {
829 * This function takes el_ent (the entry from the pkgmap) and cf_ent (the
843 merg(struct cfextra *el_ent, struct cfent *cf_ent)
853 * NOTE: elent->cf_ent.pinfo (the list of associated packages) is NULL
857 el_ent->cf_ent.pinfo = cf_ent->pinfo;
859 if (dbst == INST_RDY && el_ent->cf_ent.ftype == '?') {
860 el_ent->cf_ent.ftype = cf_ent->ftype;
868 if (cf_ent->ftype != el_ent->cf_ent.ftype) {
869 n = typechg(&(el_ent->cf_ent), cf_ent, &(el_ent->mstat));
883 if (cp_cfent(cf_ent, el_ent) == 0)
905 if (strcmp(cf_ent->pkg_class, el_ent->cf_ent.pkg_class)) {
911 if (strcmp(cf_ent->pkg_class, "?")) {
913 el_ent->cf_ent.pkg_class);
914 (void) strcpy(el_ent->cf_ent.pkg_class,
915 cf_ent->pkg_class);
916 chgclass(&(el_ent->cf_ent), pkgpinfo);
924 if (((el_ent->cf_ent.ftype == 's') || (el_ent->cf_ent.ftype == 'l'))) {
927 if (cf_ent->ainfo.local && el_ent->cf_ent.ainfo.local) {
932 if (strcmp(cf_ent->ainfo.local,
933 el_ent->cf_ent.ainfo.local) != NULL) {
941 if (strcmp(el_ent->cf_ent.ainfo.local,
944 el_ent->cf_ent.ainfo.local,
945 cf_ent->ainfo.local,
954 } else if (el_ent->cf_ent.ftype == 'e') {
963 } else if (((el_ent->cf_ent.ftype == 'f') ||
964 (el_ent->cf_ent.ftype == 'v'))) {
968 * since cf_ent is guaranteed to have a valid entry here (bad
974 if (cf_ent->cinfo.size != el_ent->cf_ent.cinfo.size) {
977 } else if (cf_ent->cinfo.modtime !=
978 el_ent->cf_ent.cinfo.modtime) {
981 } else if (cf_ent->cinfo.cksum != el_ent->cf_ent.cinfo.cksum) {
985 } else if (((el_ent->cf_ent.ftype == 'c') ||
986 (el_ent->cf_ent.ftype == 'b'))) {
990 * the cf_ent value is inherited. Otherwise, the el_ent value
993 if (cf_ent->ainfo.major != el_ent->cf_ent.ainfo.major) {
995 if (el_ent->cf_ent.ainfo.major == BADMAJOR) {
996 el_ent->cf_ent.ainfo.major =
997 cf_ent->ainfo.major;
1002 if (cf_ent->ainfo.minor != el_ent->cf_ent.ainfo.minor) {
1004 if (el_ent->cf_ent.ainfo.minor == BADMINOR)
1005 el_ent->cf_ent.ainfo.minor =
1006 cf_ent->ainfo.minor;
1016 if (cf_ent->ainfo.mode != el_ent->cf_ent.ainfo.mode) {
1018 if (el_ent->cf_ent.ainfo.mode == BADMODE) {
1019 el_ent->cf_ent.ainfo.mode = cf_ent->ainfo.mode;
1020 } else if (el_ent->cf_ent.ainfo.mode == WILDCARD) {
1025 el_ent->cf_ent.ainfo.mode = cf_ent->ainfo.mode;
1031 if (strcmp(cf_ent->ainfo.owner, el_ent->cf_ent.ainfo.owner) != 0) {
1033 if (strcmp(el_ent->cf_ent.ainfo.owner, BADOWNER) == 0)
1034 (void) strcpy(el_ent->cf_ent.ainfo.owner,
1035 cf_ent->ainfo.owner);
1039 if (strcmp(cf_ent->ainfo.group, el_ent->cf_ent.ainfo.group) != 0) {
1041 if (strcmp(el_ent->cf_ent.ainfo.group, BADGROUP) == 0)
1042 (void) strcpy(el_ent->cf_ent.ainfo.group,
1043 cf_ent->ainfo.group);
1100 chgclass(struct cfent *cf_ent, struct pinfo *pinfo)
1108 * optimizing the use of the cf_ent->pkg_class element
1114 oldclass = cf_ent->pkg_class;
1121 pp = cf_ent->pinfo;
1132 pp = cf_ent->pinfo;
1141 (void) strcpy(cf_ent->pkg_class, newclass);