This file is indexed.

/usr/include/kdb.h is in libelektra-dev 0.7.1-1.

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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
/***************************************************************************
                kdb.h  -  Exported methods of the Library
                             -------------------
    begin                : Mon Dec 29 2003
    copyright            : (C) 2003 by Avi Alkalay
    copyright            : (C) 2008 by Markus Raab
    email                : avi@unix.sh, elektra@markus-raab.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the BSD License (revised).                      *
 *                                                                         *
 ***************************************************************************/

#ifndef KDB_H
#define KDB_H

#include "kdbos.h"

#define KDB_VERSION "0.7.1"
#define KDB_VERSION_MAJOR 0
#define KDB_VERSION_MINOR 7
#define KDB_VERSION_MICRO 1

#define KS_END ((Key*)0)

enum {
	KEY_TYPE_UNDEFINED=0,
	KEY_TYPE_BINARY=20,
	KEY_TYPE_STRING=40,
	KEY_TYPE_MAX=256
};

enum {
	KEY_END=0,
	KEY_NAME=1,
	KEY_VALUE=1<<1,
	KEY_OWNER=1<<2,
	KEY_COMMENT=1<<3,
	KEY_TYPE=1<<4,
	KEY_UID=1<<5,
	KEY_GID=1<<6,
	KEY_MODE=1<<7,
	KEY_ATIME=1<<8,
	KEY_MTIME=1<<9,
	KEY_CTIME=1<<10,
	KEY_SIZE=1<<11,
	KEY_REMOVE=1<<12,
	KEY_STAT=1<<13,
	KEY_DIR=1<<14
};

enum {
	KDB_O_NONE=0,
	KDB_O_DEL=1,
	KDB_O_POP=1<<1,
	KDB_O_NODIR=1<<2,
	KDB_O_DIRONLY=1<<3,
	KDB_O_NOSTAT=1<<4,
	KDB_O_STATONLY=1<<5,
	KDB_O_NOREMOVE=1<<6,
	KDB_O_REMOVEONLY=1<<7,
	KDB_O_INACTIVE=1<<8,
	KDB_O_SYNC=1<<9,
	KDB_O_SORT=1<<10,
	KDB_O_NORECURSIVE=1<<11,
	KDB_O_NOCASE=1<<12,
	KDB_O_WITHOWNER=1<<13,
	KDB_O_NOALL=1<<14
};


#ifdef __cplusplus
namespace ckdb {
extern "C" {
#endif


typedef struct _KDB	KDB;
typedef struct _Key	Key;
typedef struct _KeySet	KeySet;


/**************************************
 *
 * KDB methods
 *
 **************************************/

KDB * kdbOpen(void);
int kdbClose(KDB *handle);

ssize_t kdbGet(KDB *handle, KeySet *returned,
	Key * parentKey, option_t options);
ssize_t kdbSet(KDB *handle, KeySet *returned,
	Key * parentKey, option_t options);

ssize_t kdbGetByName(KDB *handle, KeySet *returned,
	const char *parentName, option_t options);

int kdbGetKey(KDB *handle, Key *key);
int kdbSetKey(KDB *handle, const Key *key);

int kdbGetString(KDB *handle, const char *keyname, char *returned,
	size_t maxSize);
int kdbSetString(KDB *handle, const char *keyname, const char *value);
int kdbRemove(KDB *handle, const char *keyname);


/**************************************
 *
 * Key methods
 *
 **************************************/

/* Basic Methods */
Key *keyNew(const char *keyname, ...);
Key *keyVNew(const char *keyname, va_list ap);

Key *keyDup(const Key *source);
int keyCopy(Key *dest, const Key *source);

int keyDel(Key *key);

ssize_t keyIncRef(Key *key);
ssize_t keyDecRef(Key *key);
ssize_t keyGetRef(const Key *key);

/* Meta Info */
int keyStat(Key *key);
int keyRemove(Key *key);

uid_t keyGetUID(const Key *key);
int keySetUID(Key *key, uid_t uid);

gid_t keyGetGID(const Key *key);
int keySetGID(Key *key, gid_t gid);

int keySetDir(Key *key);
mode_t keyGetMode(const Key *key);
int keySetMode(Key *key, mode_t mode);

type_t keyGetType(const Key *key);
int keySetType(Key *key, type_t type);

time_t keyGetATime(const Key *key);
int keySetATime(Key *key, time_t atime);

time_t keyGetMTime(const Key *key);
int keySetMTime(Key *key, time_t mtime);

time_t keyGetCTime(const Key *key);
int keySetCTime(Key *key, time_t ctime);

/* Methods for Making Tests */
int keyNeedStat(const Key *key);
int keyNeedSync(const Key *key);
int keyNeedRemove(const Key *key);

int keyIsSystem(const Key *key);
int keyIsUser(const Key *key);

int keyIsBelow(const Key *key, const Key *check);
int keyIsDirectBelow(const Key *key, const Key *check);

int keyIsInactive(const Key *key);

int keyIsDir(const Key *key);
int keyIsBinary(const Key *key);
int keyIsString(const Key *key);

/* Name Manipulation Methods */
const char *keyName(const Key *key);
ssize_t keyGetNameSize(const Key *key);
ssize_t keyGetName(const Key *key, char *returnedName, size_t maxSize);
ssize_t keySetName(Key *key, const char *newname);

ssize_t keyGetFullNameSize(const Key *key);
ssize_t keyGetFullName(const Key *key, char *returnedName, size_t maxSize);

const char *keyBaseName(const Key *key);
ssize_t keyGetBaseNameSize(const Key *key);
ssize_t keyGetBaseName(const Key *key, char *returned, size_t maxSize);
ssize_t keyAddBaseName(Key *key,const char *baseName);
ssize_t keySetBaseName(Key *key,const char *baseName);

const char *keyOwner(const Key *key);
ssize_t keyGetOwnerSize(const Key *key);
ssize_t keyGetOwner(const Key *key, char *returned, size_t maxSize);
ssize_t keySetOwner(Key *key, const char *owner);

/* Value Manipulation Methods */
const void *keyValue(const Key *key);
ssize_t keyGetValueSize(const Key *key);

ssize_t keyGetString(const Key *key, char *returnedString, size_t maxSize);
ssize_t keySetString(Key *key, const char *newString);

ssize_t keyGetBinary(const Key *key, void *returnedBinary, size_t maxSize);
ssize_t keySetBinary(Key *key, const void *newBinary, size_t dataSize);

const char *keyComment(const Key *key);
ssize_t keyGetCommentSize(const Key *key);
ssize_t keyGetComment(const Key *key, char *returnedDesc, size_t maxSize);
ssize_t keySetComment(Key *key, const char *newDesc);



/**************************************
 *
 * KeySet methods
 *
 **************************************/

KeySet *ksNew(size_t alloc, ...);
KeySet *ksVNew(size_t alloc, va_list ap);

KeySet *ksDup(const KeySet * source);
int ksCopy(KeySet *dest, const KeySet *source);

int ksDel(KeySet *ks);

void ksSort(KeySet *ks);

ssize_t ksGetSize(const KeySet *ks);

ssize_t ksAppendKey(KeySet *ks, Key *toAppend);
ssize_t ksAppend(KeySet *ks, const KeySet *toAppend);

Key *ksPop(KeySet *ks);

int ksRewind(KeySet *ks);
Key *ksNext(KeySet *ks);
Key *ksCurrent(const KeySet *ks);

Key *ksHead(const KeySet *ks);
Key *ksTail(const KeySet *ks);

cursor_t ksGetCursor(const KeySet *ks);
int ksSetCursor(KeySet *ks, cursor_t cursor);

Key *ksLookup(KeySet *ks, Key *k, option_t options);
Key *ksLookupByName(KeySet *ks, const char *name, option_t options);

#ifdef __cplusplus
}
}
#endif


#endif /* KDB_H */