This file is indexed.

/usr/lib/emboss/include/ajsys.h is in emboss-lib 6.3.1-6ubuntu3.

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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
#ifdef __cplusplus
extern "C"
{
#endif

#ifndef ajsys_h
#define ajsys_h

#include "ajax.h"
#include <sys/types.h>

#ifndef WIN32
#include <unistd.h>
#endif

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#ifndef __VMS
#ifndef WIN32
#include <sys/param.h>
#endif
#endif

#include <sys/stat.h>

#ifndef WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <dirent.h>
#include <unistd.h>
#else
#include <winsock2.h>
#include <io.h>
#include <fcntl.h>
#endif

#include <signal.h>
    
/*
** Structure to hold either a UNIX socket or a Windows socket.
** Allows calling functions to use sockets without needing ifdefs.
** Not implemented as an EMBOSS-style typedef as it is really a
** system thing, but could be if desired.
*/

struct AJSOCKET
{
#ifndef WIN32
    ajint sock;
#else
    SOCKET sock;
#endif
};




/*
** Structure for use with alarm timeouts
** UNIX uses SIGALRM, but Windows does not have that signal.
** Windows requires setting up a timer. This structure is primarily
** to allow a handle to the timer to be passed back for use
** with the ajSysTimeoutUnset() timer cancellation function.
** On the UNIX side it holds the sigaction structure to allow
** The action handler to be set to SIG_IGN, for extra safety.
** Not implemented as an EMBOSS-style typedef as it is really a
** system thing, but could be if desired.
*/

struct AJTIMEOUT
{

#ifdef WIN32
    HANDLE thandle;
    LARGE_INTEGER wtime;
#else
    struct sigaction sa;
    ajint Padding;
#endif
    ajint seconds;
};




#ifndef WIN32
#define AJBADSOCK -1
#define SOCKRET int
#else
#define AJBADSOCK INVALID_SOCKET
#define SOCKRET SOCKET
#endif
        


    
/*
** Prototype definitions
*/

AjBool        ajSysArglistBuildC (const char* cmdline,
                                  char** Pname, char*** PParglist);
AjBool        ajSysArglistBuildS (const AjPStr cmdline,
                                  char** Pname, char*** PParglist);
void          ajSysArglistFree (char*** arglist);
void          ajSysCanon(AjBool state);
char          ajSysCastItoc(ajint v);
unsigned char ajSysCastItouc(ajint v);
void          ajSysExit(void);
AjBool        ajSysFileUnlinkC(const char* s);
AjBool        ajSysFileUnlinkS(const AjPStr s);
FILE*         ajSysFdFromSocket(struct AJSOCKET sock, const char *mode);
AjBool        ajSysFileRmrfC(const char *path);
AjBool        ajSysFileWhich(AjPStr *Pfilename);
AjBool        ajSysFileWhichEnv(AjPStr *Pfilename, char * const env[]);
FILE*         ajSysFuncFdopen(ajint filedes, const char *mode);
char*         ajSysFuncFgets(char *buf, int size, FILE *fp);
FILE*         ajSysFuncFopen(const char *name, const char *flags);
SOCKRET       ajSysFuncSocket(int domain, int type, int protocol);
char*         ajSysFuncStrtokR(const char *s, const char *t,
			       const char **ptrptr,
			       AjPStr *buf);
char*         ajSysFuncStrtok(const char *s, const char *t);
char*         ajSysFuncStrdup(const char *s);
AjBool        ajSysCommandCopyC(const char* filename,
                                const char* newfilename);
AjBool        ajSysCommandCopyS(const AjPStr filename,
                                const AjPStr newfilename);
AjBool        ajSysCommandMakedirC(const char* dirname);
AjBool        ajSysCommandMakedirS(const AjPStr dirname);
AjBool        ajSysCommandRemoveC(const char* filename);
AjBool        ajSysCommandRemoveS(const AjPStr filename);
AjBool        ajSysCommandRemovedirC(const char* dirname);
AjBool        ajSysCommandRemovedirS(const AjPStr dirname);
AjBool        ajSysCommandRenameC(const char* filename,
                                  const char* newfilename);
AjBool        ajSysCommandRenameS(const AjPStr filename,
                                  const AjPStr newfilename);
ajint         ajSysExecC(const char* cl);
ajint         ajSysExecS(const AjPStr clstr);
ajint         ajSysExecLocaleC(const char* cl, const char* localetxt);
ajint         ajSysExecLocaleS(const AjPStr clstr, const AjPStr localestr);
ajint         ajSysExecPathC(const char* cl);
ajint         ajSysExecPathS(const AjPStr clstr);
ajint         ajSysExecEnvC(const char* cls, char * const env[]);
ajint         ajSysExecEnvS(const AjPStr clstr, char * const env[]);
ajint         ajSysExecProgArgEnvNowaitC(const char *prog, char * const arg[],
                                         char * const env[]);
ajint         ajSysExecProgArgEnvNowaitS(const AjPStr progstr,
                                         char * const arg[],
                                         char * const env[]);
ajint         ajSysExecOutnameC(const char* cl, const char* outfnametxt);
ajint         ajSysExecOutnameS(const AjPStr clstr, const AjPStr outfname);
ajint         ajSysExecOutnameAppendC(const char* cl,
                                      const char* outfnametxt);
ajint         ajSysExecOutnameAppendS(const AjPStr clstr,
                                      const AjPStr outfname);
ajint         ajSysExecOutnameErrC(const char* cl, const char* outfnametxt);
ajint         ajSysExecOutnameErrS(const AjPStr clstr, const AjPStr outfname);
ajint         ajSysExecOutnameErrAppendC(const char* cl,
                                         const char* outfnametxt);
ajint         ajSysExecOutnameErrAppendS(const AjPStr clstr,
                                         const AjPStr outfname);
void          ajSysSocketclose(struct AJSOCKET sock);

int           ajSysTimeoutSet(struct AJTIMEOUT *ts);
int           ajSysTimeoutUnset(struct AJTIMEOUT *ts);

AjPFile       ajSysCreateInpipeC(const char* commandtxt);
AjPFile       ajSysCreateInpipeS(const AjPStr command);
AjBool        ajSysExecRedirectC(const char *command, int **pipeto,
                                 int **pipefrom);

char          *ajSysGetHomedirFromName(const char *username);
char          *ajSysGetHomedir(void);

/*
** End of prototype definitions
*/


__deprecated void          ajSystem(const AjPStr cl);
__deprecated void          ajSystemEnv(const AjPStr cl, char * const env[]);
__deprecated void          ajSystemOut(const AjPStr cl, const AjPStr outfname);
__deprecated char         *ajSysStrdup(const char *s);
__deprecated char         *ajSysStrtok(const char *s, const char *t);
__deprecated char         *ajSysStrtokR(const char *s, const char *t,
					const char **ptrptr, AjPStr *buf);
__deprecated char         *ajSysFgets(char *buf, int size, FILE *fp);
__deprecated FILE         *ajSysFopen(const char *name, const char *flags);
__deprecated FILE         *ajSysFdopen(ajint filedes, const char *mode);
__deprecated AjBool        ajSysWhich(AjPStr *exefile);
__deprecated AjBool        ajSysWhichEnv(AjPStr *exefile, char * const env[]);
__deprecated void          ajSysBasename(AjPStr *filename);
__deprecated void          ajSysArgListFree (char*** arglist);
__deprecated AjBool        ajSysIsDirectory(const char *s);
__deprecated AjBool        ajSysIsRegular(const char *s);
__deprecated AjBool        ajSysArglist (const AjPStr cmdline,
					 char** Pname, char*** PParglist);
__deprecated AjBool        ajSysArglistBuild(const AjPStr cmdline,
                                             char** Pname, char*** PParglist);
__deprecated char          ajSysItoC(ajint v);
__deprecated unsigned char ajSysItoUC(ajint v);
__deprecated AjBool        ajSysUnlink(const AjPStr s);
__deprecated AjBool        ajSysFileUnlink(const AjPStr s);

__deprecated void          ajSysSystem(const AjPStr cl);
__deprecated void          ajSysSystemEnv(const AjPStr cl, char * const env[]);
__deprecated void          ajSysSystemOut(const AjPStr cl,
                                          const AjPStr outfname);
/*
** S_IFREG is non-ANSI therefore define it here
** At least keeps all the very dirty stuff in one place
*/

#ifndef S_IFREG
#define S_IFREG 0100000
#endif
#ifndef S_IFDIR
#define S_IFDIR 0x4000
#endif

#ifndef WIN32
#define AJ_FILE_REG S_IFREG
#define AJ_FILE_DIR S_IFDIR
#else
#define AJ_FILE_REG _S_IFREG
#define AJ_FILE_DIR _S_IFDIR
#endif

#endif

#ifdef __cplusplus
}
#endif