input stringlengths 28 169k | output stringlengths 20 317k |
|---|---|
static
_Bool
have_same_content (int a_fd, int b_fd)
{
enum { CMP_BLOCK_SIZE = 4096 };
static char a_buff[CMP_BLOCK_SIZE];
static char b_buff[CMP_BLOCK_SIZE];
size_t size;
while (0 < (size = full_read (a_fd, a_buff, sizeof a_buff))) {
if (size != full_read (b_fd, b_buff, sizeof b_buff))
return
0
;
if (memcmp (a_buff, b_buff, size) != 0)
return
0
;
}
return size == 0;
}
| undefined8 have_same_content(undefined4 param_1,undefined4 param_2)
{
int iVar1;
size_t sVar2;
size_t __n;
while( true ) {
__n = full_read(param_1,a_buff_6846,0x1000);
if (__n == 0) {
return 1;
}
sVar2 = full_read(param_2,b_buff_6847,0x1000);
if (__n != sVar2) break;
iVar1 = memcmp(a_buff_6846,b_buff_6847,__n);
if (iVar1 != 0) {
return 0;
}
}
return 0;
}
|
WORD_LIST *
expand_word (word, quoted)
WORD_DESC *word;
int quoted;
{
WORD_LIST *result, *tresult;
tresult = call_expand_word_internal (word, quoted, 0, (int *)
((void *)0)
, (int *)
((void *)0)
);
result = word_list_split (tresult);
dispose_words (tresult);
return (result ? dequote_list (result) : result);
}
| long ** expand_word(_QWORD *a1, unsigned int a2)
{
long **v3;
long **v4;
v3 = call_expand_word_internal(a1, a2, 0, 0LL, 0LL);
v4 = (long **)word_list_split(v3);
dispose_words(v3);
if ( v4 )
return dequote_list(v4);
else
return 0LL;
}
|
static void encap_type_usage(void)
{
int i;
fprintf(
stderr
, "Usage: ip route ... encap TYPE [ OPTIONS ] [...]\n");
for (i = 1; i <= (__LWTUNNEL_ENCAP_MAX - 1); i++)
fprintf(
stderr
, "%s %s\n", format_encap_type(i),
i == 1 ? "TYPE := " : " ");
exit(-1);
}
| void encap_type_usage()
{
const char *v0;
const char *v1;
int i;
fprintf(stderr, "Usage: ip route ... encap TYPE [ OPTIONS ] [...]\n");
for ( i = 1; i <= 9; ++i )
{
if ( i == 1 )
v0 = "TYPE := ";
else
v0 = " ";
v1 = format_encap_type(i);
fprintf(stderr, "%s %s\n", v1, v0);
}
exit(-1);
}
|
tty_stty(EditLine *el, int argc __attribute__((__unused__)),
const wchar_t **argv)
{
const ttymodes_t *m;
char x;
int aflag = 0;
const wchar_t *s, *d;
char name[((size_t)1024)];
struct termios *tios = &el->el_tty.t_ex;
int z = 0;
if (argv ==
((void *)0)
)
return -1;
strlcpy(name, ct_encode_string(*argv++, &el->el_scratch), sizeof(name));
while (argv && *argv && argv[0][0] == '-' && argv[0][2] == '\0')
switch (argv[0][1]) {
case 'a':
aflag++;
argv++;
break;
case 'd':
argv++;
tios = &el->el_tty.t_ed;
z = 1;
break;
case 'x':
argv++;
tios = &el->el_tty.t_ex;
z = 0;
break;
case 'q':
argv++;
tios = &el->el_tty.t_ts;
z = 2;
break;
default:
(void) fprintf(el->el_errfile,
"%s: Unknown switch `%lc'.\n",
name, (wint_t)argv[0][1]);
return -1;
}
if (!argv || !*argv) {
int i = -1;
size_t len = 0, st = 0, cu;
for (m = ttymodes; m->m_name; m++) {
if (m->m_type != i) {
(void) fprintf(el->el_outfile, "%s%s",
i != -1 ? "\n" : "",
el->el_tty.t_t[z][m->m_type].t_name);
i = m->m_type;
st = len =
strlen(el->el_tty.t_t[z][m->m_type].t_name);
}
if (i != -1) {
x = (el->el_tty.t_t[z][i].t_setmask & m->m_value)
? '+' : '\0';
if (el->el_tty.t_t[z][i].t_clrmask & m->m_value)
x = '-';
} else {
x = '\0';
}
if (x != '\0' || aflag) {
cu = strlen(m->m_name) + (x != '\0') + 1;
if (len + cu >=
(size_t)el->el_terminal.t_size.h) {
(void) fprintf(el->el_outfile, "\n%*s",
(int)st, "");
len = st + cu;
} else
len += cu;
if (x != '\0')
(void) fprintf(el->el_outfile, "%c%s ",
x, m->m_name);
else
(void) fprintf(el->el_outfile, "%s ",
m->m_name);
}
}
(void) fprintf(el->el_outfile, "\n");
return 0;
}
while (argv && (s = *argv++)) {
const wchar_t *p;
switch (*s) {
case '+':
case '-':
x = (char)*s++;
break;
default:
x = '\0';
break;
}
d = s;
p = wcschr(s, L'=');
for (m = ttymodes; m->m_name; m++)
if ((p ? strncmp(m->m_name, ct_encode_string(d,
&el->el_scratch), (size_t)(p - d)) :
strcmp(m->m_name, ct_encode_string(d,
&el->el_scratch))) == 0 &&
(p ==
((void *)0)
|| m->m_type == 4))
break;
if (!m->m_name) {
(void) fprintf(el->el_errfile,
"%s: Invalid argument `%ls'.\n", name, d);
return -1;
}
if (p) {
int c = ffs((int)m->m_value);
int v = *++p ? parse__escape(&p) :
el->el_tty.t_vdisable;
((void) sizeof ((
c != 0
) ? 1 : 0), __extension__ ({ if (
c != 0
) ; else __assert_fail (
"c != 0"
, "tty.c", 1271, __extension__ __PRETTY_FUNCTION__); }))
;
c--;
c = tty__getcharindex(c);
((void) sizeof ((
c != -1
) ? 1 : 0), __extension__ ({ if (
c != -1
) ; else __assert_fail (
"c != -1"
, "tty.c", 1274, __extension__ __PRETTY_FUNCTION__); }))
;
tios->c_cc[c] = (cc_t)v;
continue;
}
switch (x) {
case '+':
el->el_tty.t_t[z][m->m_type].t_setmask |= m->m_value;
el->el_tty.t_t[z][m->m_type].t_clrmask &= ~m->m_value;
break;
case '-':
el->el_tty.t_t[z][m->m_type].t_setmask &= ~m->m_value;
el->el_tty.t_t[z][m->m_type].t_clrmask |= m->m_value;
break;
default:
el->el_tty.t_t[z][m->m_type].t_setmask &= ~m->m_value;
el->el_tty.t_t[z][m->m_type].t_clrmask &= ~m->m_value;
break;
}
}
tty_setup_flags(el, tios, z);
if (el->el_tty.t_mode == z) {
if (tty_setty(el,
1
, tios) == -1) {
return -1;
}
}
return 0;
}
| long long tty_stty(void* a0, unsigned long a1, unsigned long a2) {
unsigned int *v0[3];
int tmp_15;
int tmp_11;
int tmp_7;
unsigned int v1;
struct_3 *v2;
char v3;
unsigned int v4;
unsigned int v5;
unsigned int v6;
unsigned int v7;
unsigned int v8;
unsigned int *v9;
unsigned long long v10;
unsigned int v11[3];
unsigned long v12;
void* v13;
void* v14;
unsigned int v15[3];
unsigned long v16;
char v17;
unsigned long long v19;
unsigned long long v20;
unsigned long v22;
unsigned long long v23;
v2 = a0;
v1 = a1;
v0 = a2;
v4 = 0;
v12 = &v2->padding_94[436];
v5 = 0;
if (!v0) {
v19 = 4294967295;
} else {
tmp_15 = v0;
v20 = v0 + 1;
v0 = &v0[1];
v22 = ct_encode_string(*(tmp_15), &v2[1].padding_94[330], &v2[1].padding_94[330], v20);
strlcpy(&v17, v22, 0x400, v22);
while (true) {
if (v0 && *(v0) && (*(v0))[0] == 45 && !(*(v0))[2]) {
if ((*(v0))[1] != 120) {
if ((*(v0))[1] <= 120) {
if ((*(v0))[1] == 113) {
v0 = &v0[1];
v12 = &v2->padding_94[556];
v5 = 2;
continue;
} else if ((*(v0))[1] <= 113) {
if ((*(v0))[1] == 97) {
v4 += 1;
v0 = &v0[1];
continue;
}
if ((*(v0))[1] == 100) {
v0 = &v0[1];
v12 = &v2->padding_94[496];
v5 = 1;
continue;
}
}
}
if ((*(v0))[1] > 120 || (*(v0))[1] > 113 && (*(v0))[1] != 113 || (*(v0))[1] != 113 && (*(v0))[1] != 100 && (*(v0))[1] != 97) {
fprintf(v2->field_18, "%s: Unknown switch `%lc'.\n", &v17);
v19 = 4294967295;
break;
}
} else {
v0 = &v0[1];
v12 = &v2->padding_94[436];
v5 = 0;
continue;
}
}
if (!*(v0) || !v0 || (*(v0))[2] || (*(v0))[0] != 45) {
if (v0 && *(v0)) {
while (true) {
if (v0) {
tmp_11 = v0;
v0 += 1;
*(&v11[0]) = *(tmp_11);
if (v11) {
if (v11[0] != 43 && v11[0] != 45)
v3 = 0;
if (v11[0] == 43 || v11[0] == 45) {
tmp_7 = v11;
*(&v11[0]) = &v11[1];
*(&v22) = *(tmp_7);
v3 = v22;
}
*(&v15[0]) = v11;
v9 = wcschr(v11, 0x3d);
for (v10 = &ttymodes; *(v10); v10 += 16) {
if (v9)
*(&v22) = !strncmp(*(v10), ct_encode_string(v15, &v2[1].padding_94[330], &v2[1].padding_94[330], v20), v9 + -0x1 * v15 >> 2);
else
*(&v22) = !strcmp(*(v10), ct_encode_string(v15, &v2[1].padding_94[330], &v2[1].padding_94[330], v20));
if (v22) {
if (!v9)
break;
if (v9) {
if (*((v10 + 12)) == 4)
break;
}
}
}
if (!*(v10)) {
fprintf(v2->field_18, "%s: Invalid argument `%ls'.\n", &v17);
v19 = 4294967295;
break;
} else if (v9) {
v7 = ffs(*((v10 + 8)));
v9 += 4;
if (*(v9))
v22 = parse__escape(&v9);
else
*(&v22) = v2->field_309;
v8 = v22;
if (!v7)
__assert_fail();
v7 -= 1;
v7 = tty__getcharindex(v7);
if (v7 == -1)
__assert_fail();
*(17 + v12 + v7) = v8;
continue;
} else if (v3 == 43) {
*(&v2->padding_94[68 + 80 * v5 + 16 * *((v10 + 12))]) = *(&v2->padding_94[68 + 80 * v5 + 16 * *((v10 + 12))]) | *((v10 + 8));
*(&v2->padding_94[72 + 80 * v5 + 16 * *((v10 + 12))]) = !(*((v10 + 8))) & *(&v2->padding_94[72 + 80 * v5 + 16 * *((v10 + 12))]);
continue;
} else if (v3 == 45) {
*(&v2->padding_94[68 + 80 * v5 + 16 * *((v10 + 12))]) = !(*((v10 + 8))) & *(&v2->padding_94[68 + 80 * v5 + 16 * *((v10 + 12))]);
*(&v2->padding_94[72 + 80 * v5 + 16 * *((v10 + 12))]) = *(&v2->padding_94[72 + 80 * v5 + 16 * *((v10 + 12))]) | *((v10 + 8));
continue;
} else {
*(&v2->padding_94[68 + 80 * v5 + 16 * *((v10 + 12))]) = !(*((v10 + 8))) & *(&v2->padding_94[68 + 80 * v5 + 16 * *((v10 + 12))]);
*(&v2->padding_94[72 + 80 * v5 + 16 * *((v10 + 12))]) = !(*((v10 + 8))) & *(&v2->padding_94[72 + 80 * v5 + 16 * *((v10 + 12))]);
continue;
}
}
}
if (!v0 || !v11) {
tty_setup_flags(v2, v12, v5);
if (v5 == v2->field_308) {
v23 = tty_setty(v2, 0x1, v12);
if (v23 == -1) {
v19 = 4294967295;
break;
}
}
if (v23 != -1 || v5 != v2->field_308) {
v19 = 0;
break;
}
}
}
}
if (!v0 || !*(v0)) {
v6 = -1;
v13 = 0;
v14 = 0;
for (v10 = &ttymodes; *(v10); v10 += 16) {
if (v6 != *((v10 + 12))) {
if (v6 != -1)
*(&v22) = "\n";
else
*(&v22) = &g_4022cd;
fprintf(v2->field_10, "%s%s", v22, *(&v2->padding_94[60 + 80 * v5 + 16 * *((v10 + 12))]));
v6 = *((v10 + 12));
v13 = strlen(*(&v2->padding_94[60 + 80 * v5 + 16 * *((v10 + 12))]));
v14 = v13;
}
if (v6 != -1) {
if ((*((v10 + 8)) & *(&v2->padding_94[68 + 64 * v5 + 16 * v6 + 16 * v5])))
*(&v22) = 43;
else
*(&v22) = 0;
v3 = v22;
if ((*((v10 + 8)) & *(&v2->padding_94[72 + 64 * v5 + 16 * v6 + 16 * v5])))
v3 = 45;
} else {
v3 = 0;
}
if (v4 || v3) {
v16 = strlen(*(v10)) + (v3) + 1;
if (v13 + v16 >= v2->field_90) {
fprintf(v2->field_10, "\n%*s");
v13 = v16 + v14;
} else {
v13 += v16;
}
if (v3)
fprintf(v2->field_10, "%c%s ", v3, *(v10));
else
fprintf(v2->field_10, "%s ", *(v10));
}
}
fprintf(v2->field_10, "\n");
v19 = 0;
break;
}
}
}
}
return v19;
}
|
int
main (int argc, char **argv)
{
char const *error_message;
int optc;
_Bool
ok;
size_t half_buffer_size;
static char const *const default_file_list[] = {"-",
((void *)0)
};
char const *const *file;
;
set_program_name (argv[0]);
setlocale (
6
, "");
bindtextdomain ("coreutils", "/usr/local/share/locale");
textdomain ("coreutils");
atexit (close_stdout);
separator = "\n";
sentinel_length = 1;
separator_ends_record =
1
;
while ((optc = getopt_long (argc, argv, "brs:", longopts,
((void *)0)
)) != -1)
{
switch (optc)
{
case 'b':
separator_ends_record =
0
;
break;
case 'r':
sentinel_length = 0;
break;
case 's':
separator = optarg;
break;
case GETOPT_HELP_CHAR: usage (
0
); break;;
case GETOPT_VERSION_CHAR: version_etc (
stdout
, "tac", "GNU coreutils", Version, ("Jay Lepreau"), ("David MacKenzie"), (char *)
((void *)0)
); exit (
0
); break;;
default:
usage (
1
);
}
}
if (sentinel_length == 0)
{
if (*separator == 0)
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, gettext (\"separator cannot be empty\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, gettext ("separator cannot be empty")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, gettext ("separator cannot be empty")), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
compiled_separator.buffer =
((void *)0)
;
compiled_separator.allocated = 0;
compiled_separator.fastmap = compiled_separator_fastmap;
compiled_separator.translate =
((void *)0)
;
error_message = re_compile_pattern (separator, strlen (separator),
&compiled_separator);
if (error_message)
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, "%s", (error_message)), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, "%s", (error_message)), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
}
else
match_length = sentinel_length = *separator ? strlen (separator) : 1;
read_size = 8192;
while (sentinel_length >= read_size / 2)
{
if (
(18446744073709551615UL)
/ 2 < read_size)
xalloc_die ();
read_size *= 2;
}
half_buffer_size = read_size + sentinel_length + 1;
G_buffer_size = 2 * half_buffer_size;
if (! (read_size < half_buffer_size && half_buffer_size < G_buffer_size))
xalloc_die ();
G_buffer = xmalloc (G_buffer_size);
if (sentinel_length)
{
memcpy (G_buffer, separator, sentinel_length + 1);
G_buffer += sentinel_length;
}
else
{
++G_buffer;
}
file = (optind < argc
? (char const *const *) &argv[optind]
: default_file_list);
xset_binary_mode (
1
,
0
);
{
ok =
1
;
for (size_t i = 0; file[i]; ++i)
ok &= tac_file (file[i]);
}
output ((char *)
((void *)0)
, (char *)
((void *)0)
);
if (have_read_stdin && close (
0
) < 0)
{
error (0,
(*__errno_location ())
, "-");
ok =
0
;
}
return ok ?
0
:
1
;
}
| int main(unsigned long a0, unsigned long long *a1) {
void* v0;
char v1;
unsigned int v2;
void* v3;
unsigned long v4;
unsigned long long v5;
unsigned long long v6;
unsigned long long v8;
unsigned long long v9;
unsigned long long v10;
set_program_name(*(a1));
setlocale(0x6, &g_403b2b);
bindtextdomain("coreutils", "/usr/local/share/locale");
textdomain("coreutils");
atexit(got.close_stdout);
separator = "\n";
sentinel_length = 1;
separator_ends_record = 1;
while (true) {
v2 = getopt_long(a0, a1, "brs:", &longopts, NULL);
if (v2 != -1) {
if (v2 != 115) {
if (v2 <= 115) {
if (v2 == 114) {
sentinel_length = 0;
continue;
} else if (v2 <= 114) {
if (v2 == 98) {
separator_ends_record = 0;
continue;
} else if (v2 <= 98) {
if (v2 == -131) {
v0 = 0;
version_etc(stdout, "tac", "GNU coreutils", Version, "Jay Lepreau", "David MacKenzie");
exit(0x0);
}
if (v2 == -130)
usage(0x0);
}
}
}
if (v2 > 115 || v2 != 114 && v2 > 114 || v2 > 98 && v2 != 114 && v2 != 98 || v2 != 114 && v2 != -130 && v2 != 98 && v2 != -131)
usage(0x1);
} else {
separator = optarg;
}
} else {
if (sentinel_length) {
if (*(separator))
v9 = strlen(separator);
else
v9 = 1;
sentinel_length = v9;
match_length = sentinel_length;
break;
} else if (!*(separator)) {
error(0x1, 0x0, gettext("separator cannot be empty"));
} else {
compiled_separator = 0;
g_401808 = 0;
g_401820 = &compiled_separator_fastmap;
g_401828 = 0;
v8 = strlen(separator);
v4 = re_compile_pattern(separator, v8, &compiled_separator, v8);
if (!v4)
break;
if (v4)
error(0x1, 0x0, "%s");
}
}
}
for (read_size = 0x2000; read_size >> 1 <= sentinel_length; read_size = read_size * 2) {
if (read_size < 0)
xalloc_die();
}
v5 = sentinel_length + read_size + 1;
G_buffer_size = v5 * 2;
if (v5 > read_size && v5 < G_buffer_size) {
G_buffer = xmalloc(G_buffer_size);
if (sentinel_length) {
memcpy(G_buffer, separator, sentinel_length + 1);
G_buffer = sentinel_length + G_buffer;
} else {
G_buffer = G_buffer + 1;
}
if (a0 > optind)
v10 = &a1[optind];
else
v10 = &default_file_list.5987;
v6 = v10;
xset_binary_mode(0x1, 0x0);
v1 = 1;
for (v3 = 0; *((v6 + (v3 << 3))); v3 += 1) {
v1 = (tac_file(*((v6 + (v3 << 3))), 0x0, v3 << 3) & v1);
}
output(NULL, 0x0);
if (have_read_stdin && close(0x0) < 0) {
error(0x0, *(__errno_location()), "-");
v1 = 0;
}
return v1 ^ 1;
}
if (v5 <= read_size || v5 >= G_buffer_size)
xalloc_die();
}
|
static void
reap_exited (void)
{
while (0 < nprocs && reap (0))
continue;
}
| void reap_exited() {
unsigned long long v1;
while (true) {
v1 = nprocs;
if (nprocs <= 0)
break;
if (!reap(0x0))
break;
}
return;
}
|
static void
check_punctuation (WORD *w)
{
char const *start = w->text;
char const *finish = start + (w->length - 1);
unsigned char fin = *finish;
w->paren = (strchr ("(['`\"", *start) !=
((void *)0)
);
w->punct = !!
((*__ctype_b_loc ())[(int) ((
fin
))] & (unsigned short int) _ISpunct)
;
while (start < finish && (strchr (")]'\"", *finish) !=
((void *)0)
))
finish--;
w->period = (strchr (".?!", *finish) !=
((void *)0)
);
}
| void check_punctuation(byte **param_1)
{
byte bVar1;
byte *pbVar2;
char *pcVar3;
ushort **ppuVar4;
byte *local_18;
pbVar2 = *param_1;
local_18 = pbVar2 + (long)*(int *)(param_1 + 1) + -1;
bVar1 = *local_18;
pcVar3 = strchr("([\'`\"",(int)(char)*pbVar2);
*(byte *)(param_1 + 2) = *(byte *)(param_1 + 2) & 0xfe | pcVar3 != (char *)0x0;
ppuVar4 = __ctype_b_loc();
*(byte *)(param_1 + 2) = *(byte *)(param_1 + 2) & 0xfb | (((*ppuVar4)[bVar1] & 4) != 0) * '\x04';
for (; pbVar2 < local_18; local_18 = local_18 + -1) {
pcVar3 = strchr(")]\'\"",(int)(char)*local_18);
if (pcVar3 == (char *)0x0) break;
}
pcVar3 = strchr(".?!",(int)(char)*local_18);
*(byte *)(param_1 + 2) = *(byte *)(param_1 + 2) & 0xfd | (pcVar3 != (char *)0x0) * '\x02';
return;
}
|
int
EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len)
{
if (ctx ==
((void *)0)
)
return 0;
if (
EVP_CIPHER_CTX_get_iv_length
(ctx) < 0)
return 0;
if (len != (size_t)
EVP_CIPHER_CTX_get_iv_length
(ctx))
return 0;
if (len >
16
)
return 0;
if (len != 0) {
if (iv ==
((void *)0)
)
return 0;
memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), iv, len);
}
return 1;
}
| long long EVP_CIPHER_CTX_set_iv(unsigned long long a0, void* a1, unsigned int a2) {
unsigned long long v1;
if (!a0) {
v1 = 0;
} else if (EVP_CIPHER_CTX_get_iv_length(a0) < 0) {
v1 = 0;
} else if (a2 != EVP_CIPHER_CTX_get_iv_length(a0)) {
v1 = 0;
} else if (a2 > 16) {
v1 = 0;
} else {
if (a2) {
if (!a1)
v1 = 0;
else
memcpy(EVP_CIPHER_CTX_iv_noconst(a0), a1, a2);
}
if (!a2 || a1)
v1 = 1;
}
return v1;
}
|
static void
ipstats_stat_desc_pack_l3_stats(struct ipstats_stat_dump_filters *filters,
const struct ipstats_stat_desc *desc)
{
ipstats_stat_desc_enable_bit(filters,
IFLA_STATS_LINK_OFFLOAD_XSTATS,
IFLA_OFFLOAD_XSTATS_L3_STATS);
ipstats_stat_desc_enable_bit(filters,
IFLA_STATS_LINK_OFFLOAD_XSTATS,
IFLA_OFFLOAD_XSTATS_HW_S_INFO);
}
| _DWORD * ipstats_stat_desc_pack_l3_stats(_DWORD *a1)
{
ipstats_stat_desc_enable_bit(a1, 4, 3);
return ipstats_stat_desc_enable_bit(a1, 4, 2);
}
|
int
main (int argc, char **argv)
{
int n_files;
size_t i;
int l_c_m;
size_t desired_width ;
_Bool
modern =
0
;
_Bool
width_specified =
0
;
_Bool
ok =
1
;
size_t width_per_block = 0;
static char const multipliers[] = "bEGKkMmPTYZ0";
uintmax_t pseudo_start ;
;
set_program_name (argv[0]);
setlocale (
6
, "");
bindtextdomain ("coreutils", "/usr/local/share/locale");
textdomain ("coreutils");
atexit (close_stdout);
for (i = 0; i <= sizeof (unsigned_long_long_int); i++)
integral_type_size[i] = NO_SIZE;
integral_type_size[sizeof (char)] = CHAR;
integral_type_size[sizeof (short int)] = SHORT;
integral_type_size[sizeof (int)] = INT;
integral_type_size[sizeof (long int)] = LONG;
integral_type_size[sizeof (unsigned_long_long_int)] = LONG_LONG;
for (i = 0; i <= sizeof (long double); i++)
fp_type_size[i] = NO_SIZE;
fp_type_size[sizeof (float)] = FLOAT_SINGLE;
fp_type_size[sizeof (long double)] = FLOAT_LONG_DOUBLE;
fp_type_size[sizeof (double)] = FLOAT_DOUBLE;
n_specs = 0;
n_specs_allocated = 0;
spec =
((void *)0)
;
format_address = format_address_std;
address_base = 8;
address_pad_len = 7;
flag_dump_strings =
0
;
while (
1
)
{
uintmax_t tmp;
enum strtol_error s_err;
int oi = -1;
int c = getopt_long (argc, argv, short_options, long_options, &oi);
if (c == -1)
break;
switch (c)
{
case 'A':
modern =
1
;
switch (optarg[0])
{
case 'd':
format_address = format_address_std;
address_base = 10;
address_pad_len = 7;
break;
case 'o':
format_address = format_address_std;
address_base = 8;
address_pad_len = 7;
break;
case 'x':
format_address = format_address_std;
address_base = 16;
address_pad_len = 6;
break;
case 'n':
format_address = format_address_none;
address_pad_len = 0;
break;
default:
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, gettext (\"invalid output address radix '%c'; it must be one character from [doxn]\"), optarg[0]), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, gettext ("invalid output address radix '%c'; it must be one character from [doxn]"), optarg[0]), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, gettext ("invalid output address radix '%c'; it must be one character from [doxn]"), optarg[0]), ((
0
) ? (void) 0 : __builtin_unreachable ()))))
;
break;
}
break;
case 'j':
modern =
1
;
s_err = xstrtoumax (optarg,
((void *)0)
, 0, &n_bytes_to_skip, multipliers);
if (s_err != LONGINT_OK)
xstrtol_fatal (s_err, oi, c, long_options, optarg);
break;
case 'N':
modern =
1
;
limit_bytes_to_format =
1
;
s_err = xstrtoumax (optarg,
((void *)0)
, 0, &max_bytes_to_format,
multipliers);
if (s_err != LONGINT_OK)
xstrtol_fatal (s_err, oi, c, long_options, optarg);
break;
case 'S':
modern =
1
;
if (optarg ==
((void *)0)
)
string_min = 3;
else
{
s_err = xstrtoumax (optarg,
((void *)0)
, 0, &tmp, multipliers);
if (s_err != LONGINT_OK)
xstrtol_fatal (s_err, oi, c, long_options, optarg);
if (
(18446744073709551615UL)
< tmp)
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, gettext (\"%s is too large\"), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, gettext ("%s is too large"), quote (optarg)), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, gettext ("%s is too large"), quote (optarg)), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
string_min = tmp;
}
flag_dump_strings =
1
;
break;
case 't':
modern =
1
;
ok &= decode_format_string (optarg);
break;
case 'v':
modern =
1
;
abbreviate_duplicate_blocks =
0
;
break;
case TRADITIONAL_OPTION:
traditional =
1
;
break;
case ENDIAN_OPTION:
switch (((endian_types) [__xargmatch_internal ("--endian", optarg, endian_args, (void const *) (endian_types), sizeof *(endian_types), argmatch_die,
1
)]))
{
case endian_big:
input_swap = ! 0;
break;
case endian_little:
input_swap = 0;
break;
}
break;
case 'a': ok &= decode_format_string ("a"); break;
case 'b': ok &= decode_format_string ("o1"); break;
case 'c': ok &= decode_format_string ("c"); break;
case 'D': ok &= decode_format_string ("u4"); break;
case 'd': ok &= decode_format_string ("u2"); break;
case 'F':
case 'e': ok &= decode_format_string ("fD"); break;
case 'f': ok &= decode_format_string ("fF"); break;
case 'X':
case 'H': ok &= decode_format_string ("x4"); break;
case 'i': ok &= decode_format_string ("dI"); break;
case 'I': case 'L':
case 'l': ok &= decode_format_string ("dL"); break;
case 'O': ok &= decode_format_string ("o4"); break;
case 'B':
case 'o': ok &= decode_format_string ("o2"); break;
case 's': ok &= decode_format_string ("d2"); break;
case 'h':
case 'x': ok &= decode_format_string ("x2"); break;
case 'w':
modern =
1
;
width_specified =
1
;
if (optarg ==
((void *)0)
)
{
desired_width = 32;
}
else
{
uintmax_t w_tmp;
s_err = xstrtoumax (optarg,
((void *)0)
, 10, &w_tmp, "");
if (s_err != LONGINT_OK)
xstrtol_fatal (s_err, oi, c, long_options, optarg);
if (
(18446744073709551615UL)
< w_tmp)
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, gettext (\"%s is too large\"), quote (optarg)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, gettext ("%s is too large"), quote (optarg)), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, gettext ("%s is too large"), quote (optarg)), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
desired_width = w_tmp;
}
break;
case GETOPT_HELP_CHAR: usage (
0
); break;;
case GETOPT_VERSION_CHAR: version_etc (
stdout
, "od", "GNU coreutils", Version, ("Jim Meyering"), (char *)
((void *)0)
); exit (
0
); break;;
default:
usage (
1
);
break;
}
}
if (!ok)
return
1
;
if (flag_dump_strings && n_specs > 0)
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, gettext (\"no type may be specified when dumping strings\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, gettext ("no type may be specified when dumping strings")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, gettext ("no type may be specified when dumping strings")), ((
0
) ? (void) 0 : __builtin_unreachable ()))))
;
n_files = argc - optind;
if (!modern || traditional)
{
uintmax_t o1;
uintmax_t o2;
switch (n_files)
{
case 1:
if ((traditional || argv[optind][0] == '+')
&& parse_old_offset (argv[optind], &o1))
{
n_bytes_to_skip = o1;
--n_files;
++argv;
}
break;
case 2:
if ((traditional || argv[optind + 1][0] == '+'
|| ((unsigned int) (argv[optind + 1][0]) - '0' <= 9))
&& parse_old_offset (argv[optind + 1], &o2))
{
if (traditional && parse_old_offset (argv[optind], &o1))
{
n_bytes_to_skip = o1;
flag_pseudo_start =
1
;
pseudo_start = o2;
argv += 2;
n_files -= 2;
}
else
{
n_bytes_to_skip = o2;
--n_files;
argv[optind + 1] = argv[optind];
++argv;
}
}
break;
case 3:
if (traditional
&& parse_old_offset (argv[optind + 1], &o1)
&& parse_old_offset (argv[optind + 2], &o2))
{
n_bytes_to_skip = o1;
flag_pseudo_start =
1
;
pseudo_start = o2;
argv[optind + 2] = argv[optind];
argv += 2;
n_files -= 2;
}
break;
}
if (traditional && 1 < n_files)
{
error (0, 0, gettext ("extra operand %s"), quote (argv[optind + 1]));
error (0, 0, "%s",
gettext ("compatibility mode supports at most one file"));
usage (
1
);
}
}
if (flag_pseudo_start)
{
if (format_address == format_address_none)
{
address_base = 8;
address_pad_len = 7;
format_address = format_address_paren;
}
else
format_address = format_address_label;
}
if (limit_bytes_to_format)
{
end_offset = n_bytes_to_skip + max_bytes_to_format;
if (end_offset < n_bytes_to_skip)
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, 0, gettext (\"skip-bytes + read-bytes is too large\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
, 0, gettext ("skip-bytes + read-bytes is too large")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
, 0, gettext ("skip-bytes + read-bytes is too large")), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
}
if (n_specs == 0)
decode_format_string ("oS");
if (n_files > 0)
{
file_list = (char const *const *) &argv[optind];
}
else
{
file_list = default_file_list;
}
ok = open_next_file ();
if (in_stream ==
((void *)0)
)
goto cleanup;
ok &= skip (n_bytes_to_skip);
if (in_stream ==
((void *)0)
)
goto cleanup;
pseudo_offset = (flag_pseudo_start ? pseudo_start - n_bytes_to_skip : 0);
l_c_m = get_lcm ();
if (width_specified)
{
if (desired_width != 0 && desired_width % l_c_m == 0)
bytes_per_block = desired_width;
else
{
error (0, 0, gettext ("warning: invalid width %lu; using %d instead"),
(unsigned long int) desired_width, l_c_m);
bytes_per_block = l_c_m;
}
}
else
{
if (l_c_m < 16)
bytes_per_block = l_c_m * (16 / l_c_m);
else
bytes_per_block = l_c_m;
}
for (i = 0; i < n_specs; i++)
{
int fields_per_block = bytes_per_block / width_bytes[spec[i].size];
int block_width = (spec[i].field_width + 1) * fields_per_block;
if (width_per_block < block_width)
width_per_block = block_width;
}
for (i = 0; i < n_specs; i++)
{
int fields_per_block = bytes_per_block / width_bytes[spec[i].size];
int block_width = spec[i].field_width * fields_per_block;
spec[i].pad_width = width_per_block - block_width;
}
ok &= (flag_dump_strings ? dump_strings () : dump ());
cleanup:
if (have_read_stdin &&
rpl_fclose
(
stdin
) ==
(-1)
)
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), gettext (\"standard input\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
,
(*__errno_location ())
, gettext ("standard input")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
,
(*__errno_location ())
, gettext ("standard input")), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
return ok ?
0
:
1
;
}
| int main(int argc, const char **argv, const char **envp)
{
int v3;
unsigned int v4;
char *v5;
int v6;
char *v8;
long v9;
char *v10;
char *v11;
char *v12;
long v13;
char *v14;
char v15;
char *v16;
int *v17;
const char **argva;
char v19;
char v20;
bool v21;
unsigned char file;
int v23;
int v24;
unsigned int v25;
unsigned int v26;
unsigned int v27;
unsigned int v28;
int lcm;
int v30;
int longind[2];
size_t v32;
unsigned long i;
size_t v34;
unsigned long v35;
size_t v36;
unsigned long v37;
argva = argv;
v37 = __readfsqword(0x28u);
v19 = 0;
v20 = 0;
v21 = 1;
v35 = 0LL;
set_program_name(*argv, argv, envp);
setlocale(6, locale);
bindtextdomain("coreutils", "/usr/local/share/locale");
textdomain("coreutils");
atexit((void (*)(void))&close_stdout);
for ( i = 0LL; i <= 8; ++i )
integral_type_size[i] = 0;
dword_4344 = 1;
dword_4348 = 2;
dword_4350 = 3;
dword_4360 = 5;
for ( i = 0LL; i <= 0x10; ++i )
fp_type_size[i] = 0;
dword_4390 = 6;
dword_43C0 = 8;
dword_43A0 = 7;
n_specs = 0LL;
n_specs_allocated = 0LL;
spec = 0LL;
format_address = (long ( *)(_QWORD, _QWORD))format_address_std;
address_base = 8;
address_pad_len = 7;
flag_dump_strings = 0;
while ( 1 )
{
longind[0] = -1;
v24 = getopt_long(argc, (char *const *)argv, "A:aBbcDdeFfHhIij:LlN:OoS:st:vw_Xx", &long_options, longind);
if ( v24 == -1 )
break;
if ( v24 > 129 )
goto LABEL_67;
if ( v24 < 65 )
{
if ( v24 == -131 )
{
version_etc(stdout, "od", "GNU coreutils", Version, "Jim Meyering", 0LL);
exit(0);
}
if ( v24 == -130 )
usage(0);
LABEL_67:
usage(1);
}
switch ( v24 )
{
case 65:
v19 = 1;
v3 = *optarg;
if ( v3 == 120 )
{
format_address = (long ( *)(_QWORD, _QWORD))format_address_std;
address_base = 16;
address_pad_len = 6;
}
else
{
if ( v3 > 120 )
goto LABEL_28;
if ( v3 == 111 )
{
format_address = (long ( *)(_QWORD, _QWORD))format_address_std;
address_base = 8;
address_pad_len = 7;
continue;
}
if ( v3 > 111 )
goto LABEL_28;
if ( v3 == 100 )
{
format_address = (long ( *)(_QWORD, _QWORD))format_address_std;
address_base = 10;
address_pad_len = 7;
continue;
}
if ( v3 == 110 )
{
format_address = (long ( *)(_QWORD, _QWORD))format_address_none;
address_pad_len = 0;
}
else
{
LABEL_28:
v4 = *optarg;
v5 = gettext("invalid output address radix '%c'; it must be one character from [doxn]");
error(1, 0, v5, v4);
}
}
break;
case 66:
case 111:
v21 = (v21 & (unsigned char)decode_format_string("o2")) != 0;
continue;
case 68:
v21 = (v21 & (unsigned char)decode_format_string("u4")) != 0;
continue;
case 70:
case 101:
v21 = (v21 & (unsigned char)decode_format_string("fD")) != 0;
continue;
case 72:
case 88:
v21 = (v21 & (unsigned char)decode_format_string("x4")) != 0;
continue;
case 73:
case 76:
case 108:
v21 = (v21 & (unsigned char)decode_format_string("dL")) != 0;
continue;
case 78:
goto LABEL_31;
case 79:
v21 = (v21 & (unsigned char)decode_format_string("o4")) != 0;
continue;
case 83:
goto LABEL_33;
case 97:
v21 = (v21 & (unsigned char)decode_format_string("a")) != 0;
continue;
case 98:
v21 = (v21 & (unsigned char)decode_format_string("o1")) != 0;
continue;
case 99:
v21 = (v21 & (unsigned char)decode_format_string("c")) != 0;
continue;
case 100:
v21 = (v21 & (unsigned char)decode_format_string("u2")) != 0;
continue;
case 102:
v21 = (v21 & (unsigned char)decode_format_string("fF")) != 0;
continue;
case 104:
case 120:
v21 = (v21 & (unsigned char)decode_format_string("x2")) != 0;
continue;
case 105:
v21 = (v21 & (unsigned char)decode_format_string("dI")) != 0;
continue;
case 106:
v19 = 1;
v25 = xstrtoumax(optarg, 0LL, 0LL, &n_bytes_to_skip, "bEGKkMmPTYZ0");
if ( !v25 )
continue;
xstrtol_fatal(v25, (unsigned int)longind[0], (unsigned int)(char)v24, &long_options, optarg);
LABEL_31:
v19 = 1;
limit_bytes_to_format = 1;
v26 = xstrtoumax(optarg, 0LL, 0LL, &max_bytes_to_format, "bEGKkMmPTYZ0");
if ( v26 )
{
xstrtol_fatal(v26, (unsigned int)longind[0], (unsigned int)(char)v24, &long_options, optarg);
LABEL_33:
v19 = 1;
if ( optarg )
{
v27 = xstrtoumax(optarg, 0LL, 0LL, &v32, "bEGKkMmPTYZ0");
if ( v27 )
xstrtol_fatal(v27, (unsigned int)longind[0], (unsigned int)(char)v24, &long_options, optarg);
string_min = v32;
}
else
{
string_min = 3LL;
}
flag_dump_strings = 1;
}
continue;
case 115:
v21 = (v21 & (unsigned char)decode_format_string("d2")) != 0;
continue;
case 116:
v19 = 1;
v21 = (v21 & (unsigned char)decode_format_string(optarg)) != 0;
continue;
case 118:
v19 = 1;
abbreviate_duplicate_blocks = 0;
continue;
case 119:
v19 = 1;
v20 = 1;
if ( optarg )
{
v28 = xstrtoumax(optarg, 0LL, 10LL, &v32, locale);
if ( v28 )
xstrtol_fatal(v28, (unsigned int)longind[0], (unsigned int)(char)v24, &long_options, optarg);
v34 = v32;
}
else
{
v34 = 32LL;
}
continue;
case 128:
traditional = 1;
continue;
case 129:
v6 = endian_types[_xargmatch_internal("--endian", optarg, endian_args, endian_types, 4LL, argmatch_die, 1LL)];
if ( v6 )
{
if ( v6 == 1 )
input_swap = 1;
}
else
{
input_swap = 0;
}
continue;
default:
goto LABEL_67;
}
}
if ( !v21 )
return 1;
if ( flag_dump_strings && n_specs )
{
v8 = gettext("no type may be specified when dumping strings");
error(1, 0, v8);
}
v23 = argc - optind;
if ( v19 != 1 || traditional )
{
if ( v23 == 3 )
{
if ( traditional
&& parse_old_offset((char *)argv[optind + 1], (long)longind)
&& parse_old_offset((char *)argv[optind + 2], (long)&v32) )
{
n_bytes_to_skip = *(_QWORD *)longind;
flag_pseudo_start = 1;
v36 = v32;
argv[optind + 2] = argv[optind];
argva = argv + 2;
v23 = 1;
}
}
else if ( v23 <= 3 )
{
if ( v23 == 1 )
{
if ( (traditional || *argv[optind] == 43) && parse_old_offset((char *)argv[optind], (long)longind) )
{
n_bytes_to_skip = *(_QWORD *)longind;
v23 = 0;
argva = argv + 1;
}
}
else if ( v23 == 2
&& (traditional || *argv[optind + 1] == 43 || (unsigned int)(*argv[optind + 1] - 48) <= 9)
&& parse_old_offset((char *)argv[optind + 1], (long)&v32) )
{
if ( traditional && parse_old_offset((char *)argv[optind], (long)longind) )
{
n_bytes_to_skip = *(_QWORD *)longind;
flag_pseudo_start = 1;
v36 = v32;
argva = argv + 2;
v23 = 0;
}
else
{
n_bytes_to_skip = v32;
v23 = 1;
argv[optind + 1] = argv[optind];
argva = argv + 1;
}
}
}
if ( traditional && v23 > 1 )
{
v9 = quote(argva[optind + 1]);
v10 = gettext("extra operand %s");
error(0, 0, v10, v9);
v11 = gettext("compatibility mode supports at most one file");
error(0, 0, "%s", v11);
usage(1);
}
}
if ( flag_pseudo_start )
{
if ( (char *)format_address == (char *)format_address_none )
{
address_base = 8;
address_pad_len = 7;
format_address = (long ( *)(_QWORD, _QWORD))format_address_paren;
}
else
{
format_address = (long ( *)(_QWORD, _QWORD))format_address_label;
}
}
if ( limit_bytes_to_format )
{
end_offset = n_bytes_to_skip + max_bytes_to_format;
if ( n_bytes_to_skip + max_bytes_to_format < (unsigned long)n_bytes_to_skip )
{
v12 = gettext("skip-bytes + read-bytes is too large");
error(1, 0, v12);
}
}
if ( !n_specs )
decode_format_string("oS");
if ( v23 <= 0 )
file_list = (long)&default_file_list;
else
file_list = (long)&argva[optind];
file = open_next_file();
if ( in_stream )
{
file &= skip(n_bytes_to_skip);
if ( in_stream )
{
if ( flag_pseudo_start )
v13 = v36 - n_bytes_to_skip;
else
v13 = 0LL;
pseudo_offset = v13;
lcm = get_lcm();
if ( v20 )
{
if ( !v34 || v34 % lcm )
{
v14 = gettext("warning: invalid width %lu; using %d instead");
error(0, 0, v14, v34, (unsigned int)lcm);
bytes_per_block = lcm;
}
else
{
bytes_per_block = v34;
}
}
else if ( lcm > 15 )
{
bytes_per_block = lcm;
}
else
{
bytes_per_block = lcm * (16 / lcm);
}
for ( i = 0LL; i < n_specs; ++i )
{
v30 = (*(_DWORD *)(spec + 40 * i + 28) + 1)
* (bytes_per_block
/ (int)width_bytes[*(unsigned int *)(spec + 40 * i + 4)]);
if ( v35 < v30 )
v35 = v30;
}
for ( i = 0LL; i < n_specs; ++i )
*(_DWORD *)(spec + 40 * i + 32) = v35
- bytes_per_block
/ (int)width_bytes[*(unsigned int *)(spec + 40 * i + 4)]
* *(_DWORD *)(spec + 40 * i + 28);
if ( flag_dump_strings )
v15 = dump_strings();
else
v15 = dump();
file = (unsigned char)(file & v15) != 0;
}
}
if ( have_read_stdin )
{
if ( (unsigned int)rpl_fclose(stdin) == -1 )
{
v16 = gettext("standard input");
v17 = _errno_location();
error(1, *v17, v16);
}
}
return file ^ 1;
}
|
static inline __be16 rta_getattr_be16(const struct rtattr *rta)
{
return ntohs(rta_getattr_u16(rta));
}
| int rta_getattr_be16(void* a0) {
return ntohs(rta_getattr_u16(a0));
}
|
DH *
dh_new_group18(void)
{
static char *gen = "2", *group18 =
"FFFFFFFF" "FFFFFFFF" "C90FDAA2" "2168C234" "C4C6628B" "80DC1CD1"
"29024E08" "8A67CC74" "020BBEA6" "3B139B22" "514A0879" "8E3404DD"
"EF9519B3" "CD3A431B" "302B0A6D" "F25F1437" "4FE1356D" "6D51C245"
"E485B576" "625E7EC6" "F44C42E9" "A637ED6B" "0BFF5CB6" "F406B7ED"
"EE386BFB" "5A899FA5" "AE9F2411" "7C4B1FE6" "49286651" "ECE45B3D"
"C2007CB8" "A163BF05" "98DA4836" "1C55D39A" "69163FA8" "FD24CF5F"
"83655D23" "DCA3AD96" "1C62F356" "208552BB" "9ED52907" "7096966D"
"670C354E" "4ABC9804" "F1746C08" "CA18217C" "32905E46" "2E36CE3B"
"E39E772C" "180E8603" "9B2783A2" "EC07A28F" "B5C55DF0" "6F4C52C9"
"DE2BCBF6" "95581718" "3995497C" "EA956AE5" "15D22618" "98FA0510"
"15728E5A" "8AAAC42D" "AD33170D" "04507A33" "A85521AB" "DF1CBA64"
"ECFB8504" "58DBEF0A" "8AEA7157" "5D060C7D" "B3970F85" "A6E1E4C7"
"ABF5AE8C" "DB0933D7" "1E8C94E0" "4A25619D" "CEE3D226" "1AD2EE6B"
"F12FFA06" "D98A0864" "D8760273" "3EC86A64" "521F2B18" "177B200C"
"BBE11757" "7A615D6C" "770988C0" "BAD946E2" "08E24FA0" "74E5AB31"
"43DB5BFC" "E0FD108E" "4B82D120" "A9210801" "1A723C12" "A787E6D7"
"88719A10" "BDBA5B26" "99C32718" "6AF4E23C" "1A946834" "B6150BDA"
"2583E9CA" "2AD44CE8" "DBBBC2DB" "04DE8EF9" "2E8EFC14" "1FBECAA6"
"287C5947" "4E6BC05D" "99B2964F" "A090C3A2" "233BA186" "515BE7ED"
"1F612970" "CEE2D7AF" "B81BDD76" "2170481C" "D0069127" "D5B05AA9"
"93B4EA98" "8D8FDDC1" "86FFB7DC" "90A6C08F" "4DF435C9" "34028492"
"36C3FAB4" "D27C7026" "C1D4DCB2" "602646DE" "C9751E76" "3DBA37BD"
"F8FF9406" "AD9E530E" "E5DB382F" "413001AE" "B06A53ED" "9027D831"
"179727B0" "865A8918" "DA3EDBEB" "CF9B14ED" "44CE6CBA" "CED4BB1B"
"DB7F1447" "E6CC254B" "33205151" "2BD7AF42" "6FB8F401" "378CD2BF"
"5983CA01" "C64B92EC" "F032EA15" "D1721D03" "F482D7CE" "6E74FEF6"
"D55E702F" "46980C82" "B5A84031" "900B1C9E" "59E7C97F" "BEC7E8F3"
"23A97A7E" "36CC88BE" "0F1D45B7" "FF585AC5" "4BD407B2" "2B4154AA"
"CC8F6D7E" "BF48E1D8" "14CC5ED2" "0F8037E0" "A79715EE" "F29BE328"
"06A1D58B" "B7C5DA76" "F550AA3D" "8A1FBFF0" "EB19CCB1" "A313D55C"
"DA56C9EC" "2EF29632" "387FE8D7" "6E3C0468" "043E8F66" "3F4860EE"
"12BF2D5B" "0B7474D6" "E694F91E" "6DBE1159" "74A3926F" "12FEE5E4"
"38777CB6" "A932DF8C" "D8BEC4D0" "73B931BA" "3BC832B6" "8D9DD300"
"741FA7BF" "8AFC47ED" "2576F693" "6BA42466" "3AAB639C" "5AE4F568"
"3423B474" "2BF1C978" "238F16CB" "E39D652D" "E3FDB8BE" "FC848AD9"
"22222E04" "A4037C07" "13EB57A8" "1A23F0C7" "3473FC64" "6CEA306B"
"4BCBC886" "2F8385DD" "FA9D4B7F" "A2C087E8" "79683303" "ED5BDD3A"
"062B3CF5" "B3A278A6" "6D2A13F8" "3F44F82D" "DF310EE0" "74AB6A36"
"4597E899" "A0255DC1" "64F31CC5" "0846851D" "F9AB4819" "5DED7EA1"
"B1D510BD" "7EE74D73" "FAF36BC3" "1ECFA268" "359046F4" "EB879F92"
"4009438B" "481C6CD7" "889A002E" "D5EE382B" "C9190DA6" "FC026E47"
"9558E447" "5677E9AA" "9E3050E2" "765694DF" "C81F56E8" "80B96E71"
"60C980DD" "98EDD3DF" "FFFFFFFF" "FFFFFFFF";
return (dh_new_group_asc(gen, group18));
}
| long dh_new_group18()
{
return dh_new_group_asc((long)gen_17696, (long)group18_17697[0]);
}
|
s->strategy == 3 ? deflate_rle(s, flush) :
(*(configuration_table[s->level].func))(s, flush);
if (bstate == finish_started || bstate == finish_done) {
s->status = 666;
}
| int deflate_rle(struct_2 *a0, unsigned long long a1) {
unsigned long long v0;
int tmp_99;
int tmp_105;
int tmp_126;
int tmp_132;
int tmp_159;
int tmp_96;
int tmp_102;
int tmp_148;
int tmp_154;
int tmp_185;
struct_4 *v1;
char v2;
char v3;
unsigned short v4;
unsigned int v5;
unsigned int v6;
char *v7;
unsigned long v8;
char *v10;
unsigned int v11;
unsigned long long v12;
unsigned long long v13;
unsigned long long v14;
unsigned long long v15;
v1 = &a0->field_0;
*(&v0) = a1;
do {
if (a0->field_b4 <= 258) {
fill_window(a0);
if (a0->field_b4 <= 258 && !v0) {
v11 = 0;
goto LABEL_4058e8;
}
if (!a0->field_b4) {
a0->field_172c = 0;
if (v0 == 4) {
_tr_flush_block(a0);
v14 = a0->field_ac;
a0->field_98 = a0->field_ac;
flush_pending(a0->field_0, v0, v14, v13);
if (!a0->field_0->field_20) {
v11 = 2;
goto LABEL_4058e8;
} else {
v11 = 3;
goto LABEL_4058e8;
}
} else {
if (a0->field_170c) {
_tr_flush_block(a0);
v15 = a0->field_ac;
a0->field_98 = a0->field_ac;
flush_pending(a0->field_0, v0, v15, v13);
if (!a0->field_0->field_20) {
v11 = 0;
goto LABEL_4058e8;
}
}
v11 = 1;
goto LABEL_4058e8;
}
}
}
a0->field_a0 = 0;
if (a0->field_b4 > 2 && a0->field_ac) {
v7 = a0->field_ac - 1 + a0->field_60;
v6 = *(v7);
v7 += 1;
if (v6 == *(v7)) {
v7 += 1;
if (v6 == *(v7)) {
v7 += 1;
if (v6 == *(v7)) {
v8 = a0->field_ac + 258 + a0->field_60;
while (true) {
v7 += 1;
if (v6 != *(v7))
break;
v7 += 1;
if (v6 != *(v7))
break;
v7 += 1;
if (v6 != *(v7))
break;
v7 += 1;
if (v6 != *(v7))
break;
v7 += 1;
if (v6 != *(v7))
break;
v7 += 1;
if (v6 != *(v7))
break;
v7 += 1;
if (v6 != *(v7))
break;
v7 += 1;
if (v6 != *(v7))
break;
if (v7 >= v8)
break;
}
a0->field_a0 = 258 - (v8 + -0x1 * v7);
if (a0->field_a0 > a0->field_b4)
a0->field_a0 = a0->field_b4;
}
}
}
}
if (a0->field_a0 <= 2) {
v2 = *((a0->field_ac + a0->field_60));
tmp_99 = a0->field_1700;
tmp_105 = a0->field_170c;
a0->field_170c = a0->field_170c + 1;
*((tmp_105 + tmp_99)) = 0;
tmp_126 = a0->field_1700;
tmp_132 = a0->field_170c;
a0->field_170c = a0->field_170c + 1;
*((tmp_132 + tmp_126)) = 0;
v10 = a0->field_1700;
tmp_159 = a0->field_170c;
a0->field_170c = a0->field_170c + 1;
v10[tmp_159] = v2;
*(&a0->padding_b8[28 + 4 * v2]) = *(&a0->padding_b8[28 + 4 * v2]) + 1;
v5 = a0->field_170c == a0->field_1710;
a0->field_b4 = a0->field_b4 - 1;
a0->field_ac = a0->field_ac + 1;
} else {
v3 = a0->field_a0 - 3;
v4 = 1;
tmp_96 = a0->field_1700;
tmp_102 = a0->field_170c;
a0->field_170c = a0->field_170c + 1;
*((tmp_102 + tmp_96)) = v4;
tmp_148 = a0->field_1700;
tmp_154 = a0->field_170c;
a0->field_170c = a0->field_170c + 1;
*((tmp_154 + tmp_148)) = v4 >> 8;
v10 = a0->field_1700;
tmp_185 = a0->field_170c;
a0->field_170c = a0->field_170c + 1;
v10[tmp_185] = v3;
v4 -= 1;
*(&a0->padding_b8[1056 + 4 * *(v3 + &_length_code)]) = *(&a0->padding_b8[1056 + 4 * *(v3 + &_length_code)]) + 1;
if (v4 <= 255)
v11 = *(v4 + &_dist_code);
else
v11 = *(((v4 >> 7) + 5243232));
*(&a0->padding_b8[2320 + 4 * v11]) = *(&a0->padding_b8[2320 + 4 * v11]) + 1;
v5 = a0->field_170c == a0->field_1710;
a0->field_b4 = a0->field_b4 - a0->field_a0;
a0->field_ac = a0->field_ac + a0->field_a0;
a0->field_a0 = 0;
}
if (!v5)
continue;
_tr_flush_block(a0);
v12 = a0->field_ac;
a0->field_98 = a0->field_ac;
flush_pending(a0->field_0, v10, v12, v13);
} while (a0->field_0->field_20);
v11 = 0;
LABEL_4058e8:
return v11;
}
|
static void growstackblock(size_t min)
{
size_t newlen;
newlen = stacknleft * 2;
if (newlen < stacknleft)
sh_error("Out of space");
min = (((min | 128) + (sizeof(union {int i; char *cp; double d; }) - 1)) & ~(sizeof(union {int i; char *cp; double d; }) - 1));
if (newlen < min)
newlen += min;
if (stacknxt == stackp->space && stackp != &stackbase) {
struct stack_block *sp;
struct stack_block *prevstackp;
size_t grosslen;
({ suppressint++; ({ __asm__ __volatile__ ("": : :"memory"); }); 0; });
sp = stackp;
prevstackp = sp->prev;
grosslen = newlen + sizeof(struct stack_block) - (((504) + (sizeof(union {int i; char *cp; double d; }) - 1)) & ~(sizeof(union {int i; char *cp; double d; }) - 1));
sp = ckrealloc((pointer)sp, grosslen);
sp->prev = prevstackp;
stackp = sp;
stacknxt = sp->space;
stacknleft = newlen;
sstrend = sp->space + newlen;
({ ({ __asm__ __volatile__ ("": : :"memory"); }); if (--suppressint == 0 && intpending) onint(); 0; });
} else {
char *oldspace = stacknxt;
int oldlen = stacknleft;
char *p = stalloc(newlen);
stacknxt = memcpy(p, oldspace, oldlen);
stacknleft += newlen;
}
}
| void growstackblock(unsigned long long a0) {
unsigned long long v0;
unsigned int v1;
unsigned long v2;
unsigned long long *v3;
unsigned long v4;
unsigned long v5;
void* v6;
void* v7;
unsigned long long v9;
unsigned long long v10;
unsigned long long v11;
unsigned long long v12;
v0 = a0;
v2 = stacknleft * 2;
if (v2 < stacknleft)
sh_error("Out of space");
v9 = v0;
*(&v9) = v0 | 128;
v0 = v9 + 7 & -8;
if (v2 < v0)
v2 += v0;
if (stackp + 1 == stacknxt && stackp != 4194336) {
suppressint = suppressint + 1;
v3 = stackp;
v4 = *(v3);
v5 = v2 + 8;
v3 = ckrealloc(v3, v5);
*(v3) = v4;
stackp = v3;
stacknxt = v3 + 1;
stacknleft = v2;
sstrend = 1 + v2 + v3;
suppressint = suppressint - 1;
v10 = suppressint;
if (suppressint)
return;
v11 = intpending;
if (!intpending)
return;
onint();
}
v6 = stacknxt;
v1 = stacknleft;
v7 = stalloc(v2);
stacknxt = memcpy(v7, v6, v1);
v12 = v2 + stacknleft;
stacknleft = v2 + stacknleft;
return;
}
|
static void usage(void)
{
fprintf(
stderr
,
"Usage: ip xfrm monitor [ nokeys ] [ all-nsid ] [ all | OBJECTS | help ]\n"
"OBJECTS := { acquire | expire | SA | aevent | policy | report }\n");
exit(-1);
}
| void usage() {
fprintf(stderr, "Usage: ip xfrm monitor [ nokeys ] [ all-nsid ] [ all | OBJECTS | help ]\nOBJECTS := { acquire | expire | SA | aevent | policy | report }\n");
exit(0xffffffff);
}
|
static int do_list(int argc, char **argv)
{
struct { struct nlmsghdr n; struct genlmsghdr g; char buf[( ((0)+4U -1) & ~(4U -1) ) + (1024)]; } req = { .n = { .nlmsg_type = (genl_family), .nlmsg_flags = (0x01 | (0x100|0x200)), .nlmsg_len = ((( ((sizeof(struct genlmsghdr))+4U -1) & ~(4U -1) ) + (0)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))), }, .g = { .cmd = (ILA_CMD_GET), .version = (0x1), }, };
if (argc > 0) {
fprintf(
stderr
, "\"ip ila show\" does not take "
"any arguments.\n");
return -1;
}
if (rtnl_send(&genl_rth, (void *)&req, req.n.nlmsg_len) < 0) {
perror("Cannot send dump request");
exit(1);
}
new_json_obj(json);
if (rtnl_dump_filter_nc(&genl_rth, print_ila_mapping,
stdout
, 0) < 0) {
fprintf(
stderr
, "Dump terminated\n");
return 1;
}
delete_json_obj();
fflush(
stdout
);
return 0;
}
| long do_list(int a1)
{
int v2[262];
unsigned long v3;
v3 = __readfsqword(0x28u);
memset(v2, 0, 1044);
v2[0] = 20;
LOWORD(v2[1]) = genl_family;
HIWORD(v2[1]) = 769;
LOWORD(v2[4]) = 259;
if ( a1 <= 0 )
{
if ( (int)rtnl_send(&genl_rth, v2, (unsigned int)v2[0]) < 0 )
{
perror("Cannot send dump request");
exit(1);
}
new_json_obj(json);
if ( (int)rtnl_dump_filter_nc(&genl_rth, print_ila_mapping, stdout, 0LL) >= 0 )
{
delete_json_obj(&genl_rth);
fflush(stdout);
return 0LL;
}
else
{
fprintf(stderr, "Dump terminated\n");
return 1LL;
}
}
else
{
fprintf(stderr, "\"ip ila show\" does not take any arguments.\n");
return 0xFFFFFFFFLL;
}
}
|
static inline __u32 rta_getattr_u32(const struct rtattr *rta)
{
return *(__u32 *)((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
}
| int rta_getattr_u32(struct_0 *a0) {
return a0->field_4;
}
|
static int check_members (const char *groupname,
char **members,
const char *fmt_info,
const char *fmt_prompt,
const char *fmt_syslog,
int *errors)
{
int i;
int members_changed = 0;
for (i = 0;
((void *)0)
!= members[i]; i++) {
if (getpwnam (members[i]) !=
((void *)0)
) {
continue;
}
*errors += 1;
printf (fmt_info, groupname, members[i]);
printf (fmt_prompt, members[i]);
if (!yes_or_no (read_only)) {
continue;
}
do { char *old_locale = setlocale (
6
,
((void *)0)
); char *saved_locale =
((void *)0)
; if (
((void *)0)
!= old_locale) { saved_locale = strdup (old_locale); } if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, "C"); } syslog (
6
, fmt_syslog, members[i], groupname) ; if (
((void *)0)
!= saved_locale) { (void) setlocale (
6
, saved_locale); free (saved_locale); } } while (
0
);
members_changed = 1;
delete_member (members, members[i]);
i--;
}
return members_changed;
}
| undefined4
check_members(undefined8 param_1,long param_2,char *param_3,char *param_4,char *param_5,int *param_6
)
{
char cVar1;
passwd *ppVar2;
char *__s;
int local_20;
undefined4 local_1c;
char *local_18;
local_1c = 0;
local_20 = 0;
while (*(long *)(param_2 + (long)local_20 * 8) != 0) {
ppVar2 = getpwnam(*(char **)(param_2 + (long)local_20 * 8));
if (ppVar2 == (passwd *)0x0) {
*param_6 = *param_6 + 1;
printf(param_3,param_1,*(undefined8 *)(param_2 + (long)local_20 * 8));
printf(param_4,*(undefined8 *)(param_2 + (long)local_20 * 8));
cVar1 = yes_or_no(read_only);
if (cVar1 == '\x01') {
__s = setlocale(6,(char *)0x0);
local_18 = (char *)0x0;
if (__s != (char *)0x0) {
local_18 = strdup(__s);
}
if (local_18 != (char *)0x0) {
setlocale(6,"C");
}
syslog(6,param_5,*(undefined8 *)(param_2 + (long)local_20 * 8),param_1);
if (local_18 != (char *)0x0) {
setlocale(6,local_18);
free(local_18);
}
local_1c = 1;
delete_member(param_2,*(undefined8 *)(param_2 + (long)local_20 * 8));
local_20 = local_20 + -1;
}
}
local_20 = local_20 + 1;
}
return local_1c;
}
|
static
_Bool
predicate_is_cost_free (const struct predicate *p)
{
if (( ((p)->pred_func) == (pred_name) ) ||
( ((p)->pred_func) == (pred_path) ) ||
( ((p)->pred_func) == (pred_iname) ) ||
( ((p)->pred_func) == (pred_ipath) ))
{
return
1
;
}
else if (options.optimisation_level > 0)
{
if (( ((p)->pred_func) == (pred_and) ) ||
( ((p)->pred_func) == (pred_negate) ) ||
( ((p)->pred_func) == (pred_comma) ) ||
( ((p)->pred_func) == (pred_or) ))
return
0
;
else
return NeedsNothing == p->p_cost;
}
else
{
return
0
;
}
}
| int predicate_is_cost_free(struct_0 *a0) {
unsigned int v1;
if (a0->field_0 == got.pred_name) {
LABEL_400696:
v1 = 1;
} else {
if (a0->field_0 == got.pred_path)
goto LABEL_400696;
if (a0->field_0 == got.pred_iname)
goto LABEL_400696;
if (a0->field_0 == got.pred_ipath)
goto LABEL_400696;
if (!got.pred_regex) {
v1 = 0;
} else if (a0->field_0 == got.pred_and) {
LABEL_4006f5:
v1 = 0;
} else {
if (a0->field_0 == got.pred_negate)
goto LABEL_4006f5;
if (a0->field_0 == got.pred_comma)
goto LABEL_4006f5;
if (a0->field_0 == got.pred_or)
goto LABEL_4006f5;
v1 = a0->field_20;
*(&v1) = !a0->field_20;
}
}
return v1;
}
|
void bi_windup()
{
if (bi_valid > 8) {
{ if (outcnt < 0x40000 -2) { outbuf[outcnt++] = (uch) ((bi_buf) & 0xff); outbuf[outcnt++] = (uch) ((ush)(bi_buf) >> 8); } else { {outbuf[outcnt++]=(uch)((uch)((bi_buf) & 0xff)); if (outcnt==0x40000) flush_outbuf();}; {outbuf[outcnt++]=(uch)((uch)((ush)(bi_buf) >> 8)); if (outcnt==0x40000) flush_outbuf();}; } };
} else if (bi_valid > 0) {
{outbuf[outcnt++]=(uch)(bi_buf); if (outcnt==0x40000) flush_outbuf();};
}
bi_buf = 0;
bi_valid = 0;
}
| long bi_windup()
{
unsigned int v0;
unsigned int v1;
long v2;
long result;
unsigned int v4;
unsigned int v5;
unsigned int v6;
if ( bi_valid <= 8 )
{
result = (unsigned int)bi_valid;
if ( bi_valid > 0 )
{
v6 = outcnt++;
*((_BYTE *)&outbuf + v6) = bi_buf;
result = outcnt;
if ( outcnt == 0x40000 )
goto LABEL_10;
}
}
else
{
if ( outcnt <= 0x3FFFDu )
{
v0 = outcnt++;
*((_BYTE *)&outbuf + v0) = bi_buf;
v1 = outcnt++;
v2 = v1;
result = (long)&outbuf;
*((_BYTE *)&outbuf + v2) = HIBYTE(bi_buf);
goto LABEL_11;
}
v4 = outcnt++;
*((_BYTE *)&outbuf + v4) = bi_buf;
if ( outcnt == 0x40000 )
flush_outbuf();
v5 = outcnt++;
*((_BYTE *)&outbuf + v5) = HIBYTE(bi_buf);
result = outcnt;
if ( outcnt == 0x40000 )
LABEL_10:
result = flush_outbuf();
}
LABEL_11:
bi_buf = 0;
bi_valid = 0;
return result;
}
|
int print_info(gnutls_session_t session, int verbose, int flags)
{
const char *tmp;
gnutls_credentials_type_t cred;
gnutls_kx_algorithm_t kx;
unsigned char session_id[33];
size_t session_id_size = sizeof(session_id);
gnutls_srtp_profile_t srtp_profile;
gnutls_datum_t p;
char *desc;
gnutls_protocol_t version;
int rc;
desc = gnutls_session_get_desc(session);
log_msg(
stdout
, "- Description: %s\n", desc);
gnutls_free((void *) (desc)), desc=
((void *)0)
;
gnutls_session_get_id(session, session_id, &session_id_size);
if (session_id_size > 0) {
log_msg(
stdout
, "- Session ID: %s\n",
raw_to_string(session_id, session_id_size));
}
kx = gnutls_kx_get(session);
cred = gnutls_auth_get_type(session);
switch (cred) {
case GNUTLS_CRD_ANON:
if (kx == GNUTLS_KX_ANON_ECDH)
print_ecdh_info(session, "Anonymous ", verbose);
else
print_dh_info(session, "Anonymous ", verbose);
break;
case GNUTLS_CRD_SRP:
if (gnutls_srp_server_get_username(session) !=
((void *)0)
)
log_msg(
stdout
, "- SRP authentication. Connected as '%s'\n",
gnutls_srp_server_get_username(session));
break;
case GNUTLS_CRD_PSK:
if (gnutls_psk_client_get_hint(session) !=
((void *)0)
)
log_msg(
stdout
, "- PSK authentication. PSK hint '%s'\n",
gnutls_psk_client_get_hint(session));
if (gnutls_psk_server_get_username(session) !=
((void *)0)
)
log_msg(
stdout
, "- PSK authentication. Connected as '%s'\n",
gnutls_psk_server_get_username(session));
if (kx == GNUTLS_KX_DHE_PSK)
print_dh_info(session, "Ephemeral ", verbose);
if (kx == GNUTLS_KX_ECDHE_PSK)
print_ecdh_info(session, "Ephemeral ", verbose);
break;
case GNUTLS_CRD_IA:
log_msg(
stdout
, "- TLS/IA authentication\n");
break;
case GNUTLS_CRD_CERTIFICATE:
{
char dns[256];
size_t dns_size = sizeof(dns);
unsigned int type;
if (gnutls_server_name_get
(session, dns, &dns_size, &type, 0) == 0) {
log_msg(
stdout
, "- Given server name[%d]: %s\n",
type, dns);
}
}
if ((flags & (1<<1)) && gnutls_certificate_get_ours(session) == 0)
log_msg(
stdout
, "- No certificate was sent to peer\n");
if (flags& 1)
print_cert_info(session, verbose, (flags&1));
if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS)
print_dh_info(session, "Ephemeral ", verbose);
else if (kx == GNUTLS_KX_ECDHE_RSA
|| kx == GNUTLS_KX_ECDHE_ECDSA)
print_ecdh_info(session, "Ephemeral ", verbose);
}
if (verbose) {
version = gnutls_protocol_get_version(session);
tmp =
(gnutls_protocol_get_name(version)!=
((void *)0)
?gnutls_protocol_get_name(version):"Unknown");
log_msg(
stdout
, "- Version: %s\n", tmp);
if (version < GNUTLS_TLS1_3) {
tmp = (gnutls_kx_get_name(kx)!=
((void *)0)
?gnutls_kx_get_name(kx):"Unknown");
log_msg(
stdout
, "- Key Exchange: %s\n", tmp);
}
if (gnutls_sign_algorithm_get(session) != GNUTLS_SIGN_UNKNOWN) {
tmp =
(gnutls_sign_get_name (gnutls_sign_algorithm_get(session))!=
((void *)0)
?gnutls_sign_get_name (gnutls_sign_algorithm_get(session)):"Unknown")
;
log_msg(
stdout
, "- Server Signature: %s\n", tmp);
}
if (gnutls_sign_algorithm_get_client(session) !=
GNUTLS_SIGN_UNKNOWN) {
tmp =
(gnutls_sign_get_name (gnutls_sign_algorithm_get_client(session))!=
((void *)0)
?gnutls_sign_get_name (gnutls_sign_algorithm_get_client(session)):"Unknown")
;
log_msg(
stdout
, "- Client Signature: %s\n", tmp);
}
tmp = (gnutls_cipher_get_name(gnutls_cipher_get(session))!=
((void *)0)
?gnutls_cipher_get_name(gnutls_cipher_get(session)):"Unknown");
log_msg(
stdout
, "- Cipher: %s\n", tmp);
tmp = (gnutls_mac_get_name(gnutls_mac_get(session))!=
((void *)0)
?gnutls_mac_get_name(gnutls_mac_get(session)):"Unknown");
log_msg(
stdout
, "- MAC: %s\n", tmp);
}
log_msg(
stdout
, "- Options:");
if (gnutls_session_ext_master_secret_status(session)!=0)
log_msg(
stdout
, " extended master secret,");
if (gnutls_safe_renegotiation_status(session)!=0)
log_msg(
stdout
, " safe renegotiation,");
if (gnutls_session_etm_status(session)!=0)
log_msg(
stdout
, " EtM,");
if (gnutls_ocsp_status_request_is_checked(session, 1)!=0) {
log_msg(
stdout
, " OCSP status request%s,", gnutls_ocsp_status_request_is_checked(session,0)!=0?"":"[ignored]");
}
log_msg(
stdout
, "\n");
rc = gnutls_srtp_get_selected_profile(session, &srtp_profile);
if (rc == 0)
log_msg(
stdout
, "- SRTP profile: %s\n",
gnutls_srtp_get_profile_name(srtp_profile));
rc = gnutls_alpn_get_selected_protocol(session, &p);
if (rc == 0)
log_msg(
stdout
, "- Application protocol: %.*s\n", p.size, p.data);
print_channel_bindings(session, verbose);
fflush(
stdout
);
return 0;
}
| long print_info(long a1, unsigned int a2, unsigned int a3)
{
long v3;
long v4;
long v5;
const char *v6;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
long username;
long v15;
long v16;
long v17;
long hint;
long v19;
long v20;
long v21;
long v22;
long v23;
long v24;
long v25;
long v26;
long v27;
long v28;
const char *name;
long v30;
long v31;
long v32;
const char *v33;
unsigned int v34;
long v35;
long v36;
long v37;
unsigned int v38;
const char *v39;
unsigned int client;
long v41;
long v42;
long v43;
unsigned int v44;
const char *v45;
unsigned int v46;
long v47;
long v48;
long v49;
unsigned int v50;
const char *v51;
unsigned int v52;
long v53;
long v54;
long v55;
unsigned int v56;
const char *v57;
long v58;
long v59;
long v60;
long v61;
long v62;
long v63;
long v64;
long v65;
long v66;
long v67;
long v68;
long v69;
long v70;
long v71;
long v72;
long v73;
long v74;
long v75;
const char *v76;
long profile_name;
long v78;
long v79;
long v80;
long v81;
long v82;
long v83;
unsigned long v85;
unsigned int v86;
unsigned int v87;
unsigned int v88;
int type;
unsigned int version;
int selected_profile;
unsigned long v92;
long desc;
const char *v94;
long v95;
unsigned int v96;
char v97[48];
char v98[264];
unsigned long v99;
v85 = __PAIR64__(a2, a3);
v99 = __readfsqword(0x28u);
v92 = 33LL;
desc = gnutls_session_get_desc(a1);
log_msg(stdout, "- Description: %s\n", desc, v3, v4, v5);
gnutls_free(desc);
desc = 0LL;
gnutls_session_get_id(a1, v97, &v92);
if ( v92 )
{
v6 = raw_to_string((long)v97, v92);
log_msg(stdout, "- Session ID: %s\n", (long)v6, v7, v8, v9);
}
v88 = gnutls_kx_get(a1);
type = gnutls_auth_get_type(a1);
switch ( type )
{
case 1:
v95 = 256LL;
if ( !(unsigned int)gnutls_server_name_get(a1, v98, &v95, &v87, 0LL) )
log_msg(stdout, "- Given server name[%d]: %s\n", v87, (long)v98, v12, v13);
if ( (v85 & 2) != 0 && !gnutls_certificate_get_ours(a1) )
log_msg(stdout, "- No certificate was sent to peer\n", v10, v11, v12, v13);
if ( (v85 & 1) != 0 )
print_cert_info(a1, a2, v85 & 1);
if ( v88 == 3 || v88 == 2 )
{
print_dh_info(a1, (long)"Ephemeral ", a2);
}
else if ( v88 == 12 || v88 == 13 )
{
print_ecdh_info(a1, (long)"Ephemeral ", a2, v11, v12, v13);
}
break;
case 2:
if ( v88 == 11 )
print_ecdh_info(a1, (long)"Anonymous ", a2, v11, v12, v13);
else
print_dh_info(a1, (long)"Anonymous ", a2);
break;
case 3:
if ( gnutls_srp_server_get_username(a1) )
{
username = gnutls_srp_server_get_username(a1);
log_msg(stdout, "- SRP authentication. Connected as '%s'\n", username, v15, v16, v17);
}
break;
case 4:
if ( gnutls_psk_client_get_hint(a1) )
{
hint = gnutls_psk_client_get_hint(a1);
log_msg(stdout, "- PSK authentication. PSK hint '%s'\n", hint, v19, v20, v21);
}
if ( gnutls_psk_server_get_username(a1) )
{
v22 = gnutls_psk_server_get_username(a1);
log_msg(stdout, "- PSK authentication. Connected as '%s'\n", v22, v23, v24, v25);
}
if ( v88 == 10 )
print_dh_info(a1, (long)"Ephemeral ", a2);
if ( v88 == 14 )
print_ecdh_info(a1, (long)"Ephemeral ", a2, v11, v12, v13);
break;
case 5:
log_msg(stdout, "- TLS/IA authentication\n", v10, v11, v12, v13);
break;
default:
break;
}
if ( a2 )
{
version = gnutls_protocol_get_version(a1);
if ( gnutls_protocol_get_name(version) )
name = (const char *)gnutls_protocol_get_name(version);
else
name = "Unknown";
v94 = name;
log_msg(stdout, "- Version: %s\n", (long)name, v26, v27, v28, v85);
if ( version <= 4 )
{
if ( gnutls_kx_get_name(v88) )
v33 = (const char *)gnutls_kx_get_name(v88);
else
v33 = "Unknown";
v94 = v33;
log_msg(stdout, "- Key Exchange: %s\n", (long)v33, v30, v31, v32);
}
if ( (unsigned int)gnutls_sign_algorithm_get(a1) )
{
v34 = gnutls_sign_algorithm_get(a1);
if ( gnutls_sign_get_name(v34) )
{
v38 = gnutls_sign_algorithm_get(a1);
v39 = (const char *)gnutls_sign_get_name(v38);
}
else
{
v39 = "Unknown";
}
v94 = v39;
log_msg(stdout, "- Server Signature: %s\n", (long)v39, v35, v36, v37);
}
if ( (unsigned int)gnutls_sign_algorithm_get_client(a1) )
{
client = gnutls_sign_algorithm_get_client(a1);
if ( gnutls_sign_get_name(client) )
{
v44 = gnutls_sign_algorithm_get_client(a1);
v45 = (const char *)gnutls_sign_get_name(v44);
}
else
{
v45 = "Unknown";
}
v94 = v45;
log_msg(stdout, "- Client Signature: %s\n", (long)v45, v41, v42, v43);
}
v46 = gnutls_cipher_get(a1);
if ( gnutls_cipher_get_name(v46) )
{
v50 = gnutls_cipher_get(a1);
v51 = (const char *)gnutls_cipher_get_name(v50);
}
else
{
v51 = "Unknown";
}
v94 = v51;
log_msg(stdout, "- Cipher: %s\n", (long)v51, v47, v48, v49);
v52 = gnutls_mac_get(a1);
if ( gnutls_mac_get_name(v52) )
{
v56 = gnutls_mac_get(a1);
v57 = (const char *)gnutls_mac_get_name(v56);
}
else
{
v57 = "Unknown";
}
v94 = v57;
log_msg(stdout, "- MAC: %s\n", (long)v57, v53, v54, v55);
}
log_msg(stdout, "- Options:", v10, v11, v12, v13, v85);
if ( (unsigned int)gnutls_session_ext_master_secret_status(a1) )
log_msg(stdout, " extended master secret,", v58, v59, v60, v61);
if ( (unsigned int)gnutls_safe_renegotiation_status(a1) )
log_msg(stdout, " safe renegotiation,", v62, v63, v64, v65);
if ( (unsigned int)gnutls_session_etm_status(a1) )
log_msg(stdout, " EtM,", v66, v67, v68, v69);
if ( (unsigned int)gnutls_ocsp_status_request_is_checked(a1, 1LL) )
{
if ( (unsigned int)gnutls_ocsp_status_request_is_checked(a1, 0LL) )
v76 = (const char *)&unk_467E;
else
v76 = "[ignored]";
log_msg(stdout, " OCSP status request%s,", (long)v76, (long)stdout, v74, v75);
}
log_msg(stdout, "\n", v70, v71, v72, v73);
selected_profile = gnutls_srtp_get_selected_profile(a1, &v87);
if ( !selected_profile )
{
profile_name = gnutls_srtp_get_profile_name(v87);
log_msg(stdout, "- SRTP profile: %s\n", profile_name, v78, v79, v80);
}
selected_profile = gnutls_alpn_get_selected_protocol(a1, &v95);
if ( !selected_profile )
log_msg(stdout, "- Application protocol: %.*s\n", v96, v95, v82, v83);
print_channel_bindings(a1, v86, v86, v81, v82, v83);
fflush(stdout);
return 0LL;
}
|
static VARLIST *
vlist_realloc (vlist, n)
VARLIST *vlist;
int n;
{
if (vlist == 0)
return (vlist = vlist_alloc (n));
if (n > vlist->list_size)
{
vlist->list_size = n;
vlist->list = (SHELL_VAR **)sh_xrealloc((vlist->list), ((vlist->list_size + 1) * sizeof (SHELL_VAR *)), "variables.c", 4190);
}
return vlist;
}
| int vlist_realloc(unsigned long a0, unsigned long a1) {
unsigned long v0;
unsigned int v2;
v0 = a0;
if (!v0) {
v0 = vlist_alloc(a1);
v2 = v0;
return v2;
}
if (a1 > v0->field_8) {
v0->field_8 = a1;
v0->field_0 = sh_xrealloc(v0->field_0, (v0->field_8 + 1) * 8, "variables.c", 0x105e);
}
v2 = v0;
return v2;
}
|
static int
control_show(const char *const *argv)
{
struct pkginfo *pkg;
const char *pkgname;
const char *filename;
const char *control_file;
pkgname = *argv++;
if (!pkgname || !*argv)
badusage(gettext("--%s takes exactly two arguments"),
cipaction->olong);
control_file = *argv++;
if (!control_file || *argv)
badusage(gettext("--%s takes exactly two arguments"), cipaction->olong);
pkg_infodb_check_filetype(control_file);
modstatdb_open(msdbrw_readonly);
pkg = dpkg_options_parse_pkgname(cipaction, pkgname);
if (pkg->status == PKG_STAT_NOTINSTALLED)
ohshit(gettext("package '%s' is not installed"), pkg_name(pkg, pnaw_nonambig));
if (pkg_infodb_has_file(pkg, &pkg->installed, control_file))
filename = pkg_infodb_get_file(pkg, &pkg->installed, control_file);
else
ohshit(gettext("control file '%s' does not exist"), control_file);
modstatdb_shutdown();
file_show(filename);
return 0;
}
| undefined8 control_show(long *param_1)
{
long lVar1;
char cVar2;
undefined8 uVar3;
long lVar4;
undefined8 uVar5;
undefined8 local_20;
lVar4 = *param_1;
if ((lVar4 == 0) || (param_1[1] == 0)) {
uVar5 = *cipaction;
uVar3 = gettext("--%s takes exactly two arguments");
badusage(uVar3,uVar5);
}
lVar1 = param_1[1];
if ((lVar1 == 0) || (param_1[2] != 0)) {
uVar5 = *cipaction;
uVar3 = gettext("--%s takes exactly two arguments");
badusage(uVar3,uVar5);
}
pkg_infodb_check_filetype(lVar1);
modstatdb_open(0);
lVar4 = dpkg_options_parse_pkgname(cipaction,lVar4);
if (*(int *)(lVar4 + 0x18) == 0) {
uVar5 = pkg_name(lVar4,1);
uVar3 = gettext("package \'%s\' is not installed");
ohshit(uVar3,uVar5);
}
cVar2 = pkg_infodb_has_file(lVar4,lVar4 + 0x48,lVar1);
if (cVar2 == '\0') {
uVar5 = gettext("control file \'%s\' does not exist");
ohshit(uVar5,lVar1);
}
else {
local_20 = pkg_infodb_get_file(lVar4,lVar4 + 0x48,lVar1);
}
modstatdb_shutdown();
file_show(local_20);
return 0;
}
|
static void new_pwent (struct passwd *pwent)
{
explicit_bzero((pwent), (sizeof *pwent));
pwent->pw_name = (char *) user_name;
if (is_shadow_pwd) {
pwent->pw_passwd = (char *) "x";
} else {
pwent->pw_passwd = (char *) user_pass;
}
pwent->pw_uid = user_id;
pwent->pw_gid = user_gid;
pwent->pw_gecos = (char *) user_comment;
pwent->pw_dir = (char *) user_home;
pwent->pw_shell = (char *) user_shell;
}
| long new_pwent(long a1)
{
long result;
explicit_bzero(a1, 48LL);
*(_QWORD *)a1 = user_name;
if ( is_shadow_pwd )
*(_QWORD *)(a1 + 8) = "x";
else
*(_QWORD *)(a1 + 8) = user_pass;
*(_DWORD *)(a1 + 16) = user_id;
*(_DWORD *)(a1 + 20) = user_gid;
*(_QWORD *)(a1 + 24) = user_comment;
*(_QWORD *)(a1 + 32) = user_home;
result = a1;
*(_QWORD *)(a1 + 40) = user_shell;
return result;
}
|
static void
print_redirection (redirect)
REDIRECT *redirect;
{
int redirector, redir_fd;
WORD_DESC *redirectee, *redir_word;
redirectee = redirect->redirectee.filename;
redir_fd = redirect->redirectee.dest;
redir_word = redirect->redirector.filename;
redirector = redirect->redirector.dest;
switch (redirect->instruction)
{
case r_input_direction:
if (redirect->rflags & 0x01)
cprintf ("{%s}", redir_word->word);
else if (redirector != 0)
cprintf ("%d", redirector);
cprintf ("< %s", redirectee->word);
break;
case r_output_direction:
if (redirect->rflags & 0x01)
cprintf ("{%s}", redir_word->word);
else if (redirector != 1)
cprintf ("%d", redirector);
cprintf ("> %s", redirectee->word);
break;
case r_inputa_direction:
cprintf ("&");
break;
case r_output_force:
if (redirect->rflags & 0x01)
cprintf ("{%s}", redir_word->word);
else if (redirector != 1)
cprintf ("%d", redirector);
cprintf (">| %s", redirectee->word);
break;
case r_appending_to:
if (redirect->rflags & 0x01)
cprintf ("{%s}", redir_word->word);
else if (redirector != 1)
cprintf ("%d", redirector);
cprintf (">> %s", redirectee->word);
break;
case r_input_output:
if (redirect->rflags & 0x01)
cprintf ("{%s}", redir_word->word);
else if (redirector != 1)
cprintf ("%d", redirector);
cprintf ("<> %s", redirectee->word);
break;
case r_deblank_reading_until:
case r_reading_until:
print_heredoc_header (redirect);
cprintf ("\n");
print_heredoc_body (redirect);
break;
case r_reading_string:
if (redirect->rflags & 0x01)
cprintf ("{%s}", redir_word->word);
else if (redirector != 0)
cprintf ("%d", redirector);
cprintf ("<<< %s", redirect->redirectee.filename->word);
break;
case r_duplicating_input:
if (redirect->rflags & 0x01)
cprintf ("{%s}<&%d", redir_word->word, redir_fd);
else
cprintf ("%d<&%d", redirector, redir_fd);
break;
case r_duplicating_output:
if (redirect->rflags & 0x01)
cprintf ("{%s}>&%d", redir_word->word, redir_fd);
else
cprintf ("%d>&%d", redirector, redir_fd);
break;
case r_duplicating_input_word:
if (redirect->rflags & 0x01)
cprintf ("{%s}<&%s", redir_word->word, redirectee->word);
else if (redirector == 0)
cprintf ("<&%s", redirectee->word);
else
cprintf ("%d<&%s", redirector, redirectee->word);
break;
case r_duplicating_output_word:
if (redirect->rflags & 0x01)
cprintf ("{%s}>&%s", redir_word->word, redirectee->word);
else if (redirector == 1)
cprintf (">&%s", redirectee->word);
else
cprintf ("%d>&%s", redirector, redirectee->word);
break;
case r_move_input:
if (redirect->rflags & 0x01)
cprintf ("{%s}<&%d-", redir_word->word, redir_fd);
else
cprintf ("%d<&%d-", redirector, redir_fd);
break;
case r_move_output:
if (redirect->rflags & 0x01)
cprintf ("{%s}>&%d-", redir_word->word, redir_fd);
else
cprintf ("%d>&%d-", redirector, redir_fd);
break;
case r_move_input_word:
if (redirect->rflags & 0x01)
cprintf ("{%s}<&%s-", redir_word->word, redirectee->word);
else
cprintf ("%d<&%s-", redirector, redirectee->word);
break;
case r_move_output_word:
if (redirect->rflags & 0x01)
cprintf ("{%s}>&%s-", redir_word->word, redirectee->word);
else
cprintf ("%d>&%s-", redirector, redirectee->word);
break;
case r_close_this:
if (redirect->rflags & 0x01)
cprintf ("{%s}>&-", redir_word->word);
else
cprintf ("%d>&-", redirector);
break;
case r_err_and_out:
cprintf ("&> %s", redirectee->word);
break;
case r_append_err_and_out:
cprintf ("&>> %s", redirectee->word);
break;
}
}
| unsigned long print_redirection(long a1, long a2, long a3, long a4, long a5, long a6)
{
unsigned long result;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
long v14;
unsigned int v15;
unsigned int v16;
long *v17;
long *v18;
v17 = *(long **)(a1 + 32);
v15 = *(_DWORD *)(a1 + 32);
v18 = *(long **)(a1 + 8);
v16 = *(_DWORD *)(a1 + 8);
result = *(unsigned int *)(a1 + 24);
switch ( (int)result )
{
case 0:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
{
cprintf("{%s}", *v18, a3, a4, a5, a6);
}
else if ( v16 != 1 )
{
cprintf("%d", v16, a3, a4, a5, a6);
}
result = cprintf("> %s", *v17, a3, a4, a5, a6);
break;
case 1:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
{
cprintf("{%s}", *v18, a3, a4, a5, a6);
}
else if ( v16 )
{
cprintf("%d", v16, a3, a4, a5, a6);
}
result = cprintf("< %s", *v17, a3, a4, a5, a6);
break;
case 2:
result = cprintf("&", a2, a3, a4, a5, a6);
break;
case 3:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
{
cprintf("{%s}", *v18, a3, a4, a5, a6);
}
else if ( v16 != 1 )
{
cprintf("%d", v16, a3, a4, a5, a6);
}
result = cprintf(">> %s", *v17, a3, a4, a5, a6);
break;
case 4:
case 8:
print_heredoc_header(a1, a2, a3, a4, a5, a6);
cprintf("\n", a2, v7, v8, v9, v10);
result = print_heredoc_body(a1, a2, v11, v12, v13, v14);
break;
case 5:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
{
cprintf("{%s}", *v18, a3, a4, a5, a6);
}
else if ( v16 )
{
cprintf("%d", v16, a3, a4, a5, a6);
}
result = cprintf("<<< %s", **(_QWORD **)(a1 + 32), a3, a4, a5, a6);
break;
case 6:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
result = cprintf("{%s}<&%d", *v18, v15, a4, a5, a6);
else
result = cprintf("%d<&%d", v16, v15, a4, a5, a6);
break;
case 7:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
result = cprintf("{%s}>&%d", *v18, v15, a4, a5, a6);
else
result = cprintf("%d>&%d", v16, v15, a4, a5, a6);
break;
case 9:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
result = cprintf("{%s}>&-", *v18, a3, a4, a5, a6);
else
result = cprintf("%d>&-", v16, a3, a4, a5, a6);
break;
case 10:
result = cprintf("&> %s", *v17, a3, a4, a5, a6);
break;
case 11:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
{
cprintf("{%s}", *v18, a3, a4, a5, a6);
}
else if ( v16 != 1 )
{
cprintf("%d", v16, a3, a4, a5, a6);
}
result = cprintf("<> %s", *v17, a3, a4, a5, a6);
break;
case 12:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
{
cprintf("{%s}", *v18, a3, a4, a5, a6);
}
else if ( v16 != 1 )
{
cprintf("%d", v16, a3, a4, a5, a6);
}
result = cprintf(">| %s", *v17, a3, a4, a5, a6);
break;
case 13:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
{
result = cprintf("{%s}<&%s", *v18, *v17, a4, a5, a6);
}
else if ( v16 )
{
result = cprintf("%d<&%s", v16, *v17, a4, a5, a6);
}
else
{
result = cprintf("<&%s", *v17, a3, a4, a5, a6);
}
break;
case 14:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
{
result = cprintf("{%s}>&%s", *v18, *v17, a4, a5, a6);
}
else if ( v16 == 1 )
{
result = cprintf(">&%s", *v17, a3, a4, a5, a6);
}
else
{
result = cprintf("%d>&%s", v16, *v17, a4, a5, a6);
}
break;
case 15:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
result = cprintf("{%s}<&%d-", *v18, v15, a4, a5, a6);
else
result = cprintf("%d<&%d-", v16, v15, a4, a5, a6);
break;
case 16:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
result = cprintf("{%s}>&%d-", *v18, v15, a4, a5, a6);
else
result = cprintf("%d>&%d-", v16, v15, a4, a5, a6);
break;
case 17:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
result = cprintf("{%s}<&%s-", *v18, *v17, a4, a5, a6);
else
result = cprintf("%d<&%s-", v16, *v17, a4, a5, a6);
break;
case 18:
if ( (*(_DWORD *)(a1 + 16) & 1) != 0 )
result = cprintf("{%s}>&%s-", *v18, *v17, a4, a5, a6);
else
result = cprintf("%d>&%s-", v16, *v17, a4, a5, a6);
break;
case 19:
result = cprintf("&>> %s", *v17, a3, a4, a5, a6);
break;
default:
return result;
}
return result;
}
|
int
returncmd(int argc, char **argv)
{
int skip;
int status;
if (argv[1]) {
skip = (1 << 2);
status = number(argv[1]);
} else {
skip = (1 << 3);
status = exitstatus;
}
evalskip = skip;
return status;
}
| long returncmd(long a1, long a2)
{
int v3;
unsigned int v4;
if ( *(_QWORD *)(a2 + 8) )
{
v3 = 4;
v4 = number(*(_QWORD *)(a2 + 8));
}
else
{
v3 = 8;
v4 = exitstatus;
}
evalskip = v3;
return v4;
}
|
static void usage(void)
{
fprintf(
stderr
,
"Usage: ip ntable change name NAME [ dev DEV ]\n"
" [ thresh1 VAL ] [ thresh2 VAL ] [ thresh3 VAL ] [ gc_int MSEC ]\n"
" [ PARMS ]\n"
"Usage: ip ntable show [ dev DEV ] [ name NAME ]\n"
"PARMS := [ base_reachable MSEC ] [ retrans MSEC ] [ gc_stale MSEC ]\n"
" [ delay_probe MSEC ] [ queue LEN ]\n"
" [ app_probes VAL ] [ ucast_probes VAL ] [ mcast_probes VAL ]\n"
" [ anycast_delay MSEC ] [ proxy_delay MSEC ] [ proxy_queue LEN ]\n"
" [ locktime MSEC ]\n"
);
exit(-1);
}
| void usage() {
fprintf(stderr, "Usage: ip ntable change name NAME [ dev DEV ]\n [ thresh1 VAL ] [ thresh2 VAL ] [ thresh3 VAL ] [ gc_int MSEC ]\n [ PARMS ]\nUsage: ip ntable show [ dev DEV ] [ name NAME ]\nPARMS := [ base_reachable MSEC ] [ retrans MSEC ] [ gc_stale MSEC ]\n [ delay_probe MSEC ] [ queue LEN ]\n [ app_probes VAL ] [ ucast_probes VAL ] [ mcast_probes VAL ]\n [ anycast_delay MSEC ] [ proxy_delay MSEC ] [ proxy_queue LEN ]\n [ locktime MSEC ]\n");
exit(0xffffffff);
}
|
void
flush_write (void)
{
flush_write_ptr (record_size);
}
| long long flush_write() {
return *(4213552)(record_size);
}
|
ed_sequence_lead_in(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
return 0;
}
| long long ed_sequence_lead_in(unsigned long a0, unsigned long a1) {
unsigned int v0;
unsigned long v1;
v1 = a0;
v0 = a1;
return 0;
}
|
void
print_case_command_head (case_command)
CASE_COM *case_command;
{
cprintf ("case %s in ", case_command->word->word);
}
| void print_case_command_head(unsigned long a0) {
unsigned long v0;
unsigned long long v2;
v0 = a0;
v2 = cprintf("case %s in ");
return;
}
|
sh_getopt_state_t *
sh_getopt_alloc_istate ()
{
sh_getopt_state_t *ret;
ret = (sh_getopt_state_t *)sh_xmalloc((sizeof (sh_getopt_state_t)), "getopt.c", 231);
return ret;
}
| long sh_getopt_alloc_istate()
{
return sh_xmalloc(32LL, "getopt.c", 231LL);
}
|
int
ssh_remove_all_identities(int sock, int version)
{
struct sshbuf *msg;
u_char type = (version == 1) ?
9 :
19;
int r;
if ((msg = sshbuf_new()) ==
((void *)0)
)
return -2;
if ((r = sshbuf_put_u8(msg, type)) != 0)
goto out;
if ((r = ssh_request_reply_decode(sock, msg)) != 0)
goto out;
r = 0;
out:
sshbuf_free(msg);
return r;
}
| int ssh_remove_all_identities(undefined4 param_1,int param_2)
{
undefined uVar1;
long lVar2;
int local_14;
if (param_2 == 1) {
uVar1 = 9;
}
else {
uVar1 = 0x13;
}
lVar2 = sshbuf_new();
if (lVar2 == 0) {
local_14 = -2;
}
else {
local_14 = sshbuf_put_u8(lVar2,uVar1);
if ((local_14 == 0) && (local_14 = ssh_request_reply_decode(param_1,lVar2), local_14 == 0)) {
local_14 = 0;
}
sshbuf_free(lVar2);
}
return local_14;
}
|
int
_rl_isearch_callback (_rl_search_cxt *cxt)
{
int c, r;
c = _rl_search_getchar (cxt);
r = _rl_isearch_dispatch (cxt, cxt->lastc);
return (r <= 0) ? _rl_isearch_cleanup (cxt, r) : 0;
}
| long long _rl_isearch_callback(struct_0 *a0, unsigned long a1, unsigned long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5) {
unsigned int v0;
unsigned int v1;
void* v3;
v0 = _rl_search_getchar(a0);
v1 = _rl_isearch_dispatch(a0, a0->field_6c, a0->field_6c, a3, a4, a5);
if (v1 > 0)
v3 = 0;
else
v3 = _rl_isearch_cleanup(a0, v1, v1, a3, a4, a5);
return v3;
}
|
static void signal_cancel(int sig __attribute__((unused)))
{
e2fsck_t ctx = e2fsck_global_ctx;
if (!ctx)
exit(32);
ctx->flags |= 0x0002;
}
| long signal_cancel()
{
long result;
if ( !e2fsck_global_ctx )
exit(32);
result = e2fsck_global_ctx;
*(_DWORD *)(e2fsck_global_ctx + 72) |= 2u;
return result;
}
|
static unsigned read_buf(strm, buf, size)
z_streamp strm;
Bytef *buf;
unsigned size;
{
unsigned len = strm->avail_in;
if (len > size) len = size;
if (len == 0) return 0;
strm->avail_in -= len;
memcpy(buf, strm->next_in, len);
if (strm->state->wrap == 1) {
strm->adler = adler32(strm->adler, buf, len);
}
else if (strm->state->wrap == 2) {
strm->adler = crc32(strm->adler, buf, len);
}
strm->next_in += len;
strm->total_in += len;
return len;
}
| uint read_buf(void **param_1,void *param_2,uint param_3)
{
void *pvVar1;
uint local_c;
local_c = *(uint *)(param_1 + 1);
if (param_3 < local_c) {
local_c = param_3;
}
if (local_c == 0) {
local_c = 0;
}
else {
*(uint *)(param_1 + 1) = *(int *)(param_1 + 1) - local_c;
memcpy(param_2,*param_1,(ulong)local_c);
if (*(int *)((long)param_1[7] + 0x30) == 1) {
pvVar1 = (void *)adler32(param_1[0xc],param_2,local_c);
param_1[0xc] = pvVar1;
}
else if (*(int *)((long)param_1[7] + 0x30) == 2) {
pvVar1 = (void *)crc32(param_1[0xc],param_2,local_c);
param_1[0xc] = pvVar1;
}
*param_1 = (void *)((long)*param_1 + (ulong)local_c);
param_1[2] = (void *)((long)param_1[2] + (ulong)local_c);
}
return local_c;
}
|
void
libbsd_MD5Update(MD5_CTX *context, const uint8_t *data, size_t len)
{
MD5Update(context, data, len);
}
| long libbsd_MD5Update(long a1, long a2, long a3)
{
return MD5Update(a1, a2, a3);
}
|
static void
proc_text (void)
{
static intmax_t blank_lines = 0;
switch (*current_type)
{
case 'a':
if (blank_join > 1)
{
if (1 < line_buf.length || ++blank_lines == blank_join)
{
print_lineno ();
blank_lines = 0;
}
else
fputs_unlocked (print_no_line_fmt,
stdout
);
}
else
print_lineno ();
break;
case 't':
if (1 < line_buf.length)
print_lineno ();
else
fputs_unlocked (print_no_line_fmt,
stdout
);
break;
case 'n':
fputs_unlocked (print_no_line_fmt,
stdout
);
break;
case 'p':
switch (re_search (current_regex, line_buf.buffer, line_buf.length - 1,
0, line_buf.length - 1,
((void *)0)
))
{
case -2:
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), gettext (\"error in regular expression search\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
,
(*__errno_location ())
, gettext ("error in regular expression search")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
,
(*__errno_location ())
, gettext ("error in regular expression search")), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
case -1:
fputs_unlocked (print_no_line_fmt,
stdout
);
break;
default:
print_lineno ();
break;
}
}
fwrite_unlocked (line_buf.buffer,sizeof (char),line_buf.length,
stdout
);
}
| void proc_text() {
unsigned long long v1;
unsigned long long v2;
switch (*(current_type)) {
case 116:
if (*(&g_401788) <= 1) {
fputs_unlocked(*(&print_no_line_fmt), *(&stdout));
break;
} else {
print_lineno();
break;
}
case 112:
v1 = re_search(current_regex, g_401790, *(&g_401788) - 1, 0x0, *(&g_401788) - 1, 0x0);
if (v1 == -2) {
error(0x1, *(__errno_location()), gettext("error in regular expression search"));
} else if (v1 == -1) {
fputs_unlocked(*(&print_no_line_fmt), *(&stdout));
break;
} else {
print_lineno();
break;
}
case 97:
if (blank_join <= 1) {
print_lineno();
break;
} else if (*(&g_401788) > 1 || (blank_lines.5995 = blank_lines.5995 + 1, blank_lines.5995 == blank_join)) {
print_lineno();
blank_lines.5995 = 0;
break;
} else {
fputs_unlocked(*(&print_no_line_fmt), *(&stdout));
break;
}
case 110:
fputs_unlocked(*(&print_no_line_fmt), *(&stdout));
break;
default:
v2 = fwrite_unlocked(g_401790, 0x1, *(&g_401788), *(&stdout));
return;
}
}
|
static char *
expand_string(int nr)
{
STRDEF *h = strdef;
if (!nr)
return
((void *)0)
;
while (h)
if (h->nr == nr) {
curpos += h->slen;
return h->st;
} else
h = h->next;
return
((void *)0)
;
}
| undefined8 expand_string(int param_1)
{
int *local_10;
local_10 = strdef;
if (param_1 != 0) {
for (; local_10 != (int *)0x0; local_10 = *(int **)(local_10 + 4)) {
if (param_1 == *local_10) {
curpos = curpos + local_10[1];
return *(undefined8 *)(local_10 + 2);
}
}
}
return 0;
}
|
int
crypto_hash_sha512(unsigned char *out, const unsigned char *in,
unsigned long long inlen)
{
if (!EVP_Digest(in, inlen, out,
((void *)0)
, EVP_sha512(),
((void *)0)
))
return -1;
return 0;
}
| long long crypto_hash_sha512(unsigned long long a0, unsigned long long a1, unsigned long long a2) {
return (!EVP_Digest(a1, a2, a0, 0x0, EVP_sha512(), 0x0) ? 0 : 4294967295);
}
|
int
ga_match(char * const *groups, int n)
{
int i, j;
for (i = 0; i < ngroups; i++)
for (j = 0; j < n; j++)
if (match_pattern(groups_byname[i], groups[j]))
return 1;
return 0;
}
| long ga_match(long a1, int a2)
{
int i;
int j;
for ( i = 0; i < ngroups; ++i )
{
for ( j = 0; j < a2; ++j )
{
if ( (unsigned int)match_pattern(*((_QWORD *)groups_byname + i), *(_QWORD *)(8LL * j + a1)) )
return 1LL;
}
}
return 0LL;
}
|
static void xfrm_usersa_print(const struct xfrm_usersa_id *sa_id, __u32 reqid, FILE *fp)
{
fprintf(fp, "dst %s ",
rt_addr_n2a(sa_id->family, sizeof(sa_id->daddr), &sa_id->daddr));
fprintf(fp, " reqid 0x%x", reqid);
fprintf(fp, " protocol %s ", strxf_proto(sa_id->proto));
fprintf(fp, " SPI 0x%x", ntohl(sa_id->spi));
}
| int xfrm_usersa_print(long a1, unsigned int a2, FILE *a3)
{
const char *v3;
const char *v4;
uint32_t v5;
v3 = (const char *)rt_addr_n2a(*(unsigned short *)(a1 + 20), 16LL, a1);
fprintf(a3, "dst %s ", v3);
fprintf(a3, " reqid 0x%x", a2);
v4 = (const char *)strxf_proto(*(unsigned char *)(a1 + 22));
fprintf(a3, " protocol %s ", v4);
v5 = ntohl(*(_DWORD *)(a1 + 16));
return fprintf(a3, " SPI 0x%x", v5);
}
|
sshsig_t
ssh_signal(int signum, sshsig_t handler)
{
struct sigaction sa, osa;
memset(&sa, 0, sizeof(sa));
sa.
__sigaction_handler.sa_handler
= handler;
sigfillset(&sa.sa_mask);
if (signum !=
14
)
sa.sa_flags =
0x10000000
;
if (sigaction(signum, &sa, &osa) == -1) {
sshlog("misc.c", __func__, 2596, 0, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "sigaction(%s): %s", strsignal(signum), strerror(
(*__errno_location ())
));
return
((__sighandler_t) -1)
;
}
return osa.
__sigaction_handler.sa_handler
;
}
| __sighandler_t ssh_signal(int a1, void (*a2)(int))
{
int *v2;
char *v3;
char *v4;
struct sigaction s;
struct sigaction v7;
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(&s, 0, sizeof(s));
s.sa_handler = a2;
sigfillset(&s.sa_mask);
if ( a1 != 14 )
s.sa_flags = 0x10000000;
if ( sigaction(a1, &s, &v7) != -1 )
return v7.sa_handler;
v2 = _errno_location();
v3 = strerror(*v2);
v4 = strsignal(a1);
sshlog("misc.c", "ssh_signal", 2596LL, 0LL, 7LL, 0LL, "sigaction(%s): %s", v4, v3);
return (__sighandler_t)-1LL;
}
|
int
main (argc, argv)
int argc;
char **argv;
{
int arg_index = 1;
FILE *structfile, *externfile;
char *documentation_filename, *temp_struct_filename;
structfile = externfile = (FILE *)
((void *)0)
;
documentation_filename = "builtins.texi";
temp_struct_filename = (char *)
((void *)0)
;
while (arg_index < argc && argv[arg_index][0] == '-')
{
char *arg = argv[arg_index++];
if (strcmp (arg, "-externfile") == 0)
extern_filename = argv[arg_index++];
else if (strcmp (arg, "-includefile") == 0)
include_filename = argv[arg_index++];
else if (strcmp (arg, "-structfile") == 0)
struct_filename = argv[arg_index++];
else if (strcmp (arg, "-noproduction") == 0)
inhibit_production = 1;
else if (strcmp (arg, "-nofunctions") == 0)
inhibit_functions = 1;
else if (strcmp (arg, "-document") == 0)
documentation_file = fopen (documentation_filename, "w");
else if (strcmp (arg, "-D") == 0)
{
int len;
if (error_directory)
free (error_directory);
error_directory = xmalloc (2 + strlen (argv[arg_index]));
strcpy (error_directory, argv[arg_index]);
len = strlen (error_directory);
if (len && error_directory[len - 1] != '/')
strcat (error_directory, "/");
arg_index++;
}
else if (strcmp (arg, "-documentonly") == 0)
{
only_documentation = 1;
documentation_file = fopen (documentation_filename, "w");
}
else if (strcmp (arg, "-H") == 0)
{
separate_helpfiles = 1;
helpfile_directory = argv[arg_index++];
}
else if (strcmp (arg, "-S") == 0)
single_longdoc_strings = 0;
else
{
fprintf (
stderr
, "%s: Unknown flag %s.\n", argv[0], arg);
exit (2);
}
}
if (include_filename == 0)
include_filename = extern_filename;
if (arg_index == argc)
exit (0);
if (!only_documentation)
{
if (struct_filename)
{
temp_struct_filename = xmalloc (15);
sprintf (temp_struct_filename, "mk-%ld", (long) getpid ());
structfile = fopen (temp_struct_filename, "w");
if (!structfile)
file_error (temp_struct_filename);
}
if (extern_filename)
{
externfile = fopen (extern_filename, "w");
if (!externfile)
file_error (extern_filename);
}
write_file_headers (structfile, externfile);
}
if (documentation_file)
{
fprintf (documentation_file, "@c Table of builtins created with %s.\n",
argv[0]);
fprintf (documentation_file, "@ftable @asis\n");
}
while (arg_index < argc)
{
register char *arg;
arg = argv[arg_index++];
extract_info (arg, structfile, externfile);
}
if (!only_documentation)
{
write_file_footers (structfile, externfile);
if (structfile)
{
write_longdocs (structfile, saved_builtins);
fclose (structfile);
rename (temp_struct_filename, struct_filename);
}
if (externfile)
fclose (externfile);
}
if (documentation_file)
{
fprintf (documentation_file, "@end ftable\n");
fclose (documentation_file);
}
exit (0);
}
| int main(int argc, const char **argv, const char **envp)
{
int v3;
int v4;
int v5;
int v6;
int v7;
int v8;
__pid_t v9;
int v10;
int v11;
int v12;
FILE *stream;
FILE *v14;
char *s;
char *s1;
v11 = 1;
v14 = 0LL;
stream = 0LL;
s = 0LL;
while ( v11 < argc && *argv[v11] == 45 )
{
v3 = v11++;
s1 = (char *)argv[v3];
if ( !strcmp(s1, "-externfile") )
{
v4 = v11++;
extern_filename = (char *)argv[v4];
}
else if ( !strcmp(s1, "-includefile") )
{
v5 = v11++;
include_filename = (long)argv[v5];
}
else if ( !strcmp(s1, "-structfile") )
{
v6 = v11++;
struct_filename = (char *)argv[v6];
}
else if ( !strcmp(s1, "-noproduction") )
{
inhibit_production = 1;
}
else if ( !strcmp(s1, "-nofunctions") )
{
inhibit_functions = 1;
}
else if ( !strcmp(s1, "-document") )
{
documentation_file = fopen("builtins.texi", "w");
}
else if ( !strcmp(s1, "-D") )
{
if ( error_directory )
free(error_directory);
v7 = strlen(argv[v11]);
error_directory = (char *)xmalloc(v7 + 2);
strcpy(error_directory, argv[v11]);
v12 = strlen(error_directory);
if ( v12 && error_directory[v12 - 1] != 47 )
strcat(error_directory, "/");
++v11;
}
else if ( !strcmp(s1, "-documentonly") )
{
only_documentation = 1;
documentation_file = fopen("builtins.texi", "w");
}
else if ( !strcmp(s1, "-H") )
{
separate_helpfiles = 1;
v8 = v11++;
helpfile_directory = (char *)argv[v8];
}
else
{
if ( strcmp(s1, "-S") )
{
fprintf(stderr, "%s: Unknown flag %s.\n", *argv, s1);
exit(2);
}
single_longdoc_strings = 0;
}
}
if ( !include_filename )
include_filename = (long)extern_filename;
if ( v11 == argc )
exit(0);
if ( !only_documentation )
{
if ( struct_filename )
{
s = (char *)xmalloc(15);
v9 = getpid();
sprintf(s, "mk-%ld", v9);
stream = fopen(s, "w");
if ( !stream )
file_error(s);
}
if ( extern_filename )
{
v14 = fopen(extern_filename, "w");
if ( !v14 )
file_error(extern_filename);
}
write_file_headers(stream, v14);
}
if ( documentation_file )
{
fprintf(documentation_file, "@c Table of builtins created with %s.\n", *argv);
fprintf(documentation_file, "@ftable @asis\n");
}
while ( v11 < argc )
{
v10 = v11++;
extract_info(argv[v10], stream, v14);
}
if ( !only_documentation )
{
write_file_footers(stream);
if ( stream )
{
write_longdocs(stream, saved_builtins);
fclose(stream);
rename(s, struct_filename);
}
if ( v14 )
fclose(v14);
}
if ( documentation_file )
{
fprintf(documentation_file, "@end ftable\n");
fclose(documentation_file);
}
exit(0);
}
|
static inline
_Bool
usable_st_size (struct stat const *sb)
{
return (
((((
sb->st_mode
)) & 0170000) == (0100000))
||
((((
sb->st_mode
)) & 0170000) == (0120000))
||
((
sb
)->st_mode - (
sb
)->st_mode)
||
0
);
}
| int usable_st_size(struct_0 *a0) {
unsigned int v1;
unsigned int v2;
if ((a0->field_18 & 0xf000) == 0x8000) {
LABEL_40037e:
v1 = 1;
} else {
if ((a0->field_18 & 0xf000) == 0xa000)
goto LABEL_40037e;
v1 = 0;
}
v2 = v1 & 1;
return v2;
}
|
static void
fts_skip_tree (FTS *fts, FTSENT *ent)
{
rpl_fts_set (fts, ent, 4);
(__extension__ ({ __typeof__ (rpl_fts_read (fts)) __x = (rpl_fts_read (fts)); (void) __x; }));
}
| void fts_skip_tree(unsigned long long a0, unsigned long long a1) {
unsigned long v0;
rpl_fts_set(a0, a1, 0x4, a1);
*(&v0) = rpl_fts_read(a0);
return;
}
|
static void
dump_cfg_forwards(OpCodes code, u_int count, const struct Forward *fwds)
{
const struct Forward *fwd;
u_int i;
for (i = 0; i < count; i++) {
fwd = &fwds[i];
if (code == oDynamicForward && fwd->connect_host !=
((void *)0)
&&
strcmp(fwd->connect_host, "socks") != 0)
continue;
if (code == oLocalForward && fwd->connect_host !=
((void *)0)
&&
strcmp(fwd->connect_host, "socks") == 0)
continue;
printf("%s", lookup_opcode_name(code));
if (fwd->listen_port == -2)
printf(" %s", fwd->listen_path);
else if (fwd->listen_host ==
((void *)0)
)
printf(" %d", fwd->listen_port);
else {
printf(" [%s]:%d",
fwd->listen_host, fwd->listen_port);
}
if (code != oDynamicForward) {
if (fwd->connect_port == -2)
printf(" %s", fwd->connect_path);
else if (fwd->connect_host ==
((void *)0)
)
printf(" %d", fwd->connect_port);
else {
printf(" [%s]:%d",
fwd->connect_host, fwd->connect_port);
}
}
printf("\n");
}
}
| long dump_cfg_forwards(int a1, unsigned int a2, long a3)
{
const char *v3;
long result;
unsigned int i;
long v7;
for ( i = 0; ; ++i )
{
result = i;
if ( i >= a2 )
break;
v7 = 56LL * i + a3;
if ( (a1 != 42 || !*(_QWORD *)(v7 + 24) || !strcmp(*(const char **)(v7 + 24), "socks"))
&& (a1 != 16 || !*(_QWORD *)(v7 + 24) || strcmp(*(const char **)(v7 + 24), "socks")) )
{
v3 = lookup_opcode_name(a1);
printf("%s", v3);
if ( *(_DWORD *)(v7 + 8) == -2 )
{
printf(" %s", *(const char **)(v7 + 16));
}
else if ( *(_QWORD *)v7 )
{
printf(" [%s]:%d", *(const char **)v7, *(unsigned int *)(v7 + 8));
}
else
{
printf(" %d", *(unsigned int *)(v7 + 8));
}
if ( a1 != 42 )
{
if ( *(_DWORD *)(v7 + 32) == -2 )
{
printf(" %s", *(const char **)(v7 + 40));
}
else if ( *(_QWORD *)(v7 + 24) )
{
printf(" [%s]:%d", *(const char **)(v7 + 24), *(unsigned int *)(v7 + 32));
}
else
{
printf(" %d", *(unsigned int *)(v7 + 32));
}
}
printf("\n");
}
}
return result;
}
|
static int
get_nondigit_option (int argc, char *const *argv, intmax_t *default_context)
{
static int prev_digit_optind = -1;
int this_digit_optind;
_Bool
was_digit;
char buf[((((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + 1) + 4];
char *p = buf;
int opt;
was_digit =
0
;
this_digit_optind = optind;
while (
1
)
{
opt = getopt_long (argc, (char **) argv, short_options,
long_options,
((void *)0)
);
if (! c_isdigit (opt))
break;
if (prev_digit_optind != this_digit_optind || !was_digit)
{
p = buf;
}
else
{
p -= buf[0] == '0';
}
if (p == buf + sizeof buf - 4)
{
strcpy (p, "...");
p += 3;
break;
}
*p++ = opt;
was_digit =
1
;
prev_digit_optind = this_digit_optind;
this_digit_optind = optind;
}
if (p != buf)
{
*p = '\0';
context_length_arg (buf, default_context);
}
return opt;
}
| undefined4 get_nondigit_option(undefined4 param_1,undefined8 param_2,undefined8 param_3)
{
bool bVar1;
char cVar2;
undefined4 uVar3;
long in_FS_OFFSET;
int local_48;
char *local_40;
char local_38 [21];
char acStack35 [19];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
bVar1 = false;
local_48 = optind;
local_40 = local_38;
do {
optind = local_48;
uVar3 = getopt_long(param_1,param_2,"0123456789A:B:C:D:EFGHIPTUVX:abcd:e:f:hiLlm:noqRrsuvwxyZz",
long_options,0);
cVar2 = c_isdigit();
if (cVar2 != '\x01') {
LAB_00103615:
if (local_40 != local_38) {
*local_40 = '\0';
context_length_arg(local_38,param_3);
}
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return uVar3;
}
if ((local_48 == prev_digit_optind_7695) && (bVar1)) {
local_40 = local_40 + -(ulong)(local_38[0] == '0');
}
else {
local_40 = local_38;
}
if (local_40 == acStack35) {
strcpy(local_40,"...");
local_40 = local_40 + 3;
goto LAB_00103615;
}
*local_40 = (char)uVar3;
bVar1 = true;
prev_digit_optind_7695 = local_48;
local_48 = optind;
local_40 = local_40 + 1;
} while( true );
}
|
int
read_history(const char *filename)
{
HistEvent ev;
if (h ==
((void *)0)
|| e ==
((void *)0)
)
rl_initialize();
if (filename ==
((void *)0)
&& (filename = _default_history_file()) ==
((void *)0)
)
return
(*__errno_location ())
;
(*__errno_location ())
= 0;
if (history(h, &ev, 17, filename) == -1)
return
(*__errno_location ())
?
(*__errno_location ())
:
22
;
if (history(h, &ev, 2) == 0)
history_length = ev.num;
if (history_length < 0)
return
22
;
return 0;
}
| int read_history(long param_1)
{
int *piVar1;
long in_FS_OFFSET;
long local_30;
undefined local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((h != 0) && (e != 0)) {
local_30 = param_1;
if (param_1 == 0) {
local_30 = _default_history_file();
if (local_30 == 0) {
piVar1 = __errno_location();
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return *piVar1;
}
}
piVar1 = __errno_location();
*piVar1 = 0;
history(h,local_28,0x11,local_30);
}
rl_initialize();
}
|
int
ssh_packet_get_mux(struct ssh *ssh)
{
return ssh->state->mux;
}
| long long ssh_packet_get_mux(struct struct_0 **a0) {
return *(a0)->field_1e0;
}
|
static void
undotlines (FILE *outputfile,
_Bool
leading_dot, printint start, printint num)
{
fputs_unlocked (".\n",outputfile);
if (leading_dot)
{
if (num == 1)
fprintf (outputfile, "%""l""ds/^\\.
else
fprintf (outputfile, "%""l""d,%""l""ds/^\\.
}
}
| int undotlines(FILE *a1, char a2, long a3, long a4)
{
int result;
result = fputs_unlocked(".\n", a1);
if ( a2 )
{
if ( a4 == 1 )
return fprintf(a1, "%lds/^\\.
else
return fprintf(a1, "%ld,%lds/^\\.
}
return result;
}
|
static void
popexp ()
{
EXPR_CONTEXT *context;
if (expr_depth <= 0)
{
expression = lasttp = 0;
evalerror (gettext("recursion stack underflow"));
}
context = expr_stack[--expr_depth];
expression = context->expression;
do { curtok = (context)->curtok; lasttok = (context)->lasttok; tp = (context)->tp; lasttp = (context)->lasttp; tokval = (context)->tokval; tokstr = (context)->tokstr; noeval = (context)->noeval; curlval = (context)->lval; } while (0);
sh_xfree((context), "expr.c", 299);
}
| long popexp()
{
char *v0;
long v1;
long v2;
long v4;
if ( expr_depth <= 0 )
{
lasttp = 0LL;
expression = 0LL;
v0 = gettext("recursion stack underflow");
evalerror((long)v0);
}
v4 = *(_QWORD *)(8LL * --expr_depth + expr_stack);
expression = *(_QWORD *)(v4 + 8);
curtok = *(_DWORD *)v4;
lasttok = *(_DWORD *)(v4 + 4);
tp = *(char **)(v4 + 16);
lasttp = *(_QWORD *)(v4 + 24);
tokval = *(_QWORD *)(v4 + 32);
tokstr = *(char **)(v4 + 40);
noeval = *(_DWORD *)(v4 + 48);
v1 = *(_QWORD *)(v4 + 64);
curlval = *(_QWORD *)(v4 + 56);
qword_2B88 = v1;
v2 = *(_QWORD *)(v4 + 80);
qword_2B90 = *(_QWORD *)(v4 + 72);
qword_2B98 = v2;
return sh_xfree(v4, "expr.c", 299LL);
}
|
struct sshauthopt *
sshauthopt_merge(const struct sshauthopt *primary,
const struct sshauthopt *additional, const char **errstrp)
{
struct sshauthopt *ret;
const char *errstr = "internal error";
const char *tmp;
if (errstrp !=
((void *)0)
)
*errstrp =
((void *)0)
;
if ((ret = sshauthopt_new()) ==
((void *)0)
)
goto alloc_fail;
tmp = primary->required_from_host_cert;
if (tmp ==
((void *)0)
)
tmp = additional->required_from_host_cert;
if (tmp !=
((void *)0)
&& (ret->required_from_host_cert = strdup(tmp)) ==
((void *)0)
)
goto alloc_fail;
tmp = primary->required_from_host_keys;
if (tmp ==
((void *)0)
)
tmp = additional->required_from_host_keys;
if (tmp !=
((void *)0)
&& (ret->required_from_host_keys = strdup(tmp)) ==
((void *)0)
)
goto alloc_fail;
ret->force_tun_device = primary->force_tun_device;
if (ret->force_tun_device == -1)
ret->force_tun_device = additional->force_tun_device;
if (primary->nenv > 0) {
if (dup_strings(&ret->env, &ret->nenv,
primary->env, primary->nenv) != 0)
goto alloc_fail;
} else if (additional->nenv) {
if (dup_strings(&ret->env, &ret->nenv,
additional->env, additional->nenv) != 0)
goto alloc_fail;
}
if (primary->npermitopen > 0) {
if (dup_strings(&ret->permitopen, &ret->npermitopen,
primary->permitopen, primary->npermitopen) != 0)
goto alloc_fail;
} else if (additional->npermitopen > 0) {
if (dup_strings(&ret->permitopen, &ret->npermitopen,
additional->permitopen, additional->npermitopen) != 0)
goto alloc_fail;
}
if (primary->npermitlisten > 0) {
if (dup_strings(&ret->permitlisten, &ret->npermitlisten,
primary->permitlisten, primary->npermitlisten) != 0)
goto alloc_fail;
} else if (additional->npermitlisten > 0) {
if (dup_strings(&ret->permitlisten, &ret->npermitlisten,
additional->permitlisten, additional->npermitlisten) != 0)
goto alloc_fail;
}
ret->permit_port_forwarding_flag = (primary->permit_port_forwarding_flag == 1) && (additional->permit_port_forwarding_flag == 1);
ret->permit_agent_forwarding_flag = (primary->permit_agent_forwarding_flag == 1) && (additional->permit_agent_forwarding_flag == 1);
ret->permit_x11_forwarding_flag = (primary->permit_x11_forwarding_flag == 1) && (additional->permit_x11_forwarding_flag == 1);
ret->permit_pty_flag = (primary->permit_pty_flag == 1) && (additional->permit_pty_flag == 1);
ret->permit_user_rc = (primary->permit_user_rc == 1) && (additional->permit_user_rc == 1);
ret->no_require_user_presence = (primary->no_require_user_presence == 1) && (additional->no_require_user_presence == 1);
ret->require_verify = (primary->require_verify == 1) || (additional->require_verify == 1);
if (primary->valid_before != 0)
ret->valid_before = primary->valid_before;
if (additional->valid_before != 0 &&
additional->valid_before < ret->valid_before)
ret->valid_before = additional->valid_before;
if (primary->force_command !=
((void *)0)
&&
additional->force_command !=
((void *)0)
) {
if (strcmp(primary->force_command,
additional->force_command) == 0) {
ret->force_command = strdup(primary->force_command);
if (ret->force_command ==
((void *)0)
)
goto alloc_fail;
} else {
errstr = "forced command options do not match";
goto fail;
}
} else if (primary->force_command !=
((void *)0)
) {
if ((ret->force_command = strdup(
primary->force_command)) ==
((void *)0)
)
goto alloc_fail;
} else if (additional->force_command !=
((void *)0)
) {
if ((ret->force_command = strdup(
additional->force_command)) ==
((void *)0)
)
goto alloc_fail;
}
if (errstrp !=
((void *)0)
)
*errstrp =
((void *)0)
;
return ret;
alloc_fail:
errstr = "memory allocation failed";
fail:
if (errstrp !=
((void *)0)
)
*errstrp = errstr;
sshauthopt_free(ret);
return
((void *)0)
;
}
| long long sshauthopt_merge(struct_0 *a0, struct_0 *a1, unsigned long long *a2) {
unsigned long long v0;
char *v1;
void* v2;
unsigned long long v4;
unsigned long long v5;
unsigned long long v6;
unsigned long long v7;
unsigned long long v8;
unsigned long long v9;
unsigned int v10;
unsigned int v11;
unsigned int v12;
unsigned int v13;
unsigned int v14;
unsigned int v15;
unsigned long long v16;
void* v17;
v0 = "internal error";
if (a2)
*(a2) = 0;
v2 = sshauthopt_new();
if (v2) {
v1 = a0->field_70;
if (!v1)
v1 = a1->field_70;
if (v1)
*(&v2[112]) = strdup(v1);
if (!v1 || v2[112]) {
v1 = a0->field_78;
if (!v1)
v1 = a1->field_78;
if (v1)
*(&v2[120]) = strdup(v1);
if (!v1 || v2[120]) {
*(&v2[48]) = a0->field_30;
if (v2[48] == -1)
*(&v2[48]) = a1->field_30;
if (a0->field_40) {
v4 = dup_strings(v2 + 72, v2 + 64, a0->field_48, a0->field_40);
} else if (a1->field_40) {
v5 = dup_strings(v2 + 72, v2 + 64, a1->field_48, a1->field_40);
}
}
}
}
if (!a0->field_40 && a1->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !v5 || a0->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !v4 || !a0->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !a1->field_40) {
if (a0->field_50) {
v6 = dup_strings(v2 + 88, v2 + 80, a0->field_58, a0->field_50);
} else if (a1->field_50) {
v7 = dup_strings(v2 + 88, v2 + 80, a1->field_58, a1->field_50);
}
}
if ((!a0->field_40 && a1->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !v5 || a0->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !v4 || !a0->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !a1->field_40) && !a0->field_50 && a1->field_50 && !v7 || (!a0->field_40 && a1->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !v5 || a0->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !v4 || !a0->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !a1->field_40) && a0->field_50 && !v6 || (!a0->field_40 && a1->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !v5 || a0->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !v4 || !a0->field_40 && v2 && (!v1 || v2[112]) && (!v1 || v2[120]) && !a1->field_40) && !a0->field_50 && !a1->field_50) {
if (a0->field_60) {
v8 = dup_strings(v2 + 104, v2 + 96, a0->field_68, a0->field_60);
} else if (a1->field_60) {
v9 = dup_strings(v2 + 104, v2 + 96, a1->field_68, a1->field_60);
}
}
if (...) {
if (a0->field_0 == 1 && a1->field_0 == 1)
v10 = 1;
if (a1->field_0 != 1 || a0->field_0 != 1)
v10 = 0;
*(v2) = v10;
if (a0->field_4 == 1 && a1->field_4 == 1)
v11 = 1;
if (a0->field_4 != 1 || a1->field_4 != 1)
v11 = 0;
*(&v2[4]) = v11;
if (a0->field_8 == 1 && a1->field_8 == 1)
v12 = 1;
if (a0->field_8 != 1 || a1->field_8 != 1)
v12 = 0;
*(&v2[8]) = v12;
if (a0->field_c == 1 && a1->field_c == 1)
v13 = 1;
if (a0->field_c != 1 || a1->field_c != 1)
v13 = 0;
*(&v2[12]) = v13;
if (a0->field_10 == 1 && a1->field_10 == 1)
v14 = 1;
if (a0->field_10 != 1 || a1->field_10 != 1)
v14 = 0;
*(&v2[16]) = v14;
if (a0->field_80 == 1 && a1->field_80 == 1)
v15 = 1;
if (a0->field_80 != 1 || a1->field_80 != 1)
v15 = 0;
*(&v2[128]) = v15;
if (a0->field_84 != 1 && a1->field_84 != 1)
a2 = 0;
if (a0->field_84 == 1 || a1->field_84 == 1)
a2 = 1;
*(&v2[132]) = a2;
if (a0->field_18)
*(&v2[24]) = a0->field_18;
if (a1->field_18 && a1->field_18 < v2[24])
*(&v2[24]) = a1->field_18;
if (a0->field_38 && a1->field_38) {
v16 = strcmp(a0->field_38, a1->field_38);
if (!v16)
*(&v2[56]) = strdup(a0->field_38);
else
v0 = "forced command options do not match";
}
}
if (...) {
if (a0->field_38) {
*(&v2[56]) = strdup(a0->field_38);
} else if (a1->field_38) {
*(&v2[56]) = strdup(a1->field_38);
}
}
if (...)
v0 = "memory allocation failed";
if (...) {
if (a2)
*(a2) = 0;
v17 = v2;
}
if (...) {
if (a2)
*(a2) = v0;
sshauthopt_free(v2);
v17 = 0;
}
return v17;
}
|
static inline void
emit_ancillary_info (char const *program)
{
struct infomap { char const *program; char const *node; } const infomap[] = {
{ "[", "test invocation" },
{ "coreutils", "Multi-call invocation" },
{ "sha224sum", "sha2 utilities" },
{ "sha256sum", "sha2 utilities" },
{ "sha384sum", "sha2 utilities" },
{ "sha512sum", "sha2 utilities" },
{
((void *)0)
,
((void *)0)
}
};
char const *node = program;
struct infomap const *map_prog = infomap;
while (map_prog->program && ! (strcmp (program, map_prog->program) == 0))
map_prog++;
if (map_prog->node)
node = map_prog->node;
printf (gettext ("\n%s online help: <%s>\n"), "GNU coreutils", "https:
char const *lc_messages = setlocale (
5
,
((void *)0)
);
if (lc_messages && strncmp (lc_messages, "" "en_" "", sizeof ("en_") - 1))
{
fputs_unlocked (gettext ("Report any translation bugs to " "<https:
stdout
)
;
}
char const *url_program = (strcmp (program, "[") == 0) ? "test" : program;
printf (gettext ("Full documentation <%s%s>\n"),
"https:
printf (gettext ("or available locally via: info '(coreutils) %s%s'\n"),
node, node == program ? " invocation" : "");
}
| void emit_ancillary_info(char *a0) {
unsigned long v0;
unsigned long long v1[2];
char *v2;
unsigned long v3;
unsigned long long v4;
unsigned long long v5;
unsigned long long v6;
unsigned long long v7;
unsigned long long v8;
unsigned long long v9;
unsigned long long v10;
unsigned long long v11;
unsigned long long v12;
unsigned long long v13;
unsigned long long v14;
unsigned long long v15;
void* v16;
void* v17;
char v18;
unsigned long long *v21;
unsigned long long v22;
v4 = "[";
v5 = "test invocation";
v6 = "coreutils";
v7 = "Multi-call invocation";
v8 = "sha224sum";
v9 = "sha2 utilities";
v10 = "sha256sum";
v11 = "sha2 utilities";
v12 = "sha384sum";
v13 = "sha2 utilities";
v14 = "sha512sum";
v15 = "sha2 utilities";
v16 = 0;
v17 = 0;
v0 = a0;
for (v1[0] = &v4; v1[0] && strcmp(a0, v1[0]); v1[0] = v1 + 1);
if (v1[1])
v0 = v1[1];
printf(gettext("\n%s online help: <%s>\n"));
v2 = setlocale(0x5, NULL);
if (v2 && strncmp(v2, "en_", 0x3))
fputs_unlocked(gettext("Report any translation bugs to <https:
*(&v3) = (!strcmp(a0, "[") ? a0 : "test");
printf(gettext("Full documentation <%s%s>\n"));
printf(gettext("or available locally via: info '(coreutils) %s%s'\n"));
v22 = *(&v18) ^ v21[5];
return;
}
|
int
auth_root_allowed(struct ssh *ssh, const char *method)
{
switch (options.permit_root_login) {
case 3:
return 1;
case 2:
if (strcmp(method, "publickey") == 0 ||
strcmp(method, "hostbased") == 0 ||
strcmp(method, "gssapi-with-mic") == 0)
return 1;
break;
case 1:
if (auth_opts->force_command !=
((void *)0)
) {
sshlog("auth.c", __func__, 366, 0, SYSLOG_LEVEL_INFO,
((void *)0)
, "Root login accepted for forced command.");
return 1;
}
break;
}
sshlog("auth.c", __func__, 371, 0, SYSLOG_LEVEL_INFO,
((void *)0)
, "ROOT LOGIN REFUSED FROM %.200s port %d", ssh_remote_ipaddr(ssh), ssh_remote_port(ssh))
;
return 0;
}
| long long auth_root_allowed(unsigned long long a0, char *a1) {
unsigned long v0;
unsigned long long v2;
unsigned long long v3;
if (*(5244020) == 3) {
v2 = 1;
} else {
if (*(5244020) <= 3) {
if (*(5244020) == 1) {
if (*((auth_opts + 56))) {
sshlog("auth.c", "auth_root_allowed", 0x16e, 0x0, 0x3, 0x0, "Root login accepted for forced command.");
v2 = 1;
goto LABEL_400df7;
}
} else {
if (*(5244020) == 2) {
if (strcmp(a1, "publickey") && strcmp(a1, "hostbased") && !(!strcmp(a1, "gssapi-with-mic")))
goto LABEL_400d98;
v2 = 1;
goto LABEL_400df7;
}
}
}
LABEL_400d98:
v3 = ssh_remote_port(a0);
v0 = ssh_remote_ipaddr(a0);
sshlog("auth.c", "auth_root_allowed", 0x173, 0x0, 0x3, 0x0, "ROOT LOGIN REFUSED FROM %.200s port %d");
v2 = 0;
}
LABEL_400df7:
return v2;
}
|
SHELL_VAR *
builtin_find_indexed_array (array_name, flags)
char *array_name;
int flags;
{
SHELL_VAR *entry;
if ((flags & 2) && legal_identifier (array_name) == 0)
{
sh_invalidid (array_name);
return (SHELL_VAR *)
((void *)0)
;
}
entry = find_or_make_array_variable (array_name, 1);
if (entry == 0)
return entry;
else if (((((entry)->attributes) & (0x0000004))) == 0)
{
builtin_error (gettext("%s: not an indexed array"), array_name);
return (SHELL_VAR *)
((void *)0)
;
}
else if (((((entry)->attributes) & (0x0001000))))
((entry)->attributes &= ~(0x0001000));
if (flags & 1)
array_flush ((ARRAY *)((entry)->value));
return entry;
}
| long long builtin_find_indexed_array(unsigned long a0, unsigned long a1) {
struct_0 *v0;
int tmp_17;
void* v2;
unsigned long long v3;
if ((a1 & 2) && !legal_identifier(a0)) {
sh_invalidid(a0);
v2 = 0;
goto LABEL_401de7;
}
v0 = find_or_make_array_variable(a0, 0x1);
if (!v0) {
v2 = v0;
} else if (!(v0->field_28 & 4)) {
gettext("%s: not an indexed array");
builtin_error();
v2 = 0;
} else {
if ((v0->field_28 & 0x1000)) {
v3 = v0->field_28;
*(&v3) = (v0->field_28 >> 8) & 239;
tmp_17 = v3;
v0->field_28 = tmp_17;
}
if ((a1 & 1))
array_flush(v0->field_8);
v2 = v0;
}
LABEL_401de7:
return v2;
}
|
static __inline void
_getentropy_fail(void)
{
raise(
9
);
}
| void _getentropy_fail() {
unsigned long long v1;
v1 = raise(0x9);
return;
}
|
static void process_flags (int argc, char **argv)
{
int c;
static struct option long_options[] = {
{"help",
0
,
((void *)0)
, 'h'},
{"force",
0
,
((void *)0)
, 'f'},
{"root",
1
,
((void *)0)
, 'R'},
{"prefix",
1
,
((void *)0)
, 'P'},
{
((void *)0)
, 0,
((void *)0)
, '\0'}
};
while ((c = getopt_long (argc, argv, "hfR:P:",
long_options,
((void *)0)
)) != -1) {
switch (c) {
case 'h':
usage (0);
break;
case 'R':
break;
case 'P':
break;
case 'f':
check_group_busy =
0
;
break;
default:
usage (2);
}
}
if (optind != argc - 1) {
usage (2);
}
group_name = argv[optind];
}
| long long process_flags(unsigned long a0, unsigned long long *a1) {
unsigned int v0;
unsigned long long v2;
while (true) {
v0 = getopt_long(a0, a1, "hfR:P:", &long_options.5783, NULL);
if (v0 == -1)
break;
switch (v0) {
case 104:
usage(0x0);
case 102:
check_group_busy = 0;
break;
case 80: case 82:
break;
default:
usage(0x2);
}
}
if (a0 - 1 == optind) {
v2 = a1[optind];
group_name = a1[optind];
return v2;
}
usage(0x2);
}
|
static void check_perms (void)
{
}
| long long check_perms() {
unsigned long v1;
return v1;
}
|
static rsRetVal
TCPSendBufUncompressed(wrkrInstanceData_t *pWrkrData, uchar *const buf, const unsigned len)
{
rsRetVal iRet = RS_RET_OK;
unsigned alreadySent;
ssize_t lenSend;
alreadySent = 0;
if((iRet = netstrm.CheckConnection(pWrkrData->pNetstrm)) != RS_RET_OK) goto finalize_it;
while(alreadySent != len) {
lenSend = len - alreadySent;
if((iRet = netstrm.Send(pWrkrData->pNetstrm, buf+alreadySent, &lenSend)) != RS_RET_OK) goto finalize_it;
if(Debug) { r_dbgprintf("omfwd.c", "omfwd: TCP sent %ld bytes, requested %u\n", (long) lenSend, len - alreadySent); };
alreadySent += lenSend;
}
((void) __sync_fetch_and_add(&pWrkrData->pData->sentBytes, len));
finalize_it:
if(iRet != RS_RET_OK) {
if(iRet == RS_RET_IO_ERROR) {
static unsigned int conErrCnt = 0;
const int skipFactor = pWrkrData->pData->iConErrSkip;
if (skipFactor <= 1) {
LogError(0, iRet, "omfwd: remote server at %s:%s seems to have closed connection. "
"This often happens when the remote peer (or an interim system like a load "
"balancer or firewall) shuts down or aborts a connection. Rsyslog will "
"re-open the connection if configured to do so (we saw a generic IO Error, "
"which usually goes along with that behaviour).",
pWrkrData->pData->target, pWrkrData->pData->port);
} else if ((conErrCnt++ % skipFactor) == 0) {
LogError(0, iRet, "omfwd: remote server at %s:%s seems to have closed connection. "
"This often happens when the remote peer (or an interim system like a load "
"balancer or firewall) shuts down or aborts a connection. Rsyslog will "
"re-open the connection if configured to do so (we saw a generic IO Error, "
"which usually goes along with that behaviour). Note that the next %d "
"connection error messages will be skipped.",
pWrkrData->pData->target, pWrkrData->pData->port, skipFactor-1);
}
} else {
LogError(0, iRet, "omfwd: TCPSendBuf error %d, destruct TCP Connection to %s:%s",
iRet, pWrkrData->pData->target, pWrkrData->pData->port);
}
DestructTCPInstanceData(pWrkrData);
iRet = RS_RET_SUSPENDED;
}
return iRet;
}
| int TCPSendBufUncompressed(struct_0 *a0, unsigned long a1, unsigned long a2) {
unsigned int v0;
int tmp_6;
int tmp_4;
int tmp_2;
int tmp_10;
unsigned int v1;
unsigned int v2;
unsigned int v3;
unsigned long v4;
v0 = a2;
v1 = 0;
v2 = 0;
v1 = *(4217304)(a0->field_10);
if (!v1) {
while (true) {
if (v2 == v0) {
do {
*(&a0->field_0[1].padding_0[76]) = *(&a0->field_0[1].padding_0[76]) + v0;
tmp_6 = BinaryOp CasCmpNE;
} while (tmp_6);
} else {
v4 = v0 - v2;
v1 = g_405998(a0->field_10, v2 + a1, &v4, g_405998);
if (v1)
break;
if (Debug)
r_dbgprintf("omfwd.c", "omfwd: TCP sent %ld bytes, requested %u\n");
v2 += v4;
}
}
}
if (v1) {
if (v1 != -2027) {
LogError(0x0, v1, "omfwd: TCPSendBuf error %d, destruct TCP Connection to %s:%s");
} else {
v3 = a0->field_0->field_a0;
if (v3 <= 1) {
LogError(0x0, v1, "omfwd: remote server at %s:%s seems to have closed connection. This often happens when the remote peer (or an interim system like a load balancer or firewall) shuts down or aborts a connection. Rsyslog will re-open the connection if configured to do so (we saw a generic IO Error, which usually goes along with that behaviour).");
} else {
tmp_10 = conErrCnt.11218;
conErrCnt.11218 = conErrCnt.11218 + 1;
if (!(0 CONCAT tmp_10) /m v3 >> 32)
LogError(0x0, v1, "omfwd: remote server at %s:%s seems to have closed connection. This often happens when the remote peer (or an interim system like a load balancer or firewall) shuts down or aborts a connection. Rsyslog will re-open the connection if configured to do so (we saw a generic IO Error, which usually goes along with that behaviour). Note that the next %d connection error messages will be skipped.");
}
}
DestructTCPInstanceData(a0);
v1 = -2007;
}
return v1;
}
|
static void
wdequote_pathname (pathname)
char *pathname;
{
mbstate_t ps;
size_t len, n;
wchar_t *wpathname;
int i, j;
wchar_t *orig_wpathname;
if (mbsmbchar (pathname) == 0)
{
udequote_pathname (pathname);
return;
}
len = strlen (pathname);
n = xdupmbstowcs (&wpathname,
((void *)0)
, pathname);
if (n == (size_t) -1)
{
udequote_pathname (pathname);
return;
}
orig_wpathname = wpathname;
wcdequote_pathname (wpathname);
memset (&ps, '\0', sizeof(mbstate_t));
n = wcsrtombs(pathname, (const wchar_t **)&wpathname, len, &ps);
if (n == (size_t)-1 || (wpathname && *wpathname != 0))
{
wpathname = orig_wpathname;
memset (&ps, '\0', sizeof(mbstate_t));
n = xwcsrtombs (pathname, (const wchar_t **)&wpathname, len, &ps);
}
pathname[len] = '\0';
sh_xfree((orig_wpathname), "glob.c", 537);
}
| void wdequote_pathname(char *param_1)
{
long lVar1;
long in_FS_OFFSET;
wchar_t *local_38;
size_t local_30;
size_t local_28;
wchar_t *local_20;
mbstate_t local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = mbsmbchar(param_1);
if (lVar1 == 0) {
udequote_pathname(param_1);
}
else {
local_30 = strlen(param_1);
local_28 = xdupmbstowcs(&local_38,0,param_1);
if (local_28 == 0xffffffffffffffff) {
udequote_pathname(param_1);
}
else {
local_20 = local_38;
wcdequote_pathname(local_38);
memset(&local_18,0,8);
local_28 = wcsrtombs(param_1,&local_38,local_30,&local_18);
if ((local_28 == 0xffffffffffffffff) || ((local_38 != (wchar_t *)0x0 && (*local_38 != L'\0')))
) {
local_38 = local_20;
memset(&local_18,0,8);
local_28 = xwcsrtombs(param_1,&local_38,local_30,&local_18);
}
param_1[local_30] = '\0';
sh_xfree(local_20,&DAT_001035b8,0x219);
}
}
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return;
}
|
static
_Bool
do_stdin (void)
{
_Bool
ok =
1
;
token_buffer tokenbuffer;
init_tokenbuffer (&tokenbuffer);
while (
1
)
{
size_t token_length = readtoken (
stdin
, "\n\t ", sizeof ("\n\t ") - 1,
&tokenbuffer);
if (token_length == (size_t) -1)
break;
ok &= print_factors (tokenbuffer.buffer);
}
free (tokenbuffer.buffer);
return ok;
}
| _BOOL8 do_stdin()
{
bool v1;
char v2[8];
void *ptr;
unsigned long v4;
v4 = __readfsqword(0x28u);
v1 = 1;
init_tokenbuffer(v2);
while ( readtoken(stdin, "\n\t ", 3LL, v2) != -1 )
v1 = (v1 & (unsigned char)print_factors(ptr)) != 0;
free(ptr);
return v1;
}
|
static int
_rl_vi_change_mbchar_case (int count)
{
wchar_t wc;
char mb[
16
+1];
int mlen, p;
size_t m;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
if (_rl_adjust_point (rl_line_buffer, rl_point, &ps) > 0)
count--;
while (count-- && rl_point < rl_end)
{
m = mbrtowc (&wc, rl_line_buffer + rl_point, rl_end - rl_point, &ps);
if (((m) == (size_t)-1 || (m) == (size_t)-2))
wc = (wchar_t)rl_line_buffer[rl_point];
else if (((m) == 0))
wc = L'\0';
if (iswupper (wc))
wc = towlower (wc);
else if (iswlower (wc))
wc = towupper (wc);
else
{
rl_forward_char (1, 0);
continue;
}
if (wc)
{
p = rl_point;
mlen = wcrtomb (mb, wc, &ps);
if (mlen >= 0)
mb[mlen] = '\0';
rl_begin_undo_group ();
rl_vi_delete (1, 0);
if (rl_point < p)
_rl_vi_advance_point ();
rl_insert_text (mb);
rl_end_undo_group ();
rl_vi_check ();
}
else
rl_forward_char (1, 0);
}
return 0;
}
| undefined8 _rl_vi_change_mbchar_case(int param_1)
{
int iVar1;
int iVar2;
size_t sVar3;
long in_FS_OFFSET;
int local_4c;
wchar_t local_44;
int local_40;
int local_3c;
size_t local_38;
mbstate_t local_30;
char local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
memset(&local_30,0,8);
iVar1 = _rl_adjust_point(rl_line_buffer,rl_point,&local_30);
local_4c = param_1;
if (0 < iVar1) {
local_4c = param_1 + -1;
}
do {
while( true ) {
iVar1 = local_4c + -1;
if ((local_4c == 0) || (rl_end <= rl_point)) {
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return 0;
}
local_38 = mbrtowc(&local_44,(char *)(rl_line_buffer + rl_point),(long)(rl_end - rl_point),
&local_30);
if ((local_38 == 0xffffffffffffffff) || (local_38 == 0xfffffffffffffffe)) {
local_44 = (wchar_t)*(char *)(rl_point + rl_line_buffer);
}
else if (local_38 == 0) {
local_44 = L'\0';
}
iVar2 = iswupper(local_44);
local_4c = iVar1;
if (iVar2 == 0) break;
local_44 = towlower(local_44);
LAB_00101acd:
if (local_44 == L'\0') {
rl_forward_char(1,0);
}
else {
local_40 = rl_point;
sVar3 = wcrtomb(local_28,local_44,&local_30);
local_3c = (int)sVar3;
if (-1 < local_3c) {
local_28[local_3c] = '\0';
}
rl_begin_undo_group();
rl_vi_delete(1,0);
if (rl_point < local_40) {
_rl_vi_advance_point();
}
rl_insert_text(local_28);
rl_end_undo_group();
rl_vi_check();
}
}
iVar1 = iswlower(local_44);
if (iVar1 != 0) {
local_44 = towupper(local_44);
goto LAB_00101acd;
}
rl_forward_char(1,0);
} while( true );
}
|
unsigned int
hash_string (s)
const char *s;
{
register unsigned int i;
for (i = 2166136261; *s; s++)
{
i += (i<<1) + (i<<4) + (i<<7) + (i<<8) + (i<<24);
i ^= *s;
}
return i;
}
| int hash_string(unsigned long a0) {
char *v0;
unsigned long v2;
v0 = a0;
for (v2 = 2166136261; *(v0); v0 += 1) {
*(&v2) = v2 * 16777619 ^ *(v0);
}
return v2;
}
|
static struct name *
namelist_match (char const *file_name, size_t length)
{
struct name *p;
for (p = namelist; p; p = p->next)
{
if (p->name[0]
&& exclude_fnmatch (p->name, file_name, p->matching_flags))
return p;
}
return
((void *)0)
;
}
| long long namelist_match(unsigned long long a0, unsigned long a1) {
unsigned long v0;
struct_0 *v1;
unsigned long long v3;
void* v4;
v0 = a1;
v1 = namelist;
while (true) {
if (v1) {
if (v1->field_10->field_0) {
v3 = exclude_fnmatch(v1->field_10, a0, v1->field_20, a0);
if (v3) {
v4 = v1;
break;
}
}
if (!v1->field_10->field_0 || !v3)
v1 = v1->field_0;
} else {
v4 = 0;
break;
}
}
return v4;
}
|
static void
_rl_callback_newline (void)
{
rl_initialize ();
if (in_handler == 0)
{
in_handler = 1;
if (rl_prep_term_function)
(*rl_prep_term_function) (_rl_meta_flag);
if (rl_persistent_signal_handlers)
rl_set_signals ();
}
readline_internal_setup ();
do { if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); } while (0);
}
| void _rl_callback_newline() {
rl_initialize();
}
|
test_code_t test_gost_imit(gnutls_session_t session)
{
int ret;
if (gnutls_fips140_mode_enabled())
return TEST_IGNORE;
sprintf(prio_str,
"NONE:" "+CIPHER-ALL:+ARCFOUR-128:+3DES-CBC" ":+GOST28147-TC26Z-CNT" ":" "+COMP-NULL"
":%s:+GOST28147-TC26Z-IMIT:" "+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH" ":+VKO-GOST-12" ":%s",
protocol_all_str, rest);
{ int _ret; if ((_ret=__gnutls_priority_set_direct(session, prio_str, 920)) != TEST_SUCCEED) { return _ret; } };
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
ret = test_do_handshake(session);
return ret;
}
| int test_gost_imit(undefined8 param_1)
{
int iVar1;
iVar1 = gnutls_fips140_mode_enabled();
if (iVar1 == 0) {
sprintf(prio_str,
"NONE:+CIPHER-ALL:+ARCFOUR-128:+3DES-CBC:+GOST28147-TC26Z-CNT:+COMP-NULL:%s:+GOST28147-TC26Z-IMIT:+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH:+VKO-GOST-12:%s"
,protocol_all_str,rest);
iVar1 = __gnutls_priority_set_direct(param_1,prio_str,0x398);
if (iVar1 == 0) {
gnutls_credentials_set(param_1,1,xcred);
iVar1 = test_do_handshake(param_1);
}
}
else {
iVar1 = 3;
}
return iVar1;
}
|
static void
out_of_range_header (char const *keyword, char const *value,
intmax_t minval, uintmax_t maxval)
{
char minval_buf[((((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + 1)];
char maxval_buf[((((((sizeof (uintmax_t) * 8) - (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) + 1)];
char *minval_string = imaxtostr (minval, minval_buf);
char *maxval_string = umaxtostr (maxval, maxval_buf);
do { if (error_hook) error_hook (); error (0, 0, gettext ("Extended header %s=%s is out of range %s..%s"), keyword, value, minval_string, maxval_string); exit_status = 2; } while (0)
;
}
| void out_of_range_header(unsigned long a0, unsigned long a1, unsigned long long a2, unsigned long long a3) {
unsigned long v0;
unsigned long v1;
unsigned long v2;
unsigned long v3;
unsigned long v4;
char v5;
char v6;
char v7;
unsigned long long *v9;
unsigned long long v10;
v2 = a0;
v1 = a1;
v3 = imaxtostr(a2, &v5, &v5);
v4 = umaxtostr(a3, &v6, &v6);
if (error_hook)
*(5242936)();
v0 = v4;
error(0x0, 0x0, gettext("Extended header %s=%s is out of range %s..%s"));
exit_status = 2;
v10 = *(&v7) ^ v9[5];
return;
}
|
int
ansic_shouldquote (string)
const char *string;
{
const char *s;
unsigned char c;
if (string == 0)
return 0;
for (s = string; c = *s; s++)
{
if (is_basic (c) == 0)
return (ansic_wshouldquote (s));
if ((1 &&
((*__ctype_b_loc ())[(int) ((
(unsigned char)c
))] & (unsigned short int) _ISprint)
) == 0)
return 1;
}
return 0;
}
| long ansic_shouldquote(const char *a1)
{
unsigned char v2;
const char *i;
if ( !a1 )
return 0LL;
for ( i = a1; ; ++i )
{
v2 = *i;
if ( !*i )
break;
if ( !(unsigned int)is_basic(v2) )
return ansic_wshouldquote(i);
if ( ((*_ctype_b_loc())[v2] & 0x4000) == 0 )
return 1LL;
}
return 0LL;
}
|
static void process_flags (int argc, char **argv)
{
const struct group *grp;
struct stat st;
_Bool
anyflag =
0
;
{
int c;
static struct option long_options[] = {
{"append",
0
,
((void *)0)
, 'a'},
{"badnames",
0
,
((void *)0)
, 'b'},
{"comment",
1
,
((void *)0)
, 'c'},
{"home",
1
,
((void *)0)
, 'd'},
{"expiredate",
1
,
((void *)0)
, 'e'},
{"inactive",
1
,
((void *)0)
, 'f'},
{"gid",
1
,
((void *)0)
, 'g'},
{"groups",
1
,
((void *)0)
, 'G'},
{"help",
0
,
((void *)0)
, 'h'},
{"login",
1
,
((void *)0)
, 'l'},
{"lock",
0
,
((void *)0)
, 'L'},
{"move-home",
0
,
((void *)0)
, 'm'},
{"non-unique",
0
,
((void *)0)
, 'o'},
{"password",
1
,
((void *)0)
, 'p'},
{"remove",
0
,
((void *)0)
, 'r'},
{"root",
1
,
((void *)0)
, 'R'},
{"prefix",
1
,
((void *)0)
, 'P'},
{"shell",
1
,
((void *)0)
, 's'},
{"uid",
1
,
((void *)0)
, 'u'},
{"unlock",
0
,
((void *)0)
, 'U'},
{"add-subuids",
1
,
((void *)0)
, 'v'},
{"del-subuids",
1
,
((void *)0)
, 'V'},
{"add-subgids",
1
,
((void *)0)
, 'w'},
{"del-subgids",
1
,
((void *)0)
, 'W'},
{
((void *)0)
, 0,
((void *)0)
, '\0'}
};
while ((c = getopt_long (argc, argv,
"abc:d:e:f:g:G:hl:Lmop:rR:s:u:UP:"
"v:w:V:W:"
, long_options,
((void *)0)
)) != -1) {
switch (c) {
case 'a':
aflg =
1
;
break;
case 'b':
allow_bad_names =
1
;
break;
case 'c':
if (!(strcspn (optarg, ":\n") == strlen (optarg))) {
fprintf (
stderr
,
gettext ("%s: invalid field '%s'\n"),
Prog, optarg);
exit (3);
}
user_newcomment = optarg;
cflg =
1
;
break;
case 'd':
if (!(strcspn (optarg, ":\n") == strlen (optarg))) {
fprintf (
stderr
,
gettext ("%s: invalid field '%s'\n"),
Prog, optarg);
exit (3);
}
dflg =
1
;
user_newhome = optarg;
if (user_newhome[0] != '/') {
fprintf (
stderr
,
gettext ("%s: homedir must be an absolute path\n"),
Prog);
exit (3);
}
break;
case 'e':
user_newexpire = strtoday (optarg);
if (user_newexpire < -1) {
fprintf (
stderr
,
gettext ("%s: invalid date '%s'\n"),
Prog, optarg);
exit (3);
}
user_newexpire *= (24L*3600L) / (24L*3600L);
eflg =
1
;
break;
case 'f':
if ( (getlong (optarg, &user_newinactive) == 0)
|| (user_newinactive < -1)) {
fprintf (
stderr
,
gettext ("%s: invalid numeric argument '%s'\n"),
Prog, optarg);
exit (3);
}
fflg =
1
;
break;
case 'g':
grp = getgr_nam_gid (optarg);
if (
((void *)0)
== grp) {
fprintf (
stderr
,
gettext ("%s: group '%s' does not exist\n"),
Prog, optarg);
exit (6);
}
user_newgid = grp->gr_gid;
gflg =
1
;
gr_free (grp);
break;
case 'G':
if (get_groups (optarg) != 0) {
exit (6);
}
Gflg =
1
;
break;
case 'h':
usage (0);
break;
case 'l':
if (!is_valid_user_name (optarg)) {
fprintf (
stderr
,
gettext ("%s: invalid user name '%s': use --badname to ignore\n"),
Prog, optarg);
exit (3);
}
lflg =
1
;
user_newname = optarg;
break;
case 'L':
Lflg =
1
;
break;
case 'm':
mflg =
1
;
break;
case 'o':
oflg =
1
;
break;
case 'p':
user_pass = optarg;
pflg =
1
;
break;
case 'r':
rflg =
1
;
break;
case 'R':
break;
case 'P':
break;
case 's':
if ( ( !(strcspn (optarg, ":\n") == strlen (optarg)) )
|| ( ('\0' != optarg[0])
&& ('/' != optarg[0])
&& ('*' != optarg[0]) )) {
fprintf (
stderr
,
gettext ("%s: invalid shell '%s'\n"),
Prog, optarg);
exit (3);
}
if ( '\0' != optarg[0]
&& '*' != optarg[0]
&& strcmp(optarg, "/sbin/nologin") != 0
&& ( stat(optarg, &st) != 0
||
((((
st.st_mode
)) & 0170000) == (0040000))
|| access(optarg,
1
) != 0)) {
fprintf (
stderr
,
gettext ("%s: Warning: missing or non-executable shell '%s'\n"),
Prog, optarg);
}
user_newshell = optarg;
sflg =
1
;
break;
case 'u':
if ( (get_uid (optarg, &user_newid) ==0)
|| (user_newid == (uid_t)-1)) {
fprintf (
stderr
,
gettext ("%s: invalid user ID '%s'\n"),
Prog, optarg);
exit (3);
}
uflg =
1
;
break;
case 'U':
Uflg =
1
;
break;
case 'v':
if (prepend_range (optarg, &add_sub_uids) == 0) {
fprintf (
stderr
,
gettext ("%s: invalid subordinate uid range '%s'\n"),
Prog, optarg);
exit(3);
}
vflg =
1
;
break;
case 'V':
if (prepend_range (optarg, &del_sub_uids) == 0) {
fprintf (
stderr
,
gettext ("%s: invalid subordinate uid range '%s'\n"),
Prog, optarg);
exit(3);
}
Vflg =
1
;
break;
case 'w':
if (prepend_range (optarg, &add_sub_gids) == 0) {
fprintf (
stderr
,
gettext ("%s: invalid subordinate gid range '%s'\n"),
Prog, optarg);
exit(3);
}
wflg =
1
;
break;
case 'W':
if (prepend_range (optarg, &del_sub_gids) == 0) {
fprintf (
stderr
,
gettext ("%s: invalid subordinate gid range '%s'\n"),
Prog, optarg);
exit(3);
}
Wflg =
1
;
break;
default:
usage (2);
}
anyflag =
1
;
}
}
if (optind != argc - 1) {
usage (2);
}
user_name = argv[argc - 1];
{
const struct passwd *pwd;
pwd = prefix_getpwnam (user_name);
if (
((void *)0)
== pwd) {
fprintf (
stderr
,
gettext ("%s: user '%s' does not exist\n"),
Prog, user_name);
exit (6);
}
user_id = pwd->pw_uid;
user_gid = pwd->pw_gid;
user_comment = xstrdup (pwd->pw_gecos);
user_home = xstrdup (pwd->pw_dir);
user_shell = xstrdup (pwd->pw_shell);
}
if (!lflg) {
user_newname = user_name;
}
if (!uflg) {
user_newid = user_id;
}
if (!gflg) {
user_newgid = user_gid;
}
if (prefix[0]) {
size_t len = strlen(prefix) + strlen(user_home) + 2;
int wlen;
prefix_user_home = xmalloc(len);
wlen = snprintf(prefix_user_home, len, "%s/%s", prefix, user_home);
((void) sizeof ((
wlen == (int) len -1
) ? 1 : 0), __extension__ ({ if (
wlen == (int) len -1
) ; else __assert_fail (
"wlen == (int) len -1"
, "usermod.c", 1265, __extension__ __PRETTY_FUNCTION__); }))
;
if (user_newhome) {
len = strlen(prefix) + strlen(user_newhome) + 2;
prefix_user_newhome = xmalloc(len);
wlen = snprintf(prefix_user_newhome, len, "%s/%s", prefix, user_newhome);
((void) sizeof ((
wlen == (int) len -1
) ? 1 : 0), __extension__ ({ if (
wlen == (int) len -1
) ; else __assert_fail (
"wlen == (int) len -1"
, "usermod.c", 1270, __extension__ __PRETTY_FUNCTION__); }))
;
}
}
else {
prefix_user_home = user_home;
prefix_user_newhome = user_newhome;
}
{
const struct spwd *spwd =
((void *)0)
;
if (is_shadow_pwd && ((spwd = prefix_getspnam (user_name)) !=
((void *)0)
)) {
user_expire = spwd->sp_expire;
user_inactive = spwd->sp_inact;
}
}
if (!anyflag) {
fprintf (
stderr
, gettext ("%s: no options\n"), Prog);
usage (2);
}
if (aflg && (!Gflg)) {
fprintf (
stderr
,
gettext ("%s: %s flag is only allowed with the %s flag\n"),
Prog, "-a", "-G");
usage (2);
}
if (rflg && (!Gflg)) {
fprintf (
stderr
,
gettext ("%s: %s flag is only allowed with the %s flag\n"),
Prog, "-r", "-G");
usage (2);
}
if (rflg && aflg) {
fprintf (
stderr
,
gettext ("%s: %s and %s are mutually exclusive flags\n"),
Prog, "-r", "-a");
usage (2);
}
if ((Lflg && (pflg || Uflg)) || (pflg && Uflg)) {
fprintf (
stderr
,
gettext ("%s: the -L, -p, and -U flags are exclusive\n"),
Prog);
usage (2);
}
if (oflg && !uflg) {
fprintf (
stderr
,
gettext ("%s: %s flag is only allowed with the %s flag\n"),
Prog, "-o", "-u");
usage (2);
}
if (mflg && !dflg) {
fprintf (
stderr
,
gettext ("%s: %s flag is only allowed with the %s flag\n"),
Prog, "-m", "-d");
usage (2);
}
if (user_newid == user_id) {
uflg =
0
;
oflg =
0
;
}
if (user_newgid == user_gid) {
gflg =
0
;
}
if ( (
((void *)0)
!= user_newshell)
&& (strcmp (user_newshell, user_shell) == 0)) {
sflg =
0
;
}
if (strcmp (user_newname, user_name) == 0) {
lflg =
0
;
}
if (user_newinactive == user_inactive) {
fflg =
0
;
}
if (user_newexpire == user_expire) {
eflg =
0
;
}
if ( (
((void *)0)
!= user_newhome)
&& (strcmp (user_newhome, user_home) == 0)) {
dflg =
0
;
mflg =
0
;
}
if ( (
((void *)0)
!= user_newcomment)
&& (strcmp (user_newcomment, user_comment) == 0)) {
cflg =
0
;
}
if (!(Uflg || uflg || sflg || pflg || mflg || Lflg ||
lflg || Gflg || gflg || fflg || eflg || dflg || cflg
|| vflg || Vflg || wflg || Wflg
)) {
fprintf (
stdout
, gettext ("%s: no changes\n"), Prog);
exit (0);
}
if (!is_shadow_pwd && (eflg || fflg)) {
fprintf (
stderr
,
gettext ("%s: shadow passwords required for -e and -f\n"),
Prog);
exit (2);
}
if (lflg && (prefix_getpwnam (user_newname) !=
((void *)0)
)) {
fprintf (
stderr
,
gettext ("%s: user '%s' already exists\n"),
Prog, user_newname);
exit (9);
}
if (uflg && !oflg && (prefix_getpwuid (user_newid) !=
((void *)0)
)) {
fprintf (
stderr
,
gettext ("%s: UID '%lu' already exists\n"),
Prog, (unsigned long) user_newid);
exit (4);
}
if ( (vflg || Vflg)
&& !is_sub_uid) {
fprintf (
stderr
,
gettext ("%s: %s does not exist, you cannot use the flags %s or %s\n"),
Prog, sub_uid_dbname (), "-v", "-V");
exit (2);
}
if ( (wflg || Wflg)
&& !is_sub_gid) {
fprintf (
stderr
,
gettext ("%s: %s does not exist, you cannot use the flags %s or %s\n"),
Prog, sub_gid_dbname (), "-w", "-W");
exit (2);
}
}
| void process_flags(unsigned long a0, unsigned long long *a1) {
char v0;
unsigned int v1;
unsigned int v2;
struct_0 *v3;
unsigned long v4;
void* v5;
struct_1 *v6;
char v7;
char v8;
char v9;
unsigned long long v12;
unsigned long long *v13;
unsigned long long v14;
unsigned long long v15;
v0 = 0;
while (true) {
v1 = getopt_long(a0, a1, "abc:d:e:f:g:G:hl:Lmop:rR:s:u:UP:v:w:V:W:", &long_options.6141, NULL);
if (v1 == -1)
break;
switch (v1) {
case 71:
if (!get_groups(*(&optarg))) {
Gflg = 1;
break;
} else {
exit(0x6);
}
case 76:
Lflg = 1;
break;
case 80: case 82:
break;
case 85:
Uflg = 1;
break;
case 86:
if (prepend_range(*(&optarg), &del_sub_uids, &g_407230)) {
Vflg = 1;
break;
} else {
fprintf(stderr, gettext("%s: invalid subordinate uid range '%s'\n"));
exit(0x3);
}
case 87:
if (prepend_range(*(&optarg), &del_sub_gids, &g_407230)) {
Wflg = 1;
break;
} else {
fprintf(stderr, gettext("%s: invalid subordinate gid range '%s'\n"));
exit(0x3);
}
case 97:
aflg = 1;
break;
case 98:
allow_bad_names = 1;
break;
case 99:
if (strcspn(*(&optarg), ":\n") == strlen(*(&optarg))) {
user_newcomment = *(&optarg);
cflg = 1;
break;
} else {
fprintf(stderr, gettext("%s: invalid field '%s'\n"));
exit(0x3);
}
case 100:
if (strcspn(*(&optarg), ":\n") != strlen(*(&optarg))) {
fprintf(stderr, gettext("%s: invalid field '%s'\n"));
exit(0x3);
}
dflg = 1;
user_newhome = *(&optarg);
if (*(user_newhome) != 47) {
fprintf(stderr, gettext("%s: homedir must be an absolute path\n"));
exit(0x3);
}
case 101:
user_newexpire = strtoday(*(&optarg));
if (user_newexpire < -1) {
fprintf(stderr, gettext("%s: invalid date '%s'\n"));
exit(0x3);
}
user_newexpire = user_newexpire;
eflg = 1;
break;
case 102:
if (!(getlong(*(&optarg), &user_newinactive)) || !(user_newinactive >= -1)) {
fprintf(stderr, gettext("%s: invalid numeric argument '%s'\n"));
exit(0x3);
}
fflg = 1;
break;
case 103:
v6 = getgr_nam_gid(*(&optarg));
if (!v6) {
fprintf(stderr, gettext("%s: group '%s' does not exist\n"));
exit(0x6);
}
user_newgid = v6->field_10;
gflg = 1;
gr_free(v6);
break;
case 104:
usage(0x0);
case 108:
if (!(is_valid_user_name(*(&optarg)) ^ 1)) {
lflg = 1;
user_newname = *(&optarg);
break;
} else {
fprintf(stderr, gettext("%s: invalid user name '%s': use --badname to ignore\n"));
exit(0x3);
}
case 109:
mflg = 1;
break;
case 111:
oflg = 1;
break;
case 112:
user_pass = *(&optarg);
pflg = 1;
break;
case 114:
rflg = 1;
break;
case 115:
if (!(strcspn(*(&optarg), ":\n") == strlen(*(&optarg))))
goto LABEL_40271f;
switch (*(*(&optarg))) {
case 0: case 42: case 47:
switch (*(*(&optarg))) {
case 0: case 42:
break;
default:
if (strcmp(*(&optarg), "/sbin/nologin") && (stat(*(&optarg), &v7) || (*(&v8) & 0xf000) == 0x4000 || access(*(&optarg), 0x1)))
fprintf(stderr, gettext("%s: Warning: missing or non-executable shell '%s'\n"));
}
user_newshell = *(&optarg);
sflg = 1;
break;
default:
LABEL_40271f:
fprintf(stderr, gettext("%s: invalid shell '%s'\n"));
exit(0x3);
}
case 117:
if (!(get_uid(*(&optarg), &user_newid)) || !(user_newid != -1)) {
fprintf(stderr, gettext("%s: invalid user ID '%s'\n"));
exit(0x3);
}
uflg = 1;
break;
case 118:
if (prepend_range(*(&optarg), &add_sub_uids, &g_407230)) {
vflg = 1;
break;
} else {
fprintf(stderr, gettext("%s: invalid subordinate uid range '%s'\n"));
exit(0x3);
}
case 119:
if (prepend_range(*(&optarg), &add_sub_gids, &g_407230)) {
wflg = 1;
break;
} else {
fprintf(stderr, gettext("%s: invalid subordinate gid range '%s'\n"));
exit(0x3);
}
default:
usage(0x2);
}
v0 = 1;
}
if (a0 - 1 != optind)
usage(0x2);
user_name = a1[1 + a0];
v3 = prefix_getpwnam(user_name);
if (!v3) {
fprintf(stderr, gettext("%s: user '%s' does not exist\n"));
exit(0x6);
}
user_id = v3->field_10;
user_gid = v3->field_14;
user_comment = xstrdup(v3->field_18, a1, "abc:d:e:f:g:G:hl:Lmop:rR:s:u:UP:v:w:V:W:", &long_options.6141);
user_home = xstrdup(v3->field_20, a1, "abc:d:e:f:g:G:hl:Lmop:rR:s:u:UP:v:w:V:W:", &long_options.6141);
user_shell = xstrdup(v3->field_28, a1, "abc:d:e:f:g:G:hl:Lmop:rR:s:u:UP:v:w:V:W:", &long_options.6141);
if ((lflg ^ 1))
user_newname = user_name;
if ((uflg ^ 1))
user_newid = user_id;
if ((gflg ^ 1))
user_newgid = user_gid;
if (!*(prefix)) {
prefix_user_home = user_home;
prefix_user_newhome = user_newhome;
} else {
v4 = strlen(user_home) + strlen(prefix) + 2;
prefix_user_home = xmalloc(v4);
v2 = snprintf(prefix_user_home, v4, "%s/%s", prefix, user_home);
if (v2 != v4 - 1) {
__assert_fail();
} else if (user_newhome) {
v4 = strlen(user_newhome) + strlen(prefix) + 2;
prefix_user_newhome = xmalloc(v4);
v2 = snprintf(prefix_user_newhome, v4, "%s/%s", prefix, user_newhome);
if (v2 != v4 - 1)
__assert_fail();
}
}
v5 = 0;
if (is_shadow_pwd) {
v5[0] = prefix_getspnam(user_name);
if (v5) {
user_expire = v5[7];
user_inactive = v5[6];
}
}
if ((v0 ^ 1)) {
fprintf(stderr, gettext("%s: no options\n"));
usage(0x2);
}
if (aflg && (Gflg ^ 1)) {
fprintf(stderr, gettext("%s: %s flag is only allowed with the %s flag\n"));
usage(0x2);
}
if (rflg && (Gflg ^ 1)) {
fprintf(stderr, gettext("%s: %s flag is only allowed with the %s flag\n"));
usage(0x2);
}
if (rflg && aflg) {
fprintf(stderr, gettext("%s: %s and %s are mutually exclusive flags\n"));
usage(0x2);
}
if ((!Lflg || !pflg && !Uflg) && (!(pflg) || !(Uflg))) {
if (oflg && (uflg ^ 1)) {
fprintf(stderr, gettext("%s: %s flag is only allowed with the %s flag\n"));
usage(0x2);
}
if (mflg && (dflg ^ 1)) {
fprintf(stderr, gettext("%s: %s flag is only allowed with the %s flag\n"));
usage(0x2);
}
if (user_newid == user_id) {
uflg = 0;
oflg = 0;
}
if (user_newgid == user_gid)
gflg = 0;
if (user_newshell && !strcmp(user_newshell, user_shell))
sflg = 0;
if (!strcmp(user_newname, user_name))
lflg = 0;
if (user_newinactive == user_inactive)
fflg = 0;
if (user_newexpire == user_expire)
eflg = 0;
if (user_newhome && !strcmp(user_newhome, user_home)) {
dflg = 0;
mflg = 0;
}
if (user_newcomment && !strcmp(user_newcomment, user_comment))
cflg = 0;
if (...) {
fprintf(stdout, gettext("%s: no changes\n"));
exit(0x0);
}
if ((is_shadow_pwd ^ 1) && (!(!eflg) || !(!fflg))) {
fprintf(stderr, gettext("%s: shadow passwords required for -e and -f\n"));
exit(0x2);
}
if (lflg && prefix_getpwnam(user_newname)) {
fprintf(stderr, gettext("%s: user '%s' already exists\n"));
exit(0x9);
}
if (uflg && (oflg ^ 1) && prefix_getpwuid(user_newid)) {
fprintf(stderr, gettext("%s: UID '%lu' already exists\n"));
exit(0x4);
}
if ((vflg || Vflg) && (is_sub_uid ^ 1)) {
v12 = sub_uid_dbname();
fprintf(stderr, gettext("%s: %s does not exist, you cannot use the flags %s or %s\n"));
exit(0x2);
}
if ((wflg || Wflg) && (is_sub_gid ^ 1)) {
v15 = sub_gid_dbname();
fprintf(stderr, gettext("%s: %s does not exist, you cannot use the flags %s or %s\n"));
exit(0x2);
}
v14 = *(&v9) ^ v13[5];
return;
}
fprintf(stderr, gettext("%s: the -L, -p, and -U flags are exclusive\n"));
usage(0x2);
}
|
int
rl_backward_byte (int count, int key)
{
if (count < 0)
return (rl_forward_byte (-count, key));
if (count > 0)
{
if (rl_point < count)
{
rl_point = 0;
rl_ding ();
}
else
rl_point -= count;
}
if (rl_point < 0)
rl_point = 0;
return 0;
}
| undefined8 rl_backward_byte(int param_1,undefined4 param_2)
{
undefined8 uVar1;
if (param_1 < 0) {
uVar1 = rl_forward_byte(-param_1,param_2);
}
else {
if (0 < param_1) {
if (rl_point < param_1) {
rl_point = 0;
rl_ding();
}
else {
rl_point = rl_point - param_1;
}
}
if (rl_point < 0) {
rl_point = 0;
}
uVar1 = 0;
}
return uVar1;
}
|
static void
pkcs11_provider_finalize(struct pkcs11_provider *p)
{
CK_RV rv;
CK_ULONG i;
sshlog("ssh-pkcs11.c", __func__, 114, 1, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "provider \"%s\" refcount %d valid %d", p->name, p->refcount, p->valid)
;
if (!p->valid)
return;
for (i = 0; i < p->nslots; i++) {
if (p->slotinfo[i].session &&
(rv = p->function_list->C_CloseSession(
p->slotinfo[i].session)) != (0))
sshlog("ssh-pkcs11.c", __func__, 122, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "C_CloseSession failed: %lu", rv);
}
if ((rv = p->function_list->C_Finalize(
((void *)0)
)) != (0))
sshlog("ssh-pkcs11.c", __func__, 125, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "C_Finalize failed: %lu", rv);
p->valid = 0;
p->function_list =
((void *)0)
;
dlclose(p->handle);
}
| void pkcs11_provider_finalize(undefined8 *param_1)
{
long lVar1;
ulong local_18;
sshlog("ssh-pkcs11.c","pkcs11_provider_finalize",0x72,1,5,0,"provider \"%s\" refcount %d valid %d"
,*param_1,*(undefined4 *)((long)param_1 + 0x8c),*(undefined4 *)(param_1 + 0x11));
if (*(int *)(param_1 + 0x11) != 0) {
for (local_18 = 0; local_18 < (ulong)param_1[0xe]; local_18 = local_18 + 1) {
if (*(long *)(local_18 * 0xe0 + param_1[0x10] + 0xd0) != 0) {
lVar1 = (**(code **)(param_1[2] + 0x70))
(*(undefined8 *)(local_18 * 0xe0 + param_1[0x10] + 0xd0));
if (lVar1 != 0) {
sshlog("ssh-pkcs11.c","pkcs11_provider_finalize",0x7a,0,2,0,"C_CloseSession failed: %lu",
lVar1);
}
}
}
lVar1 = (**(code **)(param_1[2] + 0x10))(0);
if (lVar1 != 0) {
sshlog("ssh-pkcs11.c","pkcs11_provider_finalize",0x7d,0,2,0,"C_Finalize failed: %lu",lVar1);
}
*(undefined4 *)(param_1 + 0x11) = 0;
param_1[2] = 0;
dlclose(param_1[1]);
}
return;
}
|
static void
pubkey_cleanup(struct ssh *ssh)
{
Authctxt *authctxt = (Authctxt *)ssh->authctxt;
Identity *id;
if (authctxt->agent_fd != -1) {
ssh_close_authentication_socket(authctxt->agent_fd);
authctxt->agent_fd = -1;
}
for (id = ((&authctxt->keys)->tqh_first); id;
id = ((&authctxt->keys)->tqh_first)) {
do { if (((id)->next.tqe_next) !=
((void *)0)
) (id)->next.tqe_next->next.tqe_prev = (id)->next.tqe_prev; else (&authctxt->keys)->tqh_last = (id)->next.tqe_prev; *(id)->next.tqe_prev = (id)->next.tqe_next; ; ; } while (0);
sshkey_free(id->key);
free(id->filename);
free(id);
}
}
| void pubkey_cleanup(long param_1)
{
long lVar1;
long *local_18;
lVar1 = *(long *)(param_1 + 0x860);
if (*(int *)(lVar1 + 0x48) != -1) {
ssh_close_authentication_socket(*(undefined4 *)(lVar1 + 0x48));
*(undefined4 *)(lVar1 + 0x48) = 0xffffffff;
}
local_18 = *(long **)(lVar1 + 0x38);
while (local_18 != (long *)0x0) {
if (*local_18 == 0) {
*(long *)(lVar1 + 0x40) = local_18[1];
}
else {
*(long *)(*local_18 + 8) = local_18[1];
}
*(long *)local_18[1] = *local_18;
sshkey_free(local_18[3]);
free((void *)local_18[4]);
free(local_18);
local_18 = *(long **)(lVar1 + 0x38);
}
return;
}
|
static void alloc_imagic_map(e2fsck_t ctx)
{
struct problem_context pctx;
clear_problem_context(&pctx);
pctx.errcode = e2fsck_allocate_inode_bitmap(ctx->fs,
(gettext ("imagic inode map")), 2,
"inode_imagic_map", &ctx->inode_imagic_map);
if (pctx.errcode) {
pctx.num = 5;
fix_problem(ctx, 0x010024, &pctx);
ctx->flags |= 0x0001;
return;
}
}
| void alloc_imagic_map(struct_0 *a0) {
char v0;
unsigned long long v1;
char v2;
unsigned long long *v4;
unsigned long long v5;
clear_problem_context(&v0);
v0 = e2fsck_allocate_inode_bitmap(a0->field_0, gettext("imagic inode map"), 0x2, "inode_imagic_map", &a0[5].padding_8[4]);
if (v0) {
v1 = 5;
fix_problem(a0, 0x10024, &v0);
a0->field_48 = a0->field_48 | 1;
}
v5 = *(&v2) ^ v4[5];
return;
}
|
static int
test_key(int agent_fd, const char *filename)
{
struct sshkey *key =
((void *)0)
;
u_char *sig =
((void *)0)
;
size_t slen = 0;
int r, ret = -1;
char data[1024];
if ((r = sshkey_load_public(filename, &key,
((void *)0)
)) != 0) {
sshlog("ssh-add.c", __func__, 485, 0, SYSLOG_LEVEL_ERROR, ssh_err(r), "Couldn't read public key %s", filename);
return -1;
}
arc4random_buf(data, sizeof(data));
if ((r = ssh_agent_sign(agent_fd, key, &sig, &slen, data, sizeof(data),
((void *)0)
, 0)) != 0) {
sshlog("ssh-add.c", __func__, 491, 0, SYSLOG_LEVEL_ERROR, ssh_err(r), "Agent signature failed for %s", filename);
goto done;
}
if ((r = sshkey_verify(key, sig, slen, data, sizeof(data),
((void *)0)
, 0,
((void *)0)
)) != 0) {
sshlog("ssh-add.c", __func__, 496, 0, SYSLOG_LEVEL_ERROR, ssh_err(r), "Signature verification failed for %s", filename);
goto done;
}
ret = 0;
done:
free(sig);
sshkey_free(key);
return ret;
}
| int test_key(unsigned long a0, unsigned long long a1) {
void* v0;
unsigned int v1;
unsigned int v2;
void* v3;
void* v4;
void* v5;
char v6;
unsigned int v8;
v3 = 0;
v4 = 0;
v5 = 0;
v1 = -1;
v2 = sshkey_load_public(a1, &v3, 0x0, &v3);
if (v2) {
v0 = a1;
sshlog("ssh-add.c", "test_key", 0x1e5, 0x0, 0x2, ssh_err(v2), "Couldn't read public key %s");
v8 = -1;
} else {
arc4random_buf(&v6, 0x400);
v0 = 0;
v2 = ssh_agent_sign(a0, v3, &v4, &v5, &v6, 0x400, 0x0);
if (v2) {
v0 = a1;
sshlog("ssh-add.c", "test_key", 0x1eb, 0x0, 0x2, ssh_err(v2), "Agent signature failed for %s");
} else {
v0 = 0;
v2 = sshkey_verify(v3, v4, v5, &v6, 0x400, 0x0, 0x0);
if (v2) {
v0 = a1;
sshlog("ssh-add.c", "test_key", 0x1f0, 0x0, 0x2, ssh_err(v2), "Signature verification failed for %s");
} else {
v1 = 0;
}
}
free(v4);
sshkey_free(v3);
v8 = v1;
}
return v8;
}
|
int
addr_unicast_masklen(int af)
{
switch (af) {
case
2
:
return 32;
case
10
:
return 128;
default:
return -1;
}
}
| long addr_unicast_masklen(int a1)
{
if ( a1 == 2 )
return 32LL;
if ( a1 == 10 )
return 128LL;
return 0xFFFFFFFFLL;
}
|
static void
chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits)
{
const char *constants;
x->input[4] = (((u32)((k + 0)[0]) ) | ((u32)((k + 0)[1]) << 8) | ((u32)((k + 0)[2]) << 16) | ((u32)((k + 0)[3]) << 24));
x->input[5] = (((u32)((k + 4)[0]) ) | ((u32)((k + 4)[1]) << 8) | ((u32)((k + 4)[2]) << 16) | ((u32)((k + 4)[3]) << 24));
x->input[6] = (((u32)((k + 8)[0]) ) | ((u32)((k + 8)[1]) << 8) | ((u32)((k + 8)[2]) << 16) | ((u32)((k + 8)[3]) << 24));
x->input[7] = (((u32)((k + 12)[0]) ) | ((u32)((k + 12)[1]) << 8) | ((u32)((k + 12)[2]) << 16) | ((u32)((k + 12)[3]) << 24));
if (kbits == 256) {
k += 16;
constants = sigma;
} else {
constants = tau;
}
x->input[8] = (((u32)((k + 0)[0]) ) | ((u32)((k + 0)[1]) << 8) | ((u32)((k + 0)[2]) << 16) | ((u32)((k + 0)[3]) << 24));
x->input[9] = (((u32)((k + 4)[0]) ) | ((u32)((k + 4)[1]) << 8) | ((u32)((k + 4)[2]) << 16) | ((u32)((k + 4)[3]) << 24));
x->input[10] = (((u32)((k + 8)[0]) ) | ((u32)((k + 8)[1]) << 8) | ((u32)((k + 8)[2]) << 16) | ((u32)((k + 8)[3]) << 24));
x->input[11] = (((u32)((k + 12)[0]) ) | ((u32)((k + 12)[1]) << 8) | ((u32)((k + 12)[2]) << 16) | ((u32)((k + 12)[3]) << 24));
x->input[0] = (((u32)((constants + 0)[0]) ) | ((u32)((constants + 0)[1]) << 8) | ((u32)((constants + 0)[2]) << 16) | ((u32)((constants + 0)[3]) << 24));
x->input[1] = (((u32)((constants + 4)[0]) ) | ((u32)((constants + 4)[1]) << 8) | ((u32)((constants + 4)[2]) << 16) | ((u32)((constants + 4)[3]) << 24));
x->input[2] = (((u32)((constants + 8)[0]) ) | ((u32)((constants + 8)[1]) << 8) | ((u32)((constants + 8)[2]) << 16) | ((u32)((constants + 8)[3]) << 24));
x->input[3] = (((u32)((constants + 12)[0]) ) | ((u32)((constants + 12)[1]) << 8) | ((u32)((constants + 12)[2]) << 16) | ((u32)((constants + 12)[3]) << 24));
}
| void chacha_keysetup(uint *param_1,uint *param_2,int param_3)
{
uint *local_28;
undefined1 *local_10;
param_1[4] = *param_2;
param_1[5] = param_2[1];
param_1[6] = param_2[2];
param_1[7] = param_2[3];
if (param_3 == 0x100) {
local_28 = param_2 + 4;
local_10 = sigma;
}
else {
local_10 = tau;
local_28 = param_2;
}
param_1[8] = *local_28;
param_1[9] = local_28[1];
param_1[10] = local_28[2];
param_1[0xb] = local_28[3];
*param_1 = (int)(char)local_10[1] << 8 | (int)(char)*local_10 | (int)(char)local_10[2] << 0x10 |
(int)(char)local_10[3] << 0x18;
param_1[1] = (int)(char)local_10[5] << 8 | (int)(char)local_10[4] | (int)(char)local_10[6] << 0x10
| (int)(char)local_10[7] << 0x18;
param_1[2] = (int)(char)local_10[9] << 8 | (int)(char)local_10[8] |
(int)(char)local_10[10] << 0x10 | (int)(char)local_10[0xb] << 0x18;
param_1[3] = (int)(char)local_10[0xd] << 8 | (int)(char)local_10[0xc] |
(int)(char)local_10[0xe] << 0x10 | (int)(char)local_10[0xf] << 0x18;
return;
}
|
static
void process_signals()
{
CHILD *ch;
int pwrstat;
int oldlevel;
int fd;
char c;
if (((got_signals) & (1 << (
30
)))) {
;
pwrstat = 0;
if ((fd = open("/var/run/powerstatus",
00
)) >= 0) {
if (read(fd, &c, 1) != 1)
c = 0;
pwrstat = c;
close(fd);
unlink("/var/run/powerstatus");
} else if ((fd = open("/etc/powerstatus",
00
)) >= 0) {
initlog((1|2), "warning: found obsolete path %s, use %s instead",
"/etc/powerstatus", "/var/run/powerstatus");
if (read(fd, &c, 1) != 1)
c = 0;
pwrstat = c;
close(fd);
unlink("/etc/powerstatus");
}
do_power_fail(pwrstat);
((got_signals) &= ~(1 << (
30
)));
}
if (((got_signals) & (1 << (
2
)))) {
;
for(ch = family; ch; ch = ch->next)
if (ch->action == 9)
ch->flags &= ~128;
((got_signals) &= ~(1 << (
2
)));
}
if (((got_signals) & (1 << (
28
)))) {
;
for(ch = family; ch; ch = ch->next)
if (ch->action == 15)
ch->flags &= ~128;
((got_signals) &= ~(1 << (
28
)));
}
if (((got_signals) & (1 << (
14
)))) {
;
((got_signals) &= ~(1 << (
14
)));
}
if (((got_signals) & (1 << (
17
)))) {
;
((got_signals) &= ~(1 << (
17
)));
for(ch = family; ch; ch = ch->next)
if (ch->flags & 64) {
;
ch->flags &= ~(2|64|32);
if (ch->process[0] != '+')
write_utmp_wtmp("", ch->id, ch->pid,
8
,
((void *)0)
);
}
}
if (((got_signals) & (1 << (
1
)))) {
;
{
oldlevel = runlevel;
if (runlevel == 'U') {
runlevel = oldlevel;
my_re_exec();
} else {
if (oldlevel != 'S' && runlevel == 'S') console_stty();
if (runlevel == '6' || runlevel == '0' ||
runlevel == '1') console_stty();
read_inittab();
fail_cancel();
setproctitle("init [%c]", (int)runlevel);
((got_signals) &= ~(1 << (
1
)));
}
Write_Runlevel_Log(runlevel);
}
}
if (((got_signals) & (1 << (
10
)))) {
;
if (pipe_fd)
close(pipe_fd);
pipe_fd = -1;
((got_signals) &= ~(1 << (
10
)));
}
else if (((got_signals) & (1 << (
12
)))) {
;
if (pipe_fd)
close(pipe_fd);
pipe_fd = -2;
((got_signals) &= ~(1 << (
12
)));
}
}
| void process_signals(unsigned int a0, unsigned int a1, unsigned long a2, unsigned long a3, unsigned int a4, unsigned int a5) {
char v0;
int tmp_9;
int tmp_10;
unsigned int v1;
unsigned int v2;
unsigned int v3;
struct_1 *v4;
char v5;
unsigned long long v7;
unsigned long long v8;
unsigned long v9;
unsigned long v10;
unsigned long v11;
unsigned long long *v12;
unsigned long long v13;
if (false) {
v1 = 0;
v2 = open("/var/run/powerstatus", 0x0, a2);
if (v2 < 0) {
a1 = 0;
v2 = open("/etc/powerstatus", 0x0, a2);
if (v2 >= 0) {
initlog(0x3, "warning: found obsolete path %s, use %s instead", "/etc/powerstatus", "/var/run/powerstatus", a4, a5);
if (read(v2, &v0, 0x1) != 1)
v0 = 0;
v1 = v0;
close(v2);
unlink("/etc/powerstatus");
}
} else {
if (read(v2, &v0, 0x1) != 1)
v0 = 0;
v1 = v0;
close(v2);
unlink("/var/run/powerstatus");
}
do_power_fail(v1);
oops_error = 955024200;
}
if (false) {
for (v4 = family; v4; v4 = v4->field_c0) {
if (v4->field_30 == 9) {
v7 = v4->field_0;
*(&v7) = v4->field_0 & 127;
a2 = v7;
v4->field_0 = v7;
}
}
oops_error = 955024200;
}
for (v4 = family; v4; v4 = v4->field_c0) {
if (v4->field_30 == 15) {
v8 = v4->field_0;
*(&v8) = v4->field_0 & 127;
a2 = v8;
v4->field_0 = v8;
}
}
oops_error = 686588744;
if (false) {
v9 = 874961156424106824;
*(&v9) = 131;
tmp_9 = v9;
oops_error = tmp_9;
}
if (false) {
oops_error = 955024200;
for (v4 = family; v4; v4 = v4->field_c0) {
if ((v4->field_0 & 64)) {
a2 = v4->field_0 & -99;
v4->field_0 = v4->field_0 & -99;
if (v4->field_34 != 43)
write_utmp_wtmp(&g_407481, &v4->padding_c[16], v4->field_8, 0x8, 0x0);
}
}
}
if (false) {
v3 = runlevel;
if (runlevel != 85) {
if (v3 != 83 && runlevel == 83)
console_stty(a0, a1, a2, a3, 0x0, a5);
switch (runlevel) {
case 48: case 49: case 54:
console_stty(a0, a1, a2, a3, 0x0, a5);
default:
goto LABEL_405c1b;
}
LABEL_405c1b:
read_inittab(a0, 0x0, a2, a3, 0x0, a5);
fail_cancel();
setproctitle();
oops_error = 955024200;
} else {
runlevel = v3;
my_re_exec(a0, 0x0, a2, a3, 0x0, a5);
}
Write_Runlevel_Log(runlevel);
}
if (false) {
if (pipe_fd)
close(pipe_fd);
pipe_fd = -1;
v10 = 874961156424106824;
*(&v10) = 131;
tmp_10 = v10;
oops_error = tmp_10;
} else if (false) {
if (pipe_fd)
close(pipe_fd);
pipe_fd = -2;
v11 = 874961156424106824;
*(&v11) = 131;
tmp_10 = v11;
oops_error = tmp_10;
}
v13 = *(&v5) ^ v12[5];
return;
}
|
static int iprule_restore(void)
{
if (rule_dump_check_magic())
exit(-1);
exit(rtnl_from_file(
stdin
, &restore_handler,
((void *)0)
));
}
| void iprule_restore() {
if (rule_dump_check_magic())
exit(0xffffffff);
exit(rtnl_from_file(stdin, restore_handler, 0x0));
}
|
void
strmode(int mode, char *p)
{
switch (mode &
0170000
) {
case
0040000
:
*p++ = 'd';
break;
case
0020000
:
*p++ = 'c';
break;
case
0060000
:
*p++ = 'b';
break;
case
0100000
:
*p++ = '-';
break;
case
0120000
:
*p++ = 'l';
break;
case
0140000
:
*p++ = 's';
break;
case
0010000
:
*p++ = 'p';
break;
default:
*p++ = '?';
break;
}
if (mode &
0400
)
*p++ = 'r';
else
*p++ = '-';
if (mode &
0200
)
*p++ = 'w';
else
*p++ = '-';
switch (mode & (
0100
|
04000
)) {
case 0:
*p++ = '-';
break;
case
0100
:
*p++ = 'x';
break;
case
04000
:
*p++ = 'S';
break;
case
0100
|
04000
:
*p++ = 's';
break;
}
if (mode &
(0400 >> 3)
)
*p++ = 'r';
else
*p++ = '-';
if (mode &
(0200 >> 3)
)
*p++ = 'w';
else
*p++ = '-';
switch (mode & (
(0100 >> 3)
|
02000
)) {
case 0:
*p++ = '-';
break;
case
(0100 >> 3)
:
*p++ = 'x';
break;
case
02000
:
*p++ = 'S';
break;
case
(0100 >> 3)
|
02000
:
*p++ = 's';
break;
}
if (mode &
((0400 >> 3) >> 3)
)
*p++ = 'r';
else
*p++ = '-';
if (mode &
((0200 >> 3) >> 3)
)
*p++ = 'w';
else
*p++ = '-';
switch (mode & (
((0100 >> 3) >> 3)
|
01000
)) {
case 0:
*p++ = '-';
break;
case
((0100 >> 3) >> 3)
:
*p++ = 'x';
break;
case
01000
:
*p++ = 'T';
break;
case
((0100 >> 3) >> 3)
|
01000
:
*p++ = 't';
break;
}
*p++ = ' ';
*p = '\0';
}
| long long strmode(unsigned long a0, unsigned long long a1) {
unsigned long long v0;
int tmp_13;
char *v2;
char *v3;
char *v4;
char *v5;
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
char *v11;
char *v12;
char *v13;
char *v14;
char *v15;
char *v16;
char *v17;
char *v18;
char *v19;
char *v20;
char *v21;
char *v22;
char *v23;
char *v24;
char *v25;
char *v26;
char *v27;
char *v28;
char *v29;
char *v30;
char *v31;
char *v32;
char *v33;
v0 = a1;
if ((a0 & 0xf000) == 0xc000) {
v2 = v0;
v0 += 1;
*(v2) = 115;
} else {
if ((a0 & 0xf000) <= 0xc000) {
if ((a0 & 0xf000) == 0xa000) {
v3 = v0;
v0 += 1;
*(v3) = 108;
goto LABEL_400110;
}
if ((a0 & 0xf000) <= 0xa000) {
if ((a0 & 0xf000) == 0x8000) {
v4 = v0;
v0 += 1;
*(v4) = 45;
goto LABEL_400110;
}
if ((a0 & 0xf000) <= 0x8000) {
if ((a0 & 0xf000) == 0x6000) {
v5 = v0;
v0 += 1;
*(v5) = 98;
goto LABEL_400110;
}
if ((a0 & 0xf000) <= 0x6000) {
if ((a0 & 0xf000) == 0x4000) {
v6 = v0;
v0 += 1;
*(v6) = 100;
goto LABEL_400110;
}
if ((a0 & 0xf000) <= 0x4000) {
if ((a0 & 0xf000) == 0x1000) {
v7 = v0;
v0 += 1;
*(v7) = 112;
goto LABEL_400110;
} else if ((a0 & 0xf000) == 0x2000) {
v9 = v0;
v0 += 1;
*(v9) = 99;
goto LABEL_400110;
}
}
}
}
}
}
v8 = v0;
v0 += 1;
*(v8) = 63;
}
LABEL_400110:
if ((a0 & 0x100)) {
v10 = v0;
v0 += 1;
*(v10) = 114;
} else {
v11 = v0;
v0 += 1;
*(v11) = 45;
}
if ((a0 & 128)) {
v12 = v0;
v0 += 1;
*(v12) = 119;
} else {
v13 = v0;
v0 += 1;
*(v13) = 45;
}
if ((a0 & 2112) == 2112) {
v14 = v0;
v0 += 1;
*(v14) = 115;
} else if ((a0 & 2112) <= 2112) {
if ((a0 & 2112) == 0x800) {
v15 = v0;
v0 += 1;
*(v15) = 83;
} else if ((a0 & 2112) <= 0x800) {
if (!(a0 & 2112)) {
v16 = v0;
v0 += 1;
*(v16) = 45;
} else if ((a0 & 2112) == 64) {
v17 = v0;
v0 += 1;
*(v17) = 120;
}
}
}
if ((a0 & 32)) {
v18 = v0;
v0 += 1;
*(v18) = 114;
} else {
v19 = v0;
v0 += 1;
*(v19) = 45;
}
if ((a0 & 16)) {
v20 = v0;
v0 += 1;
*(v20) = 119;
} else {
v21 = v0;
v0 += 1;
*(v21) = 45;
}
if ((a0 & 1032) == 1032) {
v22 = v0;
v0 += 1;
*(v22) = 115;
} else if ((a0 & 1032) <= 1032) {
if ((a0 & 1032) == 0x400) {
v23 = v0;
v0 += 1;
*(v23) = 83;
} else if ((a0 & 1032) <= 0x400) {
if (!(a0 & 1032)) {
v24 = v0;
v0 += 1;
*(v24) = 45;
} else if ((a0 & 1032) == 8) {
v25 = v0;
v0 += 1;
*(v25) = 120;
}
}
}
if ((a0 & 4)) {
v26 = v0;
v0 += 1;
*(v26) = 114;
} else {
v27 = v0;
v0 += 1;
*(v27) = 45;
}
if ((a0 & 2)) {
v28 = v0;
v0 += 1;
*(v28) = 119;
} else {
v29 = v0;
v0 += 1;
*(v29) = 45;
}
if ((a0 & 513) == 513) {
v30 = v0;
v0 += 1;
*(v30) = 116;
} else if ((a0 & 513) <= 513) {
if ((a0 & 513) == 0x200) {
v31 = v0;
v0 += 1;
*(v31) = 84;
} else if ((a0 & 513) <= 0x200) {
if (!(a0 & 513)) {
v32 = v0;
v0 += 1;
*(v32) = 45;
} else if ((a0 & 513) == 1) {
v33 = v0;
v0 += 1;
*(v33) = 120;
}
}
}
tmp_13 = v0;
v0 += 1;
*(tmp_13) = 32;
*(v0) = 0;
return v0;
}
|
static inline int padvance(const char **path, const char *name)
{
return padvance_magic(path, name, 1);
}
| long padvance(long a1, long a2)
{
return padvance_magic(a1, a2, 1LL);
}
|
void decode_seed(gnutls_datum_t *seed, const char *hex, unsigned hex_size)
{
int ret;
size_t seed_size;
seed->size = hex_size;
seed->data = malloc(hex_size);
if (seed->data ==
((void *)0)
) {
fprintf(
stderr
, "memory error\n");
app_exit(1);
}
seed_size = hex_size;
ret = gnutls_hex2bin(hex, hex_size, seed->data, &seed_size);
if (ret < 0) {
fprintf(
stderr
, "Could not hex decode data: %s\n", gnutls_strerror(ret));
app_exit(1);
}
seed->size = seed_size;
return;
}
| long long decode_seed(struct_0 *a0, unsigned long long a1, unsigned long a2) {
unsigned int v0;
char v1;
a0->field_8 = a2;
a0->field_0 = malloc(a2);
if (!a0->field_0) {
fprintf(stderr, "memory error\n");
app_exit(0x1);
}
v0 = gnutls_hex2bin(a1, a2, a0->field_0, &v1);
if (v0 < 0) {
fprintf(stderr, "Could not hex decode data: %s\n", gnutls_strerror(v0));
app_exit(0x1);
}
a0->field_8 = a2;
return 0;
}
|
static void
hg_addfn (struct exclude *ex, char const *pattern, int options, void *data)
{
int *hgopt = data;
size_t len;
while (
((*__ctype_b_loc ())[(int) ((
*pattern
))] & (unsigned short int) _ISspace)
)
++pattern;
if (*pattern == 0 || *pattern == '#')
return;
if (strncmp (pattern, "syntax:", 7) == 0)
{
for (pattern += 7;
((*__ctype_b_loc ())[(int) ((
*pattern
))] & (unsigned short int) _ISspace)
; ++pattern)
;
if (strcmp (pattern, "regexp") == 0)
*hgopt = (1 << 27);
else if (strcmp (pattern, "glob") == 0)
*hgopt = (1 << 28);
return;
}
len = strlen(pattern);
if (pattern[len-1] == '/')
{
char *p;
--len;
p = xmalloc (len+1);
memcpy (p, pattern, len);
p[len] = 0;
pattern = p;
exclude_add_pattern_buffer (ex, p);
options |=
(1 << 3)
|(1 << 26);
}
add_exclude (ex, pattern,
((*hgopt == (1 << 27))
? (options & ~(1 << 28))
: (options & ~(1 << 27))) | *hgopt);
}
| long long hg_addfn(unsigned long long a0, void* a1, unsigned long a2, unsigned int *a3) {
unsigned long long v0;
char *v1;
unsigned long v2;
char *v3;
unsigned int v6;
unsigned long long v7;
unsigned long long v9;
v1 = a1;
*(&v0) = a2;
while (true) {
v6 = *((*(v1) * 2 + *(__ctype_b_loc()))) & 0x2000;
if (!v6)
break;
v1 += 1;
}
v9 = *(v1);
if (*(v1)) {
v9 = *(v1);
if (*(v1) != 35) {
v7 = strncmp(v1, "syntax:", 0x7);
if (!v7) {
v1 += 7;
while (true) {
*(&v7) = *((*(v1) * 2 + *(__ctype_b_loc())));
*(&v7) = v7 & 0x2000;
if (!v7)
break;
v1 += 1;
}
if (!strcmp(v1, "regexp")) {
v9 = a3;
*(a3) = 0x8000000;
} else {
v9 = strcmp(v1, "glob");
if (!v9) {
v9 = a3;
*(a3) = 0x10000000;
}
}
} else {
v2 = strlen(v1);
if (v1[1 + v2] == 47) {
v2 -= 1;
v3 = xmalloc(v2 + 1);
memcpy(v3, v1, v2);
*((v2 + v3)) = 0;
v1 = v3;
exclude_add_pattern_buffer(a0, v3, v3);
*(&v0) = v0 | 67108872;
}
if (*(a3) == 0x8000000)
*(&v7) = v0 & 4026531839;
else
*(&v7) = v0 & -134217729;
v9 = add_exclude(a0, v1, *(a3) | v7, v1);
}
}
}
return v9;
}
|
static inline void
closefrom_close(int fd)
{
(void)close(fd);
}
| void closefrom_close(unsigned long a0) {
unsigned long long v1;
v1 = close(a0);
return;
}
|
static void e2fsck_clear_recover(e2fsck_t ctx, int error)
{
ext2fs_clear_feature_journal_needs_recovery(ctx->fs->super);
if (error)
ctx->fs->super->s_state &= ~0x0001;
ext2fs_mark_super_dirty(ctx->fs);
}
| void e2fsck_clear_recover(struct struct_0 **a0, unsigned long a1) {
unsigned long long v1;
ext2fs_clear_feature_journal_needs_recovery(*(a0)->field_20);
if (a1)
*(a0)->field_20->field_3a = *(a0)->field_20->field_3a & 4294967294;
v1 = ext2fs_mark_super_dirty(*(a0));
return;
}
|
static int
pem_passphrase_cb(char *buf, int size, int rwflag, void *u)
{
char *p = (char *)u;
size_t len;
if (p ==
((void *)0)
|| (len = strlen(p)) == 0)
return -1;
if (size < 0 || len > (size_t)size)
return -1;
memcpy(buf, p, len);
return (int)len;
}
| size_t pem_passphrase_cb(void *param_1,int param_2,undefined8 param_3,char *param_4)
{
size_t __n;
if ((param_4 == (char *)0x0) || (__n = strlen(param_4), __n == 0)) {
return 0xffffffff;
}
if ((-1 < param_2) && (__n <= (ulong)(long)param_2)) {
memcpy(param_1,param_4,__n);
return __n;
}
return 0xffffffff;
}
|
static gl_list_node_t
gl_linked_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
size_t count = list->count;
gl_list_node_t node;
if (!(position < count))
abort ();
if (position <= ((count - 1) / 2))
{
node = list->root.next;
for (; position > 0; position--)
node = node->next;
}
else
{
position = count - 1 - position;
node = list->root.prev;
for (; position > 0; position--)
node = node->prev;
}
node->value = elt;
return node;
}
| long long gl_linked_nx_set_at(unsigned long long a0[9], unsigned long a1, unsigned long a2) {
char v0;
unsigned long v1;
unsigned long long v2[3];
unsigned long v3;
v1 = a1;
v3 = a0[8];
if (v1 >= v3)
abort();
if (v1 <= v3 - 1 >> 1) {
for (v2[0] = a0[5]; v1; v1 -= 1) {
v2[0] = v2[0];
}
} else {
v1 = v3 - v1 - 1;
for (v2[0] = a0[6]; v1; v1 -= 1) {
v2[0] = v2[1];
}
}
v2[2] = *(&v0);
return v2;
}
|
int
_rl_dispatch (register int key, Keymap map)
{
_rl_dispatching_keymap = map;
return _rl_dispatch_subseq (key, map, 0);
}
| long long _rl_dispatch(unsigned long long a0, unsigned long long a1) {
_rl_dispatching_keymap = a1;
return _rl_dispatch_subseq(a0, a1, 0, a1);
}
|
void
pty_release(const char *tty)
{
}
| long long pty_release(unsigned long a0) {
unsigned long v0;
unsigned long v2;
v0 = a0;
return v2;
}
|
static void new_grent (struct group *grent)
{
explicit_bzero((grent), (sizeof *grent));
grent->gr_name = (char *) user_name;
if (is_shadow_grp) {
grent->gr_passwd = "x";
} else
{
grent->gr_passwd = "!";
}
grent->gr_gid = user_gid;
grent->gr_mem = &empty_list;
}
| void new_grent(struct_0 *a0) {
struct_0 *v1;
explicit_bzero(a0, 0x20);
a0->field_0 = user_name;
if (is_shadow_grp)
a0->field_8 = "x";
else
a0->field_8 = "!";
a0->field_10 = user_gid;
v1 = a0;
a0->field_18 = &empty_list;
return;
}
|
static void
cmdtxt(union node *n)
{
union node *np;
struct nodelist *lp;
const char *p;
char s[2];
if (!n)
return;
switch (n->type) {
default:
case 1:
lp = n->npipe.cmdlist;
for (;;) {
cmdtxt(lp->n);
lp = lp->next;
if (!lp)
break;
cmdputs(" | ");
}
break;
case 7:
p = "; ";
goto binop;
case 5:
p = " && ";
goto binop;
case 6:
p = " || ";
binop:
cmdtxt(n->nbinary.ch1);
cmdputs(p);
n = n->nbinary.ch2;
goto donode;
case 2:
case 3:
n = n->nredir.n;
goto donode;
case 25:
cmdputs("!");
n = n->nnot.com;
donode:
cmdtxt(n);
break;
case 8:
cmdputs("if ");
cmdtxt(n->nif.test);
cmdputs("; then ");
if (n->nif.elsepart) {
cmdtxt(n->nif.ifpart);
cmdputs("; else ");
n = n->nif.elsepart;
} else {
n = n->nif.ifpart;
}
p = "; fi";
goto dotail;
case 4:
cmdputs("(");
n = n->nredir.n;
p = ")";
goto dotail;
case 9:
p = "while ";
goto until;
case 10:
p = "until ";
until:
cmdputs(p);
cmdtxt(n->nbinary.ch1);
n = n->nbinary.ch2;
p = "; done";
dodo:
cmdputs("; do ");
dotail:
cmdtxt(n);
goto dotail2;
case 11:
cmdputs("for ");
cmdputs(n->nfor.var);
cmdputs(" in ");
cmdlist(n->nfor.args, 1);
n = n->nfor.body;
p = "; done";
goto dodo;
case 14:
cmdputs(n->ndefun.text);
p = "() { ... }";
goto dotail2;
case 0:
cmdlist(n->ncmd.args, 1);
cmdlist(n->ncmd.redirect, 0);
break;
case 15:
p = n->narg.text;
dotail2:
cmdputs(p);
break;
case 23:
case 24:
p = "<<...";
goto dotail2;
case 12:
cmdputs("case ");
cmdputs(n->ncase.expr->narg.text);
cmdputs(" in ");
for (np = n->ncase.cases; np; np = np->nclist.next) {
cmdtxt(np->nclist.pattern);
cmdputs(") ");
cmdtxt(np->nclist.body);
cmdputs(";; ");
}
p = "esac";
goto dotail2;
case 16:
p = ">";
goto redir;
case 17:
p = ">|";
goto redir;
case 20:
p = ">>";
goto redir;
case 21:
p = ">&";
goto redir;
case 18:
p = "<";
goto redir;
case 22:
p = "<&";
goto redir;
case 19:
p = "<>";
redir:
s[0] = n->nfile.fd + '0';
s[1] = '\0';
cmdputs(s);
cmdputs(p);
if (n->type == 21 || n->type == 22) {
s[0] = n->ndup.dupfd + '0';
p = s;
goto dotail2;
} else {
n = n->nfile.fname;
goto donode;
}
}
}
| unsigned long cmdtxt(long a1)
{
long v2;
_QWORD *i;
_QWORD *v4;
const char *v5;
const char *v6;
const char *v7;
char v8[2];
unsigned long v9;
v9 = __readfsqword(0x28u);
if ( a1 )
{
switch ( *(_DWORD *)a1 )
{
case 0:
cmdlist(*(_QWORD *)(a1 + 16), 1);
cmdlist(*(_QWORD *)(a1 + 24), 0);
return __readfsqword(0x28u) ^ v9;
case 2:
case 3:
cmdtxt(*(_QWORD *)(a1 + 8));
return __readfsqword(0x28u) ^ v9;
case 4:
cmdputs("(");
v6 = ")";
cmdtxt(*(_QWORD *)(a1 + 8));
goto LABEL_29;
case 5:
v5 = " && ";
goto LABEL_10;
case 6:
v5 = " || ";
goto LABEL_10;
case 7:
v5 = "; ";
LABEL_10:
cmdtxt(*(_QWORD *)(a1 + 8));
cmdputs(v5);
cmdtxt(*(_QWORD *)(a1 + 16));
return __readfsqword(0x28u) ^ v9;
case 8:
cmdputs("if ");
cmdtxt(*(_QWORD *)(a1 + 8));
cmdputs("; then ");
if ( *(_QWORD *)(a1 + 24) )
{
cmdtxt(*(_QWORD *)(a1 + 16));
cmdputs("; else ");
v2 = *(_QWORD *)(a1 + 24);
}
else
{
v2 = *(_QWORD *)(a1 + 16);
}
v6 = "; fi";
goto LABEL_23;
case 9:
cmdputs("while ");
goto LABEL_21;
case 0xA:
cmdputs("until ");
LABEL_21:
cmdtxt(*(_QWORD *)(a1 + 8));
v2 = *(_QWORD *)(a1 + 16);
v6 = "; done";
goto LABEL_22;
case 0xB:
cmdputs("for ");
cmdputs(*(const char **)(a1 + 24));
cmdputs(" in ");
cmdlist(*(_QWORD *)(a1 + 8), 1);
v2 = *(_QWORD *)(a1 + 16);
v6 = "; done";
LABEL_22:
cmdputs("; do ");
LABEL_23:
cmdtxt(v2);
goto LABEL_29;
case 0xC:
cmdputs("case ");
cmdputs(*(const char **)(*(_QWORD *)(a1 + 8) + 16LL));
cmdputs(" in ");
for ( i = *(_QWORD **)(a1 + 16); i; i = (_QWORD *)i[1] )
{
cmdtxt(i[2]);
cmdputs(") ");
cmdtxt(i[3]);
cmdputs(";; ");
}
cmdputs("esac");
return __readfsqword(0x28u) ^ v9;
case 0xE:
cmdputs(*(const char **)(a1 + 8));
cmdputs("() { ... }");
return __readfsqword(0x28u) ^ v9;
case 0xF:
v6 = *(const char **)(a1 + 16);
LABEL_29:
cmdputs(v6);
return __readfsqword(0x28u) ^ v9;
case 0x10:
v7 = ">";
goto LABEL_43;
case 0x11:
v7 = ">|";
goto LABEL_43;
case 0x12:
v7 = "<";
goto LABEL_43;
case 0x13:
v7 = "<>";
goto LABEL_43;
case 0x14:
v7 = ">>";
goto LABEL_43;
case 0x15:
v7 = ">&";
goto LABEL_43;
case 0x16:
v7 = "<&";
LABEL_43:
v8[0] = *(_DWORD *)(a1 + 16) + 48;
v8[1] = 0;
cmdputs(v8);
cmdputs(v7);
if ( *(_DWORD *)a1 == 21 || *(_DWORD *)a1 == 22 )
{
v8[0] = *(_DWORD *)(a1 + 20) + 48;
cmdputs(v8);
}
else
{
cmdtxt(*(_QWORD *)(a1 + 24));
}
break;
case 0x17:
case 0x18:
cmdputs("<<...");
break;
case 0x19:
cmdputs("!");
cmdtxt(*(_QWORD *)(a1 + 8));
break;
default:
v4 = *(_QWORD **)(a1 + 8);
while ( 1 )
{
cmdtxt(v4[1]);
v4 = (_QWORD *)*v4;
if ( !v4 )
break;
cmdputs(" | ");
}
break;
}
}
return __readfsqword(0x28u) ^ v9;
}
|
static int rmmod_all(struct kmod_ctx *ctx, char **args, int nargs)
{
int i, err = 0;
for (i = 0; i < nargs; i++) {
int r = rmmod(ctx, args[i]);
if (r < 0)
err = r;
}
return err;
}
| int rmmod_all(unsigned long long a0, unsigned long long *a1, unsigned long a2) {
unsigned int v0;
unsigned int v1;
unsigned int v2;
v1 = 0;
for (v0 = 0; v0 < a2; v0 += 1) {
v2 = rmmod(a0, a1[v0]);
if (v2 < 0)
v1 = v2;
}
return v1;
}
|
static void read_cgroup_pids(const char *base_path, char *name)
{
char path[
4096
];
char buf[4096];
FILE *fp;
if (snprintf(path, sizeof(path), "%s/vrf/%s%s",
base_path, name, "/cgroup.procs") >= sizeof(path))
return;
fp = fopen(path, "r");
if (!fp)
return;
while (fgets(buf, sizeof(buf), fp)) {
char *nl, comm[32];
nl = strchr(buf, '\n');
if (nl)
*nl = '\0';
if (get_command_name(buf, comm, sizeof(comm)))
strcpy(comm, "<terminated?>");
printf("%5s %s\n", buf, comm);
}
fclose(fp);
}
| void read_cgroup_pids(unsigned long a0, unsigned long a1) {
void* v0;
char *v1;
char v2;
char v3;
char v4;
char v5;
char v6;
char v7;
unsigned long long *v12;
unsigned long long v13;
v6 = *(&v6);
v4 = *(&v4);
if (snprintf(&v3, 0x1000, "%s/vrf/%s%s", a0, a1, &g_441c36) <= 4095) {
v0 = fopen64(&v3, "r");
if (v0) {
while (true) {
if (!fgets(&v5, 0x1000, v0))
break;
v1 = strchr(&v5, 0xa);
if (v1)
*(v1) = 0;
if (get_command_name(&v5, &v2, 0x20, &v2))
strcpy(&v2, "<terminated?>");
printf("%5s %s\n", &v5, &v2);
}
fclose(v0);
}
}
v13 = *(&v7) ^ v12[5];
return;
}
|
static int
file_mod_date_changed (i)
int i;
{
time_t mtime;
struct stat finfo;
char *file;
file = mailfiles[i]->name;
mtime = mailfiles[i]->mod_time;
if (mailstat (file, &finfo) != 0)
return (0);
if (finfo.st_size > 0)
return (mtime < finfo.
st_mtim.tv_sec
);
if (finfo.st_size == 0 && mailfiles[i]->file_size > 0)
do { mailfiles[i]->access_time = finfo.
st_atim.tv_sec
; mailfiles[i]->mod_time = finfo.
st_mtim.tv_sec
; mailfiles[i]->file_size = finfo.st_size; mailfiles[i]->flags |= 0x01; } while (0);
return (0);
}
| bool file_mod_date_changed(int param_1)
{
long lVar1;
bool bVar2;
int iVar3;
long in_FS_OFFSET;
undefined local_a8 [48];
long local_78;
undefined8 local_60;
long local_50;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(*(long *)(mailfiles + (long)param_1 * 8) + 0x18);
iVar3 = mailstat(**(undefined8 **)(mailfiles + (long)param_1 * 8),local_a8);
if (iVar3 == 0) {
if (local_78 < 1) {
if ((local_78 == 0) && (0 < *(long *)(*(long *)(mailfiles + (long)param_1 * 8) + 0x20))) {
*(undefined8 *)(*(long *)(mailfiles + (long)param_1 * 8) + 0x10) = local_60;
*(long *)(*(long *)(mailfiles + (long)param_1 * 8) + 0x18) = local_50;
*(undefined8 *)(*(long *)(mailfiles + (long)param_1 * 8) + 0x20) = 0;
*(uint *)(*(long *)(mailfiles + (long)param_1 * 8) + 0x28) =
*(uint *)(*(long *)(mailfiles + (long)param_1 * 8) + 0x28) | 1;
}
bVar2 = false;
}
else {
bVar2 = lVar1 < local_50;
}
}
else {
bVar2 = false;
}
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return bVar2;
}
|
static int
monitor_valid_hostbasedblob(const u_char *data, u_int datalen,
const char *cuser, const char *chost)
{
struct sshbuf *b;
const u_char *p;
char *cp, *userstyle;
size_t len;
int r, fail = 0;
u_char type;
if ((b = sshbuf_from(data, datalen)) ==
((void *)0)
)
sshfatal("monitor.c", __func__, 1335, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "sshbuf_new");
if ((r = sshbuf_get_string_direct(b, &p, &len)) != 0)
sshfatal("monitor.c", __func__, 1337, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse sessionid");
if ((session_id2 ==
((void *)0)
) ||
(len != session_id2_len) ||
(timingsafe_bcmp(p, session_id2, session_id2_len) != 0))
fail++;
if ((r = sshbuf_get_u8(b, &type)) != 0)
sshfatal("monitor.c", __func__, 1345, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse type");
if (type != 50)
fail++;
if ((r = sshbuf_get_cstring(b, &cp,
((void *)0)
)) != 0)
sshfatal("monitor.c", __func__, 1349, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse userstyle");
xasprintf(&userstyle, "%s%s%s", authctxt->user,
authctxt->style ? ":" : "",
authctxt->style ? authctxt->style : "");
if (strcmp(userstyle, cp) != 0) {
sshlog("monitor.c", __func__, 1354, 0, SYSLOG_LEVEL_INFO,
((void *)0)
, "wrong user name passed to monitor: " "expected %s != %.100s", userstyle, cp)
;
fail++;
}
free(userstyle);
free(cp);
if ((r = sshbuf_get_string_direct(b,
((void *)0)
,
((void *)0)
)) != 0 ||
(r = sshbuf_get_cstring(b, &cp,
((void *)0)
)) != 0)
sshfatal("monitor.c", __func__, 1362, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse method");
if (strcmp(cp, "hostbased") != 0)
fail++;
free(cp);
if ((r = sshbuf_get_string_direct(b,
((void *)0)
,
((void *)0)
)) != 0 ||
(r = sshbuf_get_string_direct(b,
((void *)0)
,
((void *)0)
)) != 0)
sshfatal("monitor.c", __func__, 1368, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse pk");
if ((r = sshbuf_get_cstring(b, &cp,
((void *)0)
)) != 0)
sshfatal("monitor.c", __func__, 1372, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse host");
if (((len = strlen(cp)) > 0) && cp[len - 1] == '.')
cp[len - 1] = '\0';
if (strcmp(cp, chost) != 0)
fail++;
free(cp);
if ((r = sshbuf_get_cstring(b, &cp,
((void *)0)
)) != 0)
sshfatal("monitor.c", __func__, 1381, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse ruser");
if (strcmp(cp, cuser) != 0)
fail++;
free(cp);
if (sshbuf_len(b) != 0)
fail++;
sshbuf_free(b);
return (fail == 0);
}
| int monitor_valid_hostbasedblob(unsigned long long a0, unsigned long a1, char *a2, char *a3) {
char *v0;
char v1;
unsigned int v2;
unsigned int v3;
char v4;
char v5;
char v6;
char v7;
unsigned long long v8;
unsigned long long v9;
char v10;
unsigned long long v13;
unsigned long long v14;
v0 = a2;
v3 = 0;
v8 = sshbuf_from(a0, a1, a1);
if (!v8)
sshfatal("monitor.c", "monitor_valid_hostbasedblob", 0x537, 0x1, 0x1, 0x0, "sshbuf_new");
v2 = sshbuf_get_string_direct(v8, &v4, &v7, &v4);
if (v2) {
v9 = "parse sessionid";
sshfatal("monitor.c", "monitor_valid_hostbasedblob", 0x539, 0x1, 0x1, ssh_err(v2), *(&v10));
}
if (!session_id2 || timingsafe_bcmp(*(&v4), session_id2, session_id2_len, session_id2) || session_id2_len != *(&v7))
v3 = __addvsi3(v3, 0x1);
v2 = sshbuf_get_u8(v8, &v1, &v1);
if (v2) {
v9 = "parse type";
sshfatal("monitor.c", "monitor_valid_hostbasedblob", 0x541, 0x1, 0x1, ssh_err(v2), *(&v10));
}
if (v1 != 50)
v3 = __addvsi3(v3, 0x1);
v2 = sshbuf_get_cstring(v8, &v5, 0x0, &v5);
if (v2) {
v9 = "parse userstyle";
sshfatal("monitor.c", "monitor_valid_hostbasedblob", 0x545, 0x1, 0x1, ssh_err(v2), *(&v10));
}
if (*((authctxt + 56)))
v13 = *((authctxt + 56));
else
v13 = &g_4063a3;
if (*((authctxt + 56)))
v14 = ":";
else
v14 = &g_4063a3;
xasprintf(&v6, "%s%s%s", *((authctxt + 32)), v14, v13);
if (strcmp(*(&v6), *(&v5))) {
v9 = *(&v5);
v8 = *(&v6);
v7 = "wrong user name passed to monitor: expected %s != %.100s";
sshlog("monitor.c", "monitor_valid_hostbasedblob", 0x54a, 0x0, 0x3, 0x0);
v3 = __addvsi3(v3, 0x1);
}
free(*(&v6));
free(*(&v5));
v2 = sshbuf_get_string_direct(v8, 0x0, 0x0, a3);
if (!v2)
v2 = sshbuf_get_cstring(v8, &v5, 0x0, &v5);
if (v2 || v2) {
v9 = "parse method";
sshfatal("monitor.c", "monitor_valid_hostbasedblob", 0x552, 0x1, 0x1, ssh_err(v2), *(&v10));
}
if (strcmp(*(&v5), "hostbased"))
v3 = __addvsi3(v3, 0x1);
free(*(&v5));
v2 = sshbuf_get_string_direct(v8, 0x0, 0x0, a3);
if (!v2)
v2 = sshbuf_get_string_direct(v8, 0x0, 0x0, a3);
if (v2 || v2) {
v9 = "parse pk";
sshfatal("monitor.c", "monitor_valid_hostbasedblob", 0x558, 0x1, 0x1, ssh_err(v2), *(&v10));
}
v2 = sshbuf_get_cstring(v8, &v5, 0x0, &v5);
if (v2) {
v9 = "parse host";
sshfatal("monitor.c", "monitor_valid_hostbasedblob", 0x55c, 0x1, 0x1, ssh_err(v2), *(&v10));
}
v7 = strlen(*(&v5));
if (v7 && *((*(&v5) + v7 - 1)) == 46)
*((*(&v5) + v7 - 1)) = 0;
if (strcmp(*(&v5), a3))
v3 = __addvsi3(v3, 0x1);
free(*(&v5));
v2 = sshbuf_get_cstring(v8, &v5, 0x0, &v5);
if (v2) {
v9 = "parse ruser";
sshfatal("monitor.c", "monitor_valid_hostbasedblob", 0x565, 0x1, 0x1, ssh_err(v2), *(&v10));
}
if (strcmp(*(&v5), v0))
v3 = __addvsi3(v3, 0x1);
free(*(&v5));
if (sshbuf_len(v8))
v3 = __addvsi3(v3, 0x1);
sshbuf_free(v8);
return !v3;
}
|
int
addr_match_cidr_list(const char *addr, const char *_list)
{
char *list, *cp, *o;
struct xaddr try_addr, match_addr;
u_int masklen;
int ret = 0, r;
if (addr !=
((void *)0)
&& addr_pton(addr, &try_addr) != 0) {
sshlog("addrmatch.c", __func__, 117, 1, SYSLOG_LEVEL_DEBUG2,
((void *)0)
, "couldn't parse address %.100s", addr);
return 0;
}
if ((o = list = strdup(_list)) ==
((void *)0)
)
return -1;
while ((cp = strsep(&list, ",")) !=
((void *)0)
) {
if (*cp == '\0') {
sshlog("addrmatch.c", __func__, 124, 1, SYSLOG_LEVEL_ERROR,
((void *)0)
, "empty entry in list \"%.100s\"", o);
ret = -1;
break;
}
if (strlen(cp) >
46
+ 3) {
sshlog("addrmatch.c", __func__, 137, 1, SYSLOG_LEVEL_ERROR,
((void *)0)
, "list entry \"%.100s\" too long", cp);
ret = -1;
break;
}
if (strspn(cp, "0123456789abcdefABCDEF.:/") != strlen(cp)) {
sshlog("addrmatch.c", __func__, 143, 1, SYSLOG_LEVEL_ERROR,
((void *)0)
, "list entry \"%.100s\" contains invalid " "characters", cp)
;
ret = -1;
}
r = addr_pton_cidr(cp, &match_addr, &masklen);
if (r == -1) {
sshlog("addrmatch.c", __func__, 151, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "Invalid network entry \"%.100s\"", cp);
ret = -1;
break;
} else if (r == -2) {
sshlog("addrmatch.c", __func__, 155, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "Inconsistent mask length for " "network \"%.100s\"", cp)
;
ret = -1;
break;
} else if (r == 0 && addr !=
((void *)0)
) {
if (addr_netmatch(&try_addr, &match_addr,
masklen) == 0)
ret = 1;
continue;
}
}
free(o);
return ret;
}
| long addr_match_cidr_list(const char *a1, const char *a2)
{
size_t v3;
unsigned int v4;
unsigned int v5;
int v6;
char *stringp;
void *ptr;
char *v9;
char v10[32];
char v11[24];
unsigned long v12;
v12 = __readfsqword(0x28u);
v5 = 0;
if ( a1 && (unsigned int)addr_pton(a1, v10) )
{
sshlog("addrmatch.c", "addr_match_cidr_list", 117LL, 1LL, 6LL, 0LL, "couldn't parse address %.100s", a1);
return 0LL;
}
else
{
stringp = strdup(a2);
ptr = stringp;
if ( stringp )
{
while ( 1 )
{
v9 = strsep(&stringp, ",");
if ( !v9 )
break;
if ( !*v9 )
{
sshlog(
"addrmatch.c",
"addr_match_cidr_list",
124LL,
1LL,
2LL,
0LL,
"empty entry in list \"%.100s\"",
(const char *)ptr);
v5 = -1;
break;
}
if ( strlen(v9) > 0x31 )
{
sshlog("addrmatch.c", "addr_match_cidr_list", 137LL, 1LL, 2LL, 0LL, "list entry \"%.100s\" too long", v9);
v5 = -1;
break;
}
v3 = strspn(v9, "0123456789abcdefABCDEF.:/");
if ( v3 != strlen(v9) )
{
sshlog(
"addrmatch.c",
"addr_match_cidr_list",
143LL,
1LL,
2LL,
0LL,
"list entry \"%.100s\" contains invalid characters",
v9);
v5 = -1;
}
v6 = addr_pton_cidr(v9, v11, &v4);
if ( v6 == -1 )
{
sshlog("addrmatch.c", "addr_match_cidr_list", 151LL, 0LL, 2LL, 0LL, "Invalid network entry \"%.100s\"", v9);
v5 = -1;
break;
}
if ( v6 == -2 )
{
sshlog(
"addrmatch.c",
"addr_match_cidr_list",
155LL,
0LL,
2LL,
0LL,
"Inconsistent mask length for network \"%.100s\"",
v9);
v5 = -1;
break;
}
if ( !v6 && a1 && !(unsigned int)addr_netmatch(v10, v11, v4) )
v5 = 1;
}
free(ptr);
return v5;
}
else
{
return 0xFFFFFFFFLL;
}
}
}
|
static char **
make_env_array_from_var_list (vars)
SHELL_VAR **vars;
{
register int i, list_index;
register SHELL_VAR *var;
char **list, *value;
list = strvec_create ((1 + strvec_len ((char **)vars)));
for (i = 0, list_index = 0; var = vars[i]; i++)
{
if (((((var)->attributes) & (0x0040000))) && var->dynamic_value)
{
var = (*(var->dynamic_value)) (var);
do { if ((var)->exportstr) { sh_xfree(((var)->exportstr), "variables.c", 4907); (var)->exportstr = (char *)
((void *)0)
; } } while (0);
}
if (var->exportstr)
value = var->exportstr;
else if (((((var)->attributes) & (0x0000008))))
value = named_function_string ((char *)
((void *)0)
, (COMMAND *)((var)->value), 0);
else if (((((var)->attributes) & (0x0000004))))
continue;
else if (((((var)->attributes) & (0x0000040))))
continue;
else
value = ((var)->value);
if (value)
{
list[list_index] = (value == var->exportstr && ((((var)->attributes) & (0x0000004))) == 0 && ((((var)->attributes) & (0x0000040))) == 0) ? (char *)strcpy (sh_xmalloc((1 + strlen (value)), "variables.c", 4935), (value))
: mk_env_string (var->name, value, var->attributes);
if ((value == var->exportstr && ((((var)->attributes) & (0x0000004))) == 0 && ((((var)->attributes) & (0x0000040))) == 0) == 0)
(var)->exportstr = (list[list_index]) ? (char *)strcpy (sh_xmalloc((1 + strlen (list[list_index])), "variables.c", 4939), (list[list_index])) : (char *)
((void *)0)
;
list_index++;
}
}
list[list_index] = (char *)
((void *)0)
;
return (list);
}
| int make_env_array_from_var_list(void* a0) {
void* v0;
void* v1;
void* v3;
void* v4;
struct_0 *v5;
unsigned int v6;
void* v7;
v1 = strvec_create(strvec_len(a0) + 1);
v3 = 0;
v4 = 0;
while (true) {
v5 = *((a0 + 0x8 * v3));
if (!*((a0 + 0x8 * v3)))
break;
if ((*((*((a0 + 0x8 * v3)) + 40)) & 0x40000) && *((*((a0 + 0x8 * v3)) + 24))) {
v5 = *((*((a0 + 0x8 * v3)) + 24))(*((a0 + 0x8 * v3)));
if (v5->field_10) {
sh_xfree(v5->field_10, "variables.c", 0x132b);
v5->field_10 = 0;
}
}
if (v5->field_10) {
v0 = v5->field_10;
goto LABEL_408ace;
}
if ((v5->field_28 & 8)) {
v0 = named_function_string(0x0, v5->field_8, 0x0);
goto LABEL_408ace;
} else {
if (!(v5->field_28 & 4) && !(v5->field_28 & 64)) {
v0 = v5->field_8;
LABEL_408ace:
if (v0) {
if (v0 != v5->field_10 || (v5->field_28 & 4) || (v5->field_28 & 64))
v6 = mk_env_string(v5->field_0, v0, v5->field_28);
else
v6 = strcpy(sh_xmalloc(strlen(v0) + 1, "variables.c", 0x1347), v0);
*((v1 + 0x8 * v4)) = v6;
if (v0 != v5->field_10 || (v5->field_28 & 4) || (v5->field_28 & 64))
v6 = 0;
else
v6 = 1;
if (!v6) {
if (*((v1 + 0x8 * v4)))
v7 = strcpy(sh_xmalloc(strlen(*((v1 + 0x8 * v4))) + 1, "variables.c", 0x134b), *((v1 + 0x8 * v4)));
else
v7 = 0;
v5->field_10 = v7;
}
v4 = v4 + 1;
}
}
v3 = v3 + 1;
}
}
*((v1 + 0x8 * v4)) = 0;
return v1;
}
|
Option == opt_test) {
fprintf(
stderr
, "cannot use -u with -n, -c or -T\n");
exit(1);
}
| int fprintf(FILE *__stream,char *__format,...)
{
halt_baddata();
}
|
static int
start_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
uintmax_t *read_pos)
{
if (n_lines == 0)
return 0;
while (
1
)
{
char buffer[
8192
];
size_t bytes_read = safe_read (fd, buffer,
8192
);
if (bytes_read == 0)
return -1;
if (bytes_read == ((size_t) -1))
{
error (0,
(*__errno_location ())
, gettext ("error reading %s"), quotearg_style (shell_escape_always_quoting_style, pretty_filename));
return 1;
}
char *buffer_end = buffer + bytes_read;
*read_pos += bytes_read;
char *p = buffer;
while ((p = memchr (p, line_end, buffer_end - p)))
{
++p;
if (--n_lines == 0)
{
if (p < buffer_end)
xwrite_stdout (p, buffer_end - p);
return 0;
}
}
}
}
| int start_lines(unsigned long long a0, unsigned long a1, unsigned long a2, unsigned long long *a3) {
unsigned long long *v0;
unsigned long v1;
void* v2;
unsigned long v3;
unsigned long v4;
char v5;
char v6;
unsigned long long v7;
unsigned int v9;
unsigned long long v10;
v7 = *(&v7);
v6 = *(&v6);
v1 = a2;
v0 = a3;
if (!v1) {
v9 = 0;
return v9;
}
while (true) {
v3 = safe_read(a1, &v5, 0x2000, &v5);
if (!v3) {
v9 = -1;
return v9;
} else if (v3 != -1) {
v4 = &(&v5)[v3];
*(a3) = *(a3) + v3;
v2 = &v5;
while (true) {
v2 = memchr(v2, line_end, v4 - v2);
if (!v2)
break;
v2 += 1;
v1 -= 1;
if (!v1) {
if (v2 < v4)
xwrite_stdout(v2, (v4 - v2));
v9 = 0;
return v9;
}
}
} else {
v10 = quotearg_style(0x4, a0);
error(0x0, *(__errno_location()), gettext("error reading %s"));
v9 = 1;
return v9;
}
}
}
|
static char *
prepare_proctitle(int ac, char **av)
{
char *ret =
((void *)0)
;
int i;
for (i = 0; i < ac; i++)
xextendf(&ret, " ", "%s", av[i]);
return ret;
}
| int prepare_proctitle(unsigned long a0, unsigned long long *a1) {
unsigned int v0;
void* v1;
v1 = 0;
for (v0 = 0; v0 < a0; v0 = __addvsi3(v0, 0x1)) {
xextendf(&v1, " ", "%s", a1[v0]);
}
return v1;
}
|
void
el_reset(EditLine *el)
{
tty_cookedmode(el);
ch_reset(el);
}
| void el_reset(unsigned long long a0) {
unsigned long long v1;
tty_cookedmode(a0);
v1 = ch_reset(a0);
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.