Imported Upstream version 0.2.5
[platform/upstream/libtirpc.git] / src / auth_unix.c
index c2469da..4b9b13f 100644 (file)
@@ -162,6 +162,7 @@ authunix_create(machname, uid, gid, len, aup_gids)
         */
        auth->ah_cred = au->au_origcred;
        marshal_new_auth(auth);
+       auth_get(auth);         /* Reference for caller */
        return (auth);
 #ifndef _KERNEL
  cleanup_authunix_create:
@@ -396,6 +397,12 @@ marshal_new_auth(auth)
        XDR_DESTROY(xdrs);
 }
 
+static bool_t
+authunix_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xfunc, caddr_t xwhere)
+{
+       return ((*xfunc)(xdrs, xwhere));
+}
+
 static struct auth_ops *
 authunix_ops()
 {
@@ -411,6 +418,8 @@ authunix_ops()
                ops.ah_validate = authunix_validate;
                ops.ah_refresh = authunix_refresh;
                ops.ah_destroy = authunix_destroy;
+               ops.ah_wrap = authunix_wrap;
+               ops.ah_unwrap = authunix_wrap;
        }
        mutex_unlock(&ops_lock);
        return (&ops);