This file is indexed.

/usr/include/ncp/nwclient.h is in libncp-dev 2.2.6-8.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/*
    nwclient.h
    Copyright (C) 2001  Patrick Pollet

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


    Revision history:


	1.00  2000, February 27		Patrick Pollet
		Initial version.

	1.01  2000, February 27		Petr Vandrovec <vandrove@vc.cvut.cz>
		Move generic defines into nwcalls.h.

 */

#ifndef __NWCLIENT_H__
#define __NWCLIENT_H__

#include <ncp/nwnet.h>

#define ATTR_LOCATION	"L"

#define ATTR_LOGIN_SCRIPT "Login Script"
#define ATTR_GRP_MBS      "Group Membership"
#define ATTR_HOST_SERVER  "Host Server"
#define ATTR_HOST_RN     "Host Resource Name"
#define ATTR_SMTP_EMAIL  "Email Address"
#define ATTR_LDAP_EMAIL  "Internet Email Address"
#define ATTR_FULL_NAME   "Full Name"
#define ATTR_SURNAME     "Surname"
#define ATTR_GIVEN_NAME  "Given Name"
#define ATTR_POSTAL_ADDRESS     "Postal Address"
#define ATTR_HOME_NW     "Home Directory"
#define ATTR_MESSAGE_SERVER "Message Server"
#define ATTR_LOGIN_TIME  "Login Time"
#define ATTR_PROFILE      "Profile"

// the proper naming attribute may be customized here (must be a CI_STRING )
#define ATTR_GECOS        ATTR_FULL_NAME


// syntaxes of the used attributes
#define SYN_LOCATION     SYN_CI_STRING
#define SYN_LOGIN_SCRIPT SYN_STREAM
#define SYN_UID          SYN_INTEGER
#define SYN_PGNAME 	 SYN_DIST_NAME
#define SYN_PGID         SYN_INTEGER
#define SYN_GID          SYN_INTEGER
#define SYN_SHELL        SYN_CE_STRING
#define SYN_COM          SYN_CI_STRING
#define SYN_HOME	 SYN_CE_STRING
#define SYN_GRP_MBS      SYN_DIST_NAME
#define SYN_PROFILE      SYN_DIST_NAME

#ifdef __cplusplus
extern "C" {
#endif




/* caution to follow the NWIsDSServer convention all NWCXIs* fonctions
  return non zero if OK */
int NWCXIsDSServer ( NWCONN_HANDLE conn, NWDSChar * treeName);
/* same as API return 1 if OK but removes the trailings '_____'*/
int NWCXIsSameTree (NWCONN_HANDLE conn, const NWDSChar *treeName) ;
/*return 1 if conn points to the tree treeName */
int NWCXIsSameServer(NWCONN_HANDLE conn, const NWDSChar* server);
/*return 1 if conn points to the server server */
NWCCODE NWCXIsPermanentConnection (NWCONN_HANDLE conn);
/*return 1 if conn is permanent */
NWDSCCODE NWCXIsDSAuthenticated(NWDSContextHandle ctx);
/* return true if a context has authentication keys*/

NWDSCCODE NWCXGetPreferredDSTree    (NWDSChar * preferTree, size_t maxLen);
NWDSCCODE NWCXGetDefaultNameContext (const NWDSChar* treeName,NWDSChar * nameContext, size_t maxLen);
NWDSCCODE NWCXGetPreferredServer    (const NWDSChar * forTree,NWDSChar *preferedServer, size_t maxLen);
NWDSCCODE NWCXGetDefaultUserName (const NWDSChar * forTree,NWDSChar *defaultName, size_t maxLen);
/*may be we should return current user's Unix name if nothing found in env ? */
NWDSCCODE NWCXGetDefaultPassword (const NWDSChar * forTree,NWDSChar *defaultPwd, size_t maxLen);


NWCCODE NWCXGetPermConnInfo(NWCONN_HANDLE conn, nuint info, size_t len,void* buffer);
/* return infos specific top permanent connexions*/
/* fails if not permanent pass to NWCCGetConnInfo if needed             */
NWCCODE NWCXGetPermConnList (NWCONN_HANDLE* conns , int maxEntries, int* curEntries, uid_t uid);
/* returns the list of permanent connexions belonging to user uid*/
/* if uid=-1 = all Permanent connections (Root only can call it) */
NWCCODE NWCXGetPermConnListByTreeName (NWCONN_HANDLE* conns, int maxEntries,
                                      int* curEntries, uid_t uid,
                                      const NWDSChar *treeName);
/* returns the list of permanent connexions belonging to user uid*/
/* and related to tree treeName */
NWCCODE NWCXGetPermConnListByServerName (NWCONN_HANDLE* conns , int maxEntries,
                                      int* curEntries, uid_t uid,
                                      const NWDSChar *serverName);
/* returns the list of permanent connexions belonging to user uid*/
/* and related to server serverName */


NWDSCCODE NWDSCreateContextHandleMnt(NWDSContextHandle* ctx, const NWDSChar * treeName);
/* create a context ,add to it all permanent connections related to treeName */
/* belonging to me (by using getuid()) and  */


NWDSCCODE NWCXAttachToTreeByName( NWCONN_HANDLE* conn, const NWDSChar * treeName);
/* open an unauthenticated connection to the first visible server belonging to treeName*/


/* misc NDS properties reading functions to alleviate writing future utilities */

NWDSCCODE NWCXGetNDSVolumeServerAndResourceName(NWDSContextHandle ctx,const NWDSChar* ndsName,
                                               NWDSChar* serverName, size_t serverNameMaxLen,
                                               NWDSChar *resourceName, size_t resourceNameMaxlen);
/* return server name (DN or RN) and volume name of a NDS volume name */

NWDSCCODE NWCXGetObjectHomeDirectory(NWDSContextHandle ctx,
                                     const NWDSChar* ndsName,
                                     NWDSChar* serverName,
                                     size_t serverNameMaxLen,
                                     NWDSChar *resourceName,
                                     size_t resourceNameMaxLen,
                                     NWDSChar* NDSvolumeName,
                                     size_t NDSVolumeNameMaxLen,
                                     NWDSChar* pathName,
                                     size_t pathNameMaxLen);

NWDSCCODE NWCXGetObjectLastLoginTime(NWDSContextHandle ctx,
                                     const NWDSChar* ndsName,
                                     time_t * tm);

NWDSCCODE NWCXGetObjectMessageServer(NWDSContextHandle ctx,
                                     const NWDSChar* ndsName,
                                     NWDSChar* serverName,
                                     int serverNameMaxLen);


NWDSCCODE NWCXGetObjectLoginScript(NWDSContextHandle ctx,const NWDSChar* objectName,
                                        char* buffer, int * len, int maxlen);

NWDSCCODE NWCXGetContextLoginScript(NWDSContextHandle ctx,const NWDSChar* objectName,
                                        char* buffer, int * len,int maxlen);

NWDSCCODE NWCXGetProfileLoginScript(NWDSContextHandle ctx,const NWDSChar* objectName,
                                        char* buffer, int * len, int maxlen);

/* read a single valued string attribute */
NWDSCCODE NWCXGetStringAttributeValue (NWDSContextHandle ctx,
                                        const NWDSChar* objectName,
                                        const NWDSChar* attrName,
                                        char* buffer, int maxlen);

/* read a single valued numeric attribute */
NWDSCCODE NWCXGetIntAttributeValue     (NWDSContextHandle ctx,
                                        const NWDSChar* objectName,
                                        const NWDSChar* attrName,
                                        int * value);

/* read & convert to string a single valued attribute */
NWDSCCODE NWCXGetAttributeValueAsString (NWDSContextHandle ctx,
                                        const NWDSChar* objectName,
                                        const NWDSChar* attrName,
                                        char* buffer, size_t maxlen);

/* read a multi valued string attribute */
/* caller MUST free the buffer created here */
NWDSCCODE NWCXGetMultiStringAttributeValue (NWDSContextHandle ctx,
                                        const NWDSChar* objectName,
                                        const NWDSChar* attrName,
                                        char** buffer) ;


/* misc utilities */
NWDSCCODE NWCXSplitNameAndContext (NWDSContextHandle ctx,const NWDSChar * dn,
                                   char * name, char* context);

#ifdef __cplusplus
}
#endif

#endif	/* __NWCLIENT_H__ */