Annotation of researchv10no/cmd/upas/libc/mboxowner.c, revision 1.1

1.1     ! root        1: /*
        !             2:  *     store mbox owner through pointer.  return 0 (success), -1 (failure)
        !             3:  *     easy version for systems that don't let you give files away
        !             4:  */
        !             5: 
        !             6: #include <types.h>
        !             7: #include <stat.h>
        !             8: #include "ugid.h"
        !             9: 
        !            10: mboxowner (mbox, ugidp)
        !            11:        char *mbox;
        !            12:        struct ugid *ugidp;
        !            13: {
        !            14:        struct stat sb;
        !            15: 
        !            16:        if (stat(mbox,&sb) < 0)
        !            17:                return -1;
        !            18: 
        !            19:        ugidp->uid = sb.st_uid;
        !            20:        ugidp->gid = sb.st_gid;
        !            21:        return 0;
        !            22: }

unix.superglobalmegacorp.com

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