This file is indexed.

/usr/include/smbios_c/system_info.h is in libsmbios-dev 2.2.28-2.

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
// vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:
/*
 * Copyright (C) 2005 Dell Inc.
 *  by Michael Brown <Michael_E_Brown@dell.com>
 * Licensed under the Open Software License version 2.1
 *
 * Alternatively, 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.
 */


#ifndef C_SYSTEM_INFO_H
#define C_SYSTEM_INFO_H

// include smbios_c/compat.h first
#include "smbios_c/compat.h"
#include "smbios_c/types.h"

EXTERN_C_BEGIN;

/** Return a string representing the version of the libsmbios library.
 * This string is statically allocated in the library, so there is no need to
 * free it when done.
 */
LIBSMBIOS_C_DLL_SPEC const char * smbios_get_library_version_string();
//! Return a number representing the major version of the libsmbios library.
LIBSMBIOS_C_DLL_SPEC  int smbios_get_library_version_major();
//! Return a number representing the minor version of the libsmbios library.
LIBSMBIOS_C_DLL_SPEC int smbios_get_library_version_minor();


//! Return the Dell System ID Byte or Word
/** The Dell System ID is a unique number allocated to each Dell System
 * (server, desktop, workstation, or laptop) that uniquely identifies that
 * system within Dell's product line.
 *
 * This function always returns the Dell specific system ID for the system.
 * To get the OEM sytem id, see the next function
 */
LIBSMBIOS_C_DLL_SPEC  int  sysinfo_get_dell_system_id();


//! Return the Dell OEM System ID Byte or Word
/** The Dell System ID is a unique number allocated to each Dell System
 * (server, desktop, workstation, or laptop) that uniquely identifies that
 * system within Dell's product line.
 *
 * For systems manufactured by Dell and sold through other resellers as OEM
 * systems, they may assign a different system ID from the Dell system ID.
 * This function will always return the OEM ID, if present. If not present,
 * it will fall back to the Dell manufacturer ID.
 *
 * To see if a system is OEM, check:
 *      if (sysinfo_get_dell_oem_system_id() == sysinfo_get_dell_system_id())
 *          system_is_dell=1;
 *      else
 *          system_is_dell_oem=1;
 */
LIBSMBIOS_C_DLL_SPEC  int  sysinfo_get_dell_oem_system_id();

/** Return a buffer containing the system vendor name.
 * Return value *must* be de-allocated using sysinfo_string_free(), or memory
 * will leak.
 * @return pointer to buffer containing vendor name. Deallocate with
 * sysinfo_string_free() when done.
 */
LIBSMBIOS_C_DLL_SPEC char * sysinfo_get_vendor_name();

/** Return a buffer containing the system name.
 * Return value *must* be de-allocated using sysinfo_string_free(), or memory
 * will leak.
 * @return pointer to buffer containing system name. Deallocate with
 * sysinfo_string_free() when done.
 */
LIBSMBIOS_C_DLL_SPEC char * sysinfo_get_system_name();

/** Return a buffer containing the system bios version string.
 * Return value *must* be de-allocated using sysinfo_string_free(), or memory
 * will leak.
 * @return pointer to buffer containing system bios version string. Deallocate
 * with sysinfo_string_free() when done.
 */
LIBSMBIOS_C_DLL_SPEC char * sysinfo_get_bios_version();

/** Return a buffer containing the system asset tag string.
 * Return value *must* be de-allocated using sysinfo_string_free(), or memory
 * will leak.
 * @return pointer to buffer containing system asset tag string. Deallocate
 * with sysinfo_string_free() when done.
 */
LIBSMBIOS_C_DLL_SPEC char * sysinfo_get_asset_tag();

/** Return a buffer containing the system service tag string.
 * Return value *must* be de-allocated using sysinfo_string_free(), or memory
 * will leak.
 * @return pointer to buffer containing system service tag string. Deallocate
 * with sysinfo_string_free() when done.
 */
LIBSMBIOS_C_DLL_SPEC char * sysinfo_get_service_tag();

/** copy property ownership tag into user-supplied buffer.
 * Return value *must* be de-allocated using sysinfo_string_free(), or memory
 * will leak.
 * @return pointer to buffer containing system property ownership tag string.
 * Deallocate with sysinfo_string_free() when done.
 */
LIBSMBIOS_C_DLL_SPEC char * sysinfo_get_property_ownership_tag();

/** Set system property ownership tag
 * @param newTag buffer holding new tag
 * @param pass_ascii    password as ascii bytes
 * @param pass_scancode password as keyboard scancodes
 * @return  0 on success, -1 general failure, -2 bad password
 */
LIBSMBIOS_C_DLL_SPEC int sysinfo_set_property_ownership_tag(const char *newTag, const char *pass_ascii, const char *pass_scancode);

/** set the system asset tag.
 * Note some systems store password in ascii and some store keyboard scancodes. Thus you must pass both.
 * @param assetTag  null-terminated new asset tag string
 * @param pass_ascii password to use in ascii (can be null for no pass)
 * @param pass_scancode keyboard scancode values for password (can be null for no pass)
 * @return
 *   0 == success
 *  -1 == general failure
 *  -2 == password incorrect
 */
LIBSMBIOS_C_DLL_SPEC int sysinfo_set_asset_tag(const char *assetTag, const char *pass_ascii, const char *pass_scancode);

/** Returns string describing the last error condition.
 * Can return 0. The buffer used is guaranteed to be valid until the next call
 * to any sysinfo_* function. Copy the contents if you need it longer.
 */
LIBSMBIOS_C_DLL_SPEC const char * sysinfo_strerror();

/** Free string.
 * Use this function to deallocate the strings returned by other functions in
 * this header.
 */
LIBSMBIOS_C_DLL_SPEC  void sysinfo_string_free(void *);

// experimental functions
LIBSMBIOS_C_DLL_SPEC int sysinfo_has_nvram_state_bytes();
LIBSMBIOS_C_DLL_SPEC int sysinfo_get_nvram_state_bytes( int user );
LIBSMBIOS_C_DLL_SPEC void sysinfo_set_nvram_state_bytes(int value, int user);

LIBSMBIOS_C_DLL_SPEC int sysinfo_has_up_boot_flag();
LIBSMBIOS_C_DLL_SPEC int sysinfo_set_up_boot_flag(int state);
LIBSMBIOS_C_DLL_SPEC int sysinfo_get_up_boot_flag();

EXTERN_C_END;

#endif  /* SYSTEMINFO_H */