Deleted Added
full compact
stubs.c (42629) stubs.c (51292)
1/*
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
2 * Copyright (c) 1997-1999 Erez Zadok
3 * Copyright (c) 1989 Jan-Simon Pendry
4 * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1989 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
10 *

--- 22 unchanged lines hidden (view full) ---

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
3 * Copyright (c) 1989 Jan-Simon Pendry
4 * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1989 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
10 *

--- 22 unchanged lines hidden (view full) ---

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
41 * $Id: stubs.c,v 1.1.1.1 1998/11/05 02:04:55 ezk Exp $
41 * $Id: stubs.c,v 1.3 1999/01/13 23:31:19 ezk Exp $
42 *
43 * HLFSD was written at Columbia University Computer Science Department, by
44 * Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
45 * It is being distributed under the same terms and conditions as amd does.
46 */
47
48#ifdef HAVE_CONFIG_H
49# include <config.h>

--- 103 unchanged lines hidden (view full) ---

153 } else {
154 memset((char *) &uid, 0, sizeof(int));
155 uid = *(u_int *) argp->fh_data;
156 if (plt_search(uid) != (uid2home_t *) NULL) {
157 res.ns_status = NFS_OK;
158 un_fattr.na_fileid = uid;
159 res.ns_u.ns_attr_u = un_fattr;
160#ifdef DEBUG
42 *
43 * HLFSD was written at Columbia University Computer Science Department, by
44 * Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
45 * It is being distributed under the same terms and conditions as amd does.
46 */
47
48#ifdef HAVE_CONFIG_H
49# include <config.h>

--- 103 unchanged lines hidden (view full) ---

153 } else {
154 memset((char *) &uid, 0, sizeof(int));
155 uid = *(u_int *) argp->fh_data;
156 if (plt_search(uid) != (uid2home_t *) NULL) {
157 res.ns_status = NFS_OK;
158 un_fattr.na_fileid = uid;
159 res.ns_u.ns_attr_u = un_fattr;
160#ifdef DEBUG
161 dlog("nfs_getattr: successful search for uid=%d, gid=%d", uid, gid);
161 dlog("nfs_getattr: successful search for uid=%ld, gid=%ld",
162 (long) uid, (long) gid);
162#endif /* DEBUG */
163 } else { /* not found */
164 res.ns_status = NFSERR_STALE;
165 }
166 }
167 }
168 return &res;
169}

--- 73 unchanged lines hidden (view full) ---

243 memset((char *) &un_fhandle, 0, sizeof(am_nfs_fh));
244 *(u_int *) un_fhandle.fh_data = (u_int) untab[idx].uid;
245 strncpy((char *) &un_fhandle.fh_data[sizeof(int)],
246 untab[idx].username,
247 sizeof(am_nfs_fh) - sizeof(int));
248 res.dr_u.dr_drok_u.drok_fhandle = un_fhandle;
249 res.dr_status = NFS_OK;
250#ifdef DEBUG
163#endif /* DEBUG */
164 } else { /* not found */
165 res.ns_status = NFSERR_STALE;
166 }
167 }
168 }
169 return &res;
170}

--- 73 unchanged lines hidden (view full) ---

244 memset((char *) &un_fhandle, 0, sizeof(am_nfs_fh));
245 *(u_int *) un_fhandle.fh_data = (u_int) untab[idx].uid;
246 strncpy((char *) &un_fhandle.fh_data[sizeof(int)],
247 untab[idx].username,
248 sizeof(am_nfs_fh) - sizeof(int));
249 res.dr_u.dr_drok_u.drok_fhandle = un_fhandle;
250 res.dr_status = NFS_OK;
251#ifdef DEBUG
251 dlog("nfs_lookup: successful lookup for uid=%d, gid=%d: username=%s",
252 uid, gid, untab[idx].username);
252 dlog("nfs_lookup: successful lookup for uid=%ld, gid=%ld: username=%s",
253 (long) uid, (long) gid, untab[idx].username);
253#endif /* DEBUG */
254 return &res;
255 }
256 } /* end of "if (eq_fh(argp->dir.data, root.data)) {" */
257
258 res.dr_status = NFSERR_STALE;
259 return &res;
260}

--- 78 unchanged lines hidden (view full) ---

339 return (nfsreadlinkres *) NULL;
340 } else {
341 res.rlr_status = NFSERR_STALE;
342 }
343 }
344
345 /* print info, but try to avoid repetitions */
346 if (userid != last_uid) {
254#endif /* DEBUG */
255 return &res;
256 }
257 } /* end of "if (eq_fh(argp->dir.data, root.data)) {" */
258
259 res.dr_status = NFSERR_STALE;
260 return &res;
261}

--- 78 unchanged lines hidden (view full) ---

340 return (nfsreadlinkres *) NULL;
341 } else {
342 res.rlr_status = NFSERR_STALE;
343 }
344 }
345
346 /* print info, but try to avoid repetitions */
347 if (userid != last_uid) {
347 plog(XLOG_USER, "mailbox for uid=%d, gid=%d is %s",
348 userid, groupid, (char *) res.rlr_u.rlr_data_u);
348 plog(XLOG_USER, "mailbox for uid=%ld, gid=%ld is %s",
349 (long) userid, (long) groupid, (char *) res.rlr_u.rlr_data_u);
349 last_uid = userid;
350 }
351
352 /* I don't think will pass this if -D nofork */
353 if (serverpid == getpid())
354 return &res;
355
356 if (!svc_sendreply(nfsxprt, (XDRPROC_T_TYPE) xdr_readlinkres, (SVC_IN_ARG_TYPE) &res))

--- 174 unchanged lines hidden ---
350 last_uid = userid;
351 }
352
353 /* I don't think will pass this if -D nofork */
354 if (serverpid == getpid())
355 return &res;
356
357 if (!svc_sendreply(nfsxprt, (XDRPROC_T_TYPE) xdr_readlinkres, (SVC_IN_ARG_TYPE) &res))

--- 174 unchanged lines hidden ---