rhel 7
obsolete weakness #283

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

bltk/tools/bltk/main.c

Context:

The highlighted line of code below is the trigger point of this particular Red Hat Enterprise Linux 7 obsolete weakness.

 char info_log_fname[STR_LEN];
char warning_log_fname[STR_LEN];

char *procname = "main";
int work_output_type = OUTPUT_FILE;
int work_output_flg = 0;

void write_report_str(char *work_type, char *comment);
void form_log_head(void);
void handler(int sig);

char arg_cmdline[STR_LEN];

static void set_bltk_root(char *path);
static void create_version_file(char *wl_name, char *wl_version);
static void get_info(int no);

static int sig_abort_flg = 0;
static int sig_hup_flg = 0;
static int help_cnt = 0;
static int version_flg = 0;

void prog_sleep(unsigned int seconds)
{
	(void)usleep(seconds * MCSEC_IN_SEC);
}

static int prog_exit_flg = 0;

void prog_exit(int status)
{
	int st;

	if (prog_exit_flg) {
		return;
	}
	prog_exit_flg = 1;
	abort_flg = 1;

	if (!init_completed) {
		exit(status);	/* real exit */
	}

	prog_sleep(1);
	turn_off_stat_memory();

	if (parent_flg) {
		if (pid_stat_log != EMPTY_VALUE) {
			if (!sig_abort_flg || show_demo == 0) {
				debug("send SIGTERM to stat, pid %d", 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.