1 /* $NetBSD: pcnfsd_v1.c,v 1.2 1995/07/25 22:21:19 gwr Exp $ */
3 /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_v1.c 1.1 91/09/03 12:41:50 SMI */
5 **=====================================================================
6 ** Copyright (c) 1986,1987,1988,1989,1990,1991 by Sun Microsystems, Inc.
7 ** @(#)pcnfsd_v1.c 1.1 9/3/91
8 **=====================================================================
11 **=====================================================================
12 ** I N C L U D E F I L E S E C T I O N *
14 ** If your port requires different include files, add a suitable *
15 ** #define in the customization section, and make the inclusion or *
16 ** exclusion of the files conditional on this. *
17 **=====================================================================
21 #include <sys/ioctl.h>
36 #include <sys/fcntl.h>
48 **---------------------------------------------------------------------
49 ** Misc. variable definitions
50 **---------------------------------------------------------------------
56 **=====================================================================
57 ** C O D E S E C T I O N *
58 **=====================================================================
64 pcnfsd_null_1_svc(arg
, req
)
69 return ((void *) &dummy
);
73 pcnfsd_auth_1_svc(arg
, req
)
77 static auth_results r
;
85 r
.stat
= AUTH_RES_FAIL
; /* assume failure */
89 scramble(arg
->id
, uname
);
90 scramble(arg
->pw
, pw
);
93 if (check_cache(uname
, pw
, &r
.uid
, &r
.gid
)) {
102 p
= get_password(uname
);
103 if (p
== (struct passwd
*) NULL
)
107 c2
= strlen(p
->pw_passwd
);
108 if ((c1
&& !c2
) || (c2
&& !c1
) ||
109 (strcmp(p
->pw_passwd
, crypt(pw
, p
->pw_passwd
)))) {
112 r
.stat
= AUTH_RES_OK
;
127 pcnfsd_pr_init_1_svc(pi_arg
, req
)
128 pr_init_args
*pi_arg
;
131 static pr_init_results pi_res
;
134 (pirstat
) pr_init(pi_arg
->system
, pi_arg
->pn
, &pi_res
.dir
);
140 pcnfsd_pr_start_1_svc(ps_arg
, req
)
141 pr_start_args
*ps_arg
;
144 static pr_start_results ps_res
;
148 (psrstat
) pr_start2(ps_arg
->system
, ps_arg
->pn
, ps_arg
->user
,
149 ps_arg
->file
, ps_arg
->opts
, &dummyptr
);