17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 539d3e169Sevanl * Common Development and Distribution License (the "License"). 639d3e169Sevanl * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 223bfb48feSsemery * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _AUTOMOUNT_H 277c478bd9Sstevel@tonic-gate #define _AUTOMOUNT_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #include <fslib.h> /* needed for mntlist_t declaration */ 327c478bd9Sstevel@tonic-gate #include <thread.h> 337c478bd9Sstevel@tonic-gate #include <sys/mntent.h> /* " " MNTTYPE_* declarations */ 347c478bd9Sstevel@tonic-gate #include <synch.h> /* needed for mutex_t declaration */ 357c478bd9Sstevel@tonic-gate #include <sys/types.h> 367c478bd9Sstevel@tonic-gate #include <rpc/rpc.h> 3739d3e169Sevanl #include <sys/fs/autofs.h> 387c478bd9Sstevel@tonic-gate #include <netinet/in.h> /* needed for sockaddr_in declaration */ 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate #ifdef MALLOC_DEBUG 417c478bd9Sstevel@tonic-gate #include <debug_alloc.h> 427c478bd9Sstevel@tonic-gate #endif 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate #ifdef __cplusplus 457c478bd9Sstevel@tonic-gate extern "C" { 467c478bd9Sstevel@tonic-gate #endif 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate #ifndef _REENTRANT 497c478bd9Sstevel@tonic-gate #define fork1 vfork 507c478bd9Sstevel@tonic-gate #define rpc_control(a, b) 1 517c478bd9Sstevel@tonic-gate #endif 527c478bd9Sstevel@tonic-gate 5339d3e169Sevanl #define DOMOUNT_USER 1 5439d3e169Sevanl #define DOMOUNT_KERNEL 2 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate /* 577c478bd9Sstevel@tonic-gate * Solaris autofs configuration file location 587c478bd9Sstevel@tonic-gate */ 597c478bd9Sstevel@tonic-gate #define AUTOFSADMIN "/etc/default/autofs" 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gate #define MXHOSTNAMELEN 64 627c478bd9Sstevel@tonic-gate #define MAXNETNAMELEN 255 637c478bd9Sstevel@tonic-gate #define MAXFILENAMELEN 255 647c478bd9Sstevel@tonic-gate #define LINESZ 4096 657c478bd9Sstevel@tonic-gate #define MAXADDRLEN 128 /* max autofs address length */ 667c478bd9Sstevel@tonic-gate #define MAXOPTSLEN 1024 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate #define AUTOFS_MOUNT_TIMEOUT 600 /* default min time mount will */ 697c478bd9Sstevel@tonic-gate /* remain mounted (in seconds) */ 707c478bd9Sstevel@tonic-gate #define AUTOFS_RPC_TIMEOUT 60 /* secs autofs will wait for */ 717c478bd9Sstevel@tonic-gate /* automountd's reply before */ 727c478bd9Sstevel@tonic-gate /* retransmitting */ 737c478bd9Sstevel@tonic-gate /* stack ops */ 747c478bd9Sstevel@tonic-gate #define ERASE 0 757c478bd9Sstevel@tonic-gate #define PUSH 1 767c478bd9Sstevel@tonic-gate #define POP 2 777c478bd9Sstevel@tonic-gate #define INIT 3 787c478bd9Sstevel@tonic-gate #define STACKSIZ 30 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate #define DIST_SELF 1 817c478bd9Sstevel@tonic-gate #define DIST_MYSUB 2 827c478bd9Sstevel@tonic-gate #define DIST_MYNET 3 837c478bd9Sstevel@tonic-gate #define DIST_OTHER 4 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate #define MAXIFS 32 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate /* 887c478bd9Sstevel@tonic-gate * Retry operation related definitions. 897c478bd9Sstevel@tonic-gate */ 907c478bd9Sstevel@tonic-gate #define RET_OK 0 917c478bd9Sstevel@tonic-gate #define RET_RETRY 32 927c478bd9Sstevel@tonic-gate #define RET_ERR 33 937c478bd9Sstevel@tonic-gate #define INITDELAY 5 947c478bd9Sstevel@tonic-gate #define DELAY_BACKOFF 2 957c478bd9Sstevel@tonic-gate #define MAXDELAY 120 967c478bd9Sstevel@tonic-gate #define DELAY(delay) { \ 977c478bd9Sstevel@tonic-gate (void) sleep(delay); \ 987c478bd9Sstevel@tonic-gate delay *= DELAY_BACKOFF; \ 997c478bd9Sstevel@tonic-gate if (delay > MAXDELAY) \ 1007c478bd9Sstevel@tonic-gate delay = MAXDELAY; \ 1017c478bd9Sstevel@tonic-gate } 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate struct mapline { 1047c478bd9Sstevel@tonic-gate char linebuf[LINESZ]; 1057c478bd9Sstevel@tonic-gate char lineqbuf[LINESZ]; 1067c478bd9Sstevel@tonic-gate }; 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate /* 1097c478bd9Sstevel@tonic-gate * Structure describing a host/filesystem/dir tuple in a NIS map entry 1107c478bd9Sstevel@tonic-gate */ 1117c478bd9Sstevel@tonic-gate struct mapfs { 1127c478bd9Sstevel@tonic-gate struct mapfs *mfs_next; /* next in entry */ 1137c478bd9Sstevel@tonic-gate int mfs_ignore; /* ignore this entry */ 1147c478bd9Sstevel@tonic-gate char *mfs_host; /* host name */ 1157c478bd9Sstevel@tonic-gate char *mfs_dir; /* dir to mount */ 1167c478bd9Sstevel@tonic-gate int mfs_penalty; /* mount penalty for this host */ 1177c478bd9Sstevel@tonic-gate int mfs_distance; /* distance hint */ 1187c478bd9Sstevel@tonic-gate struct nfs_args *mfs_args; /* nfs_args */ 1197c478bd9Sstevel@tonic-gate struct netconfig *mfs_nconf; 1207c478bd9Sstevel@tonic-gate rpcvers_t mfs_version; /* NFS version */ 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate #define MFS_ALLOC_DIR 0x1 /* mfs_dir now points to different */ 1237c478bd9Sstevel@tonic-gate /* buffer */ 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate #define MFS_URL 0x2 /* is NFS url listed in this tuple. */ 1267c478bd9Sstevel@tonic-gate #define MFS_FH_VIA_WEBNFS 0x4 /* got file handle during ping phase */ 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate uint_t mfs_flags; 1297c478bd9Sstevel@tonic-gate uint_t mfs_port; /* port# in NFS url */ 1307c478bd9Sstevel@tonic-gate }; 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate /* 1337c478bd9Sstevel@tonic-gate * NIS entry - lookup of name in DIR gets us this 1347c478bd9Sstevel@tonic-gate */ 1357c478bd9Sstevel@tonic-gate struct mapent { 1367c478bd9Sstevel@tonic-gate char *map_fstype; /* file system type e.g. "nfs" */ 1377c478bd9Sstevel@tonic-gate char *map_mounter; /* base fs e.g. "cachefs" */ 1387c478bd9Sstevel@tonic-gate char *map_root; /* path to mount root */ 1397c478bd9Sstevel@tonic-gate char *map_mntpnt; /* path from mount root */ 1407c478bd9Sstevel@tonic-gate char *map_mntopts; /* mount options */ 1417c478bd9Sstevel@tonic-gate char *map_fsw; /* mount fs information */ 1427c478bd9Sstevel@tonic-gate char *map_fswq; /* quoted mountfs information */ 1437c478bd9Sstevel@tonic-gate int map_mntlevel; /* mapentry hierarchy level */ 1447c478bd9Sstevel@tonic-gate bool_t map_modified; /* flags modified mapentries */ 1457c478bd9Sstevel@tonic-gate bool_t map_faked; /* flags faked mapentries */ 1467c478bd9Sstevel@tonic-gate int map_err; /* flags any bad entries in the map */ 1477c478bd9Sstevel@tonic-gate struct mapfs *map_fs; /* list of replicas for nfs */ 1487c478bd9Sstevel@tonic-gate struct mapent *map_next; 1497c478bd9Sstevel@tonic-gate }; 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate /* 1537c478bd9Sstevel@tonic-gate * Descriptor for each directory served by the automounter 1547c478bd9Sstevel@tonic-gate */ 1557c478bd9Sstevel@tonic-gate struct autodir { 1567c478bd9Sstevel@tonic-gate char *dir_name; /* mount point */ 1577c478bd9Sstevel@tonic-gate char *dir_map; /* name of map for dir */ 1587c478bd9Sstevel@tonic-gate char *dir_opts; /* default mount options */ 1597c478bd9Sstevel@tonic-gate int dir_direct; /* direct mountpoint ? */ 1607c478bd9Sstevel@tonic-gate int dir_remount; /* a remount */ 1617c478bd9Sstevel@tonic-gate struct autodir *dir_next; /* next entry */ 1627c478bd9Sstevel@tonic-gate struct autodir *dir_prev; /* prev entry */ 1637c478bd9Sstevel@tonic-gate }; 1647c478bd9Sstevel@tonic-gate 1657c478bd9Sstevel@tonic-gate /* 1667c478bd9Sstevel@tonic-gate * This structure is used to build an array of 1677c478bd9Sstevel@tonic-gate * hostnames with associated penalties to be 1687c478bd9Sstevel@tonic-gate * passed to the nfs_cast procedure 1697c478bd9Sstevel@tonic-gate */ 1707c478bd9Sstevel@tonic-gate struct host_names { 1717c478bd9Sstevel@tonic-gate char *host; 1727c478bd9Sstevel@tonic-gate int penalty; 1737c478bd9Sstevel@tonic-gate }; 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate /* 1767c478bd9Sstevel@tonic-gate * structure used to build list of contents for a map on 1777c478bd9Sstevel@tonic-gate * a readdir request 1787c478bd9Sstevel@tonic-gate */ 1797c478bd9Sstevel@tonic-gate struct dir_entry { 1807c478bd9Sstevel@tonic-gate char *name; /* name of entry */ 1817c478bd9Sstevel@tonic-gate ino_t nodeid; 1827c478bd9Sstevel@tonic-gate off_t offset; 1837c478bd9Sstevel@tonic-gate struct dir_entry *next; 1847c478bd9Sstevel@tonic-gate struct dir_entry *left; /* left element in binary tree */ 1857c478bd9Sstevel@tonic-gate struct dir_entry *right; /* right element in binary tree */ 1867c478bd9Sstevel@tonic-gate }; 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate /* 1897c478bd9Sstevel@tonic-gate * offset index table 1907c478bd9Sstevel@tonic-gate */ 1917c478bd9Sstevel@tonic-gate struct off_tbl { 1927c478bd9Sstevel@tonic-gate off_t offset; 1937c478bd9Sstevel@tonic-gate struct dir_entry *first; 1947c478bd9Sstevel@tonic-gate struct off_tbl *next; 1957c478bd9Sstevel@tonic-gate }; 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate #ifndef NO_RDDIR_CACHE 1987c478bd9Sstevel@tonic-gate /* 1997c478bd9Sstevel@tonic-gate * directory cache for 'map' 2007c478bd9Sstevel@tonic-gate */ 20139d3e169Sevanl struct autofs_rddir_cache { 2027c478bd9Sstevel@tonic-gate char *map; 2037c478bd9Sstevel@tonic-gate struct off_tbl *offtp; 2047c478bd9Sstevel@tonic-gate ulong_t bucket_size; 2057c478bd9Sstevel@tonic-gate time_t ttl; 2067c478bd9Sstevel@tonic-gate struct dir_entry *entp; 2077c478bd9Sstevel@tonic-gate mutex_t lock; /* protects 'in_use' field */ 2087c478bd9Sstevel@tonic-gate int in_use; /* # threads referencing it */ 2097c478bd9Sstevel@tonic-gate rwlock_t rwlock; /* protects 'full' and 'next' */ 2107c478bd9Sstevel@tonic-gate int full; /* full == 1 when cache full */ 21139d3e169Sevanl struct autofs_rddir_cache *next; 2127c478bd9Sstevel@tonic-gate }; 2137c478bd9Sstevel@tonic-gate 2147c478bd9Sstevel@tonic-gate #define RDDIR_CACHE_TIME 300 /* in seconds */ 2157c478bd9Sstevel@tonic-gate 2167c478bd9Sstevel@tonic-gate #endif /* NO_RDDIR_CACHE */ 2177c478bd9Sstevel@tonic-gate 2187c478bd9Sstevel@tonic-gate /* 2197c478bd9Sstevel@tonic-gate * structure used to maintain address list for localhost 2207c478bd9Sstevel@tonic-gate */ 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate struct myaddrs { 2237c478bd9Sstevel@tonic-gate struct sockaddr_in sin; 2247c478bd9Sstevel@tonic-gate struct myaddrs *myaddrs_next; 2257c478bd9Sstevel@tonic-gate }; 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gate extern time_t timenow; /* set at start of processing of each RPC call */ 2287c478bd9Sstevel@tonic-gate extern char self[]; 2297c478bd9Sstevel@tonic-gate extern int verbose; 2307c478bd9Sstevel@tonic-gate extern int trace; 2317c478bd9Sstevel@tonic-gate extern int automountd_nobrowse; 2327c478bd9Sstevel@tonic-gate extern struct autodir *dir_head; 2337c478bd9Sstevel@tonic-gate extern struct autodir *dir_tail; 2347c478bd9Sstevel@tonic-gate extern struct mntlist *current_mounts; 23511606941Sjwahlig struct mounta; /* defined in sys/vfs.h */ 2367c478bd9Sstevel@tonic-gate extern struct myaddrs *myaddrs_head; 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate extern rwlock_t cache_lock; 2397c478bd9Sstevel@tonic-gate extern rwlock_t portmap_cache_lock; 24039d3e169Sevanl extern rwlock_t autofs_rddir_cache_lock; 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gate extern mutex_t cleanup_lock; 2437c478bd9Sstevel@tonic-gate extern cond_t cleanup_start_cv; 2447c478bd9Sstevel@tonic-gate extern cond_t cleanup_done_cv; 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate /* 2477c478bd9Sstevel@tonic-gate * mnttab handling routines 2487c478bd9Sstevel@tonic-gate */ 2497c478bd9Sstevel@tonic-gate extern void free_mapent(struct mapent *); 2507c478bd9Sstevel@tonic-gate extern struct mntlist *getmntlist(void); 2517c478bd9Sstevel@tonic-gate extern dev_t get_devid(struct extmnttab *); 2527c478bd9Sstevel@tonic-gate 2537c478bd9Sstevel@tonic-gate /* 2547c478bd9Sstevel@tonic-gate * utilities 2557c478bd9Sstevel@tonic-gate */ 2567c478bd9Sstevel@tonic-gate extern struct mapent *parse_entry(char *, char *, char *, struct mapline *, 2577c478bd9Sstevel@tonic-gate char *, uint_t, bool_t); 2587c478bd9Sstevel@tonic-gate extern int macro_expand(char *, char *, char *, int); 2597c478bd9Sstevel@tonic-gate extern void unquote(char *, char *); 260*6a6d3e5eSjs195444 extern void unbracket(char **); 2617c478bd9Sstevel@tonic-gate extern void trim(char *); 2627c478bd9Sstevel@tonic-gate extern char *get_line(FILE *, char *, char *, int); 2637c478bd9Sstevel@tonic-gate extern int getword(char *, char *, char **, char **, char, int); 2647c478bd9Sstevel@tonic-gate extern int get_retry(char *); 2657c478bd9Sstevel@tonic-gate extern int str_opt(struct mnttab *, char *, char **); 2666012a713Spetede extern void put_automountd_env(void); 2677c478bd9Sstevel@tonic-gate extern void dirinit(char *, char *, char *, int, char **, char ***); 2687c478bd9Sstevel@tonic-gate extern void pr_msg(const char *, ...); 2697c478bd9Sstevel@tonic-gate extern void trace_prt(int, char *, ...); 27039d3e169Sevanl extern void free_autofs_args(autofs_args *); 27139d3e169Sevanl extern void free_nfs_args(struct nfs_args *); 2727c478bd9Sstevel@tonic-gate extern void free_mounta(struct mounta *); 2737c478bd9Sstevel@tonic-gate 2747c478bd9Sstevel@tonic-gate extern int nopt(struct mnttab *, char *, int *); 2757c478bd9Sstevel@tonic-gate extern int set_versrange(rpcvers_t, rpcvers_t *, rpcvers_t *); 2767c478bd9Sstevel@tonic-gate extern enum clnt_stat pingnfs(char *, int, rpcvers_t *, rpcvers_t, 2777c478bd9Sstevel@tonic-gate ushort_t, bool_t, char *, char *); 2787c478bd9Sstevel@tonic-gate 27939d3e169Sevanl extern void *autofs_get_buffer(size_t); 2807c478bd9Sstevel@tonic-gate extern int self_check(char *); 2813bfb48feSsemery extern int do_mount1(char *, char *, char *, char *, char *, uint_t, uid_t, 2823bfb48feSsemery action_list **, int); 2833bfb48feSsemery extern int do_lookup1(char *, char *, char *, char *, char *, uint_t, uid_t, 2843bfb48feSsemery autofs_action_t *, struct linka *); 2857c478bd9Sstevel@tonic-gate extern int do_unmount1(umntrequest *); 2863bfb48feSsemery extern int do_readdir(autofs_rddirargs *, autofs_rddirres *); 2877c478bd9Sstevel@tonic-gate extern int nfsunmount(struct mnttab *); 2887c478bd9Sstevel@tonic-gate extern int loopbackmount(char *, char *, char *, int); 2893bfb48feSsemery extern int mount_nfs(struct mapent *, char *, char *, int, uid_t, 2903bfb48feSsemery action_list **); 2917c478bd9Sstevel@tonic-gate extern int mount_autofs(struct mapent *, char *, action_list *, 29239d3e169Sevanl char *rootp, char *subdir, char *key); 2937c478bd9Sstevel@tonic-gate extern int mount_generic(char *, char *, char *, char *, int); 2947c478bd9Sstevel@tonic-gate extern enum clnt_stat nfs_cast(struct mapfs *, struct mapfs **, int); 2957c478bd9Sstevel@tonic-gate 2967c478bd9Sstevel@tonic-gate extern bool_t hasrestrictopt(char *); 2977c478bd9Sstevel@tonic-gate 2987c478bd9Sstevel@tonic-gate #ifndef NO_RDDIR_CACHE 2997c478bd9Sstevel@tonic-gate /* 3007c478bd9Sstevel@tonic-gate * readdir handling routines 3017c478bd9Sstevel@tonic-gate */ 3027c478bd9Sstevel@tonic-gate extern char *auto_rddir_malloc(unsigned); 3037c478bd9Sstevel@tonic-gate extern char *auto_rddir_strdup(const char *); 3047c478bd9Sstevel@tonic-gate extern struct dir_entry *btree_lookup(struct dir_entry *, char *); 3057c478bd9Sstevel@tonic-gate extern void btree_enter(struct dir_entry **, struct dir_entry *); 3067c478bd9Sstevel@tonic-gate extern int add_dir_entry(char *, struct dir_entry **, struct dir_entry **); 3077c478bd9Sstevel@tonic-gate extern void cache_cleanup(void); 30839d3e169Sevanl extern int autofs_rddir_cache_lookup(char *, struct autofs_rddir_cache **); 3097c478bd9Sstevel@tonic-gate extern struct dir_entry *rddir_entry_lookup(char *, struct dir_entry *); 3107c478bd9Sstevel@tonic-gate #endif /* NO_RDDIR_CACHE */ 3117c478bd9Sstevel@tonic-gate 3127c478bd9Sstevel@tonic-gate /* 3137c478bd9Sstevel@tonic-gate * generic interface to specific name service functions 3147c478bd9Sstevel@tonic-gate */ 3157c478bd9Sstevel@tonic-gate extern void ns_setup(char **, char ***); 3167c478bd9Sstevel@tonic-gate extern int getmapent(char *, char *, struct mapline *, char **, char ***, 3177c478bd9Sstevel@tonic-gate bool_t *, bool_t); 3187c478bd9Sstevel@tonic-gate extern int getmapkeys(char *, struct dir_entry **, int *, int *, char **, 3197c478bd9Sstevel@tonic-gate char ***, uid_t); 3207c478bd9Sstevel@tonic-gate extern int loadmaster_map(char *, char *, char **, char ***); 3217c478bd9Sstevel@tonic-gate extern int loaddirect_map(char *, char *, char *, char **, char ***); 3227c478bd9Sstevel@tonic-gate 3237c478bd9Sstevel@tonic-gate /* 3247c478bd9Sstevel@tonic-gate * these name service specific functions should not be 3257c478bd9Sstevel@tonic-gate * accessed directly, use the generic functions. 3267c478bd9Sstevel@tonic-gate */ 3277c478bd9Sstevel@tonic-gate extern void init_files(char **, char ***); 3287c478bd9Sstevel@tonic-gate extern int getmapent_files(char *, char *, struct mapline *, char **, char ***, 3297c478bd9Sstevel@tonic-gate bool_t *, bool_t); 3307c478bd9Sstevel@tonic-gate extern int loadmaster_files(char *, char *, char **, char ***); 3317c478bd9Sstevel@tonic-gate extern int loaddirect_files(char *, char *, char *, char **, char ***); 3327c478bd9Sstevel@tonic-gate extern int getmapkeys_files(char *, struct dir_entry **, int *, int *, 3337c478bd9Sstevel@tonic-gate char **, char ***); 3347c478bd9Sstevel@tonic-gate extern int stack_op(int, char *, char **, char ***); 3357c478bd9Sstevel@tonic-gate 3367c478bd9Sstevel@tonic-gate extern void init_nisplus(char **, char ***); 3377c478bd9Sstevel@tonic-gate extern int getmapent_nisplus(char *, char *, struct mapline *, char **, 3387c478bd9Sstevel@tonic-gate char ***, bool_t *, bool_t); 3397c478bd9Sstevel@tonic-gate extern int loadmaster_nisplus(char *, char *, char **, char ***); 3407c478bd9Sstevel@tonic-gate extern int loaddirect_nisplus(char *, char *, char *, char **, char ***); 3417c478bd9Sstevel@tonic-gate extern int getmapkeys_nisplus(char *, struct dir_entry **, int *, int *, 3427c478bd9Sstevel@tonic-gate char **, char ***); 3437c478bd9Sstevel@tonic-gate 3447c478bd9Sstevel@tonic-gate extern void init_nis(char **, char ***); 3457c478bd9Sstevel@tonic-gate extern int getmapent_nis(char *, char *, struct mapline *, char **, char ***, 3467c478bd9Sstevel@tonic-gate bool_t *, bool_t); 3477c478bd9Sstevel@tonic-gate extern int loadmaster_nis(char *, char *, char **, char ***); 3487c478bd9Sstevel@tonic-gate extern int loaddirect_nis(char *, char *, char *, char **, char ***); 3497c478bd9Sstevel@tonic-gate extern int getmapkeys_nis(char *, struct dir_entry **, int *, int *, 3507c478bd9Sstevel@tonic-gate char **, char ***); 3517c478bd9Sstevel@tonic-gate 3527c478bd9Sstevel@tonic-gate extern void init_ldap(char **, char ***); 3537c478bd9Sstevel@tonic-gate extern int getmapent_ldap(char *, char *, struct mapline *, char **, char ***, 3547c478bd9Sstevel@tonic-gate bool_t *, bool_t); 3557c478bd9Sstevel@tonic-gate extern int loadmaster_ldap(char *, char *, char **, char ***); 3567c478bd9Sstevel@tonic-gate extern int loaddirect_ldap(char *, char *, char *, char **, char ***); 3577c478bd9Sstevel@tonic-gate extern int getmapkeys_ldap(char *, struct dir_entry **, int *, int *, 3587c478bd9Sstevel@tonic-gate char **, char ***); 3597c478bd9Sstevel@tonic-gate 3607c478bd9Sstevel@tonic-gate 3617c478bd9Sstevel@tonic-gate /* 3627c478bd9Sstevel@tonic-gate * end of name service specific functions 3637c478bd9Sstevel@tonic-gate */ 3647c478bd9Sstevel@tonic-gate 3657c478bd9Sstevel@tonic-gate /* 3667c478bd9Sstevel@tonic-gate * not defined in any header file 3677c478bd9Sstevel@tonic-gate */ 3687c478bd9Sstevel@tonic-gate extern bool_t xdr_uid_t(XDR *, uid_t *); 3697c478bd9Sstevel@tonic-gate extern int __clnt_bindresvport(CLIENT *); 3707c478bd9Sstevel@tonic-gate extern int getnetmaskbynet(const struct in_addr, struct in_addr *); 3717c478bd9Sstevel@tonic-gate 3727c478bd9Sstevel@tonic-gate /* 3737c478bd9Sstevel@tonic-gate * Hidden rpc functions 3747c478bd9Sstevel@tonic-gate */ 3757c478bd9Sstevel@tonic-gate extern int __nis_reset_state(); 3767c478bd9Sstevel@tonic-gate extern int __rpc_negotiate_uid(int); 3777c478bd9Sstevel@tonic-gate 3787c478bd9Sstevel@tonic-gate #ifdef __cplusplus 3797c478bd9Sstevel@tonic-gate } 3807c478bd9Sstevel@tonic-gate #endif 3817c478bd9Sstevel@tonic-gate 3827c478bd9Sstevel@tonic-gate #endif /* _AUTOMOUNT_H */ 383