File:  [Research Unix] / researchv10no / cmd / upas / libc / mboxowner.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/*
 *	store mbox owner through pointer.  return 0 (success), -1 (failure)
 *	easy version for systems that don't let you give files away
 */

#include <types.h>
#include <stat.h>
#include "ugid.h"

mboxowner (mbox, ugidp)
	char *mbox;
	struct ugid *ugidp;
{
	struct stat sb;

	if (stat(mbox,&sb) < 0)
		return -1;

	ugidp->uid = sb.st_uid;
	ugidp->gid = sb.st_gid;
	return 0;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.