| 1 |
|
| 2 | |
| 3 | * DOS share management for lockd.
|
| 4 | *
|
| 5 | * Copyright (C) 1996, Olaf Kirch <[email protected]>
|
| 6 |
|
| 7 |
|
| 8 | #ifndef _LOCKD_SHARE_H
|
| 9 | #define _LOCKD_SHARE_H
|
| 10 |
|
| 11 | #include <linux/bits.h>
|
| 12 |
|
| 13 |
|
| 14 | #define LOCKD_SHARE_SVID (~(u32)0)
|
| 15 |
|
| 16 |
|
| 17 | #define LOCKD_FSH_BIT(a, d) BIT(((a) << 2) | (d))
|
| 18 |
|
| 19 | |
| 20 | * DOS share for a specific file
|
| 21 |
|
| 22 | struct lockd_share {
|
| 23 | struct lockd_share * s_next;
|
| 24 | struct nlm_host * s_host;
|
| 25 | struct nlm_file * s_file;
|
| 26 | struct xdr_netobj s_owner;
|
| 27 | u32 s_access;
|
| 28 | u32 s_mode;
|
| 29 | u16 s_access_deny_bmap;
|
| 30 | };
|
| 31 |
|
| 32 | __be32 nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
|
| 33 | struct xdr_netobj *oh, u32 access, u32 mode);
|
| 34 | __be32 nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
|
| 35 | struct xdr_netobj *oh, u32 access, u32 mode);
|
| 36 | void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *,
|
| 37 | nlm_host_match_fn_t);
|
| 38 |
|
| 39 | #endif
|