input
stringlengths 28
169k
| output
stringlengths 20
317k
|
|---|---|
static inline void
write_pending (char *outbuf, char **bpout)
{
idx_t n_write = *bpout - outbuf;
if (0 < n_write)
{
if (full_write (
1
, outbuf, n_write) != n_write)
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), gettext (\"write error\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
,
(*__errno_location ())
, gettext ("write error")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
,
(*__errno_location ())
, gettext ("write error")), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
*bpout = outbuf;
}
}
|
void write_pending(unsigned long long a0, unsigned long long *a1) {
unsigned long long v0;
unsigned long long v2;
unsigned long long *v3;
v2 = *(a1) - a0;
v0 = *(a1) - a0;
if (v0 <= 0)
return;
if (full_write(0x1, a0, v0) == v0) {
v3 = a1;
*(a1) = a0;
return;
}
error(0x1, *(__errno_location()), gettext("write error"));
}
|
static void nlprompt(void)
{
(parsefile->linno)++;
if (doprompt)
setprompt(2);
}
|
unsigned long nlprompt()
{
unsigned long result;
++*(_DWORD *)(parsefile + 8LL);
result = (unsigned int)doprompt;
if ( doprompt )
return setprompt((_BYTE *)&loc_1 + 1);
return result;
}
|
static
void compressedStreamEOF ( void )
{
if (noisy) {
fprintf (
stderr
,
"\n%s: Compressed file ends unexpectedly;\n\t"
"perhaps it is corrupted? *Possible* reason follows.\n",
progName );
perror ( progName );
showFileNames();
cadvise();
}
cleanUpAndFail( 2 );
}
|
void compressedStreamEOF(void)
{
if (noisy != '\0') {
fprintf(stderr,
"\n%s: Compressed file ends unexpectedly;\n\tperhaps it is corrupted? *Possible* reason follows.\n"
,progName);
perror(progName);
showFileNames();
cadvise();
}
cleanUpAndFail(2);
}
|
vi_paste_next(EditLine *el, wint_t c __attribute__((__unused__)))
{
return cv_paste(el, 0);
}
|
long long vi_paste_next(void* a0, unsigned long a1) {
unsigned int v0;
v0 = a1;
return cv_paste(a0, 0x0);
}
|
void
_rl_control_keypad (int on)
{
if (on && _rl_term_ks)
tputs (_rl_term_ks, 1, _rl_output_character_function);
else if (!on && _rl_term_ke)
tputs (_rl_term_ke, 1, _rl_output_character_function);
}
|
long long _rl_control_keypad(unsigned long a0) {
unsigned long long v1;
if (a0) {
v1 = _rl_term_ks;
if (_rl_term_ks) {
v1 = tputs(_rl_term_ks, 0x1, _rl_output_character_function);
return v1;
}
}
if (!a0) {
v1 = _rl_term_ke;
if (_rl_term_ke)
v1 = tputs(_rl_term_ke, 0x1, _rl_output_character_function);
}
return v1;
}
|
u_int32_t
get_u32_le(const void *vp)
{
const u_char *p = (const u_char *)vp;
u_int32_t v;
v = (u_int32_t)p[0];
v |= (u_int32_t)p[1] << 8;
v |= (u_int32_t)p[2] << 16;
v |= (u_int32_t)p[3] << 24;
return (v);
}
|
long long get_u32_le(char a0[4]) {
unsigned int v0;
v0 = a0[0];
v0 |= (a0[1] * 0x100);
v0 |= (a0[2] * 0x10000);
v0 |= (a0[3] * 0x1000000);
return v0;
}
|
static char *
history_find_word (char *line, int ind)
{
char **words, *s;
int i, wind;
words = history_tokenize_internal (line, ind, &wind);
if (wind == -1 || words == 0)
{
if (words)
freewords (words, 0);
if (words) free (words);
return ((char *)
((void *)0)
);
}
s = words[wind];
for (i = 0; i < wind; i++)
xfree (words[i]);
freewords (words, wind + 1);
xfree (words);
return s;
}
|
long history_find_word(long a1, int a2)
{
int v3;
int i;
void *ptr;
long v6;
unsigned long v7;
v7 = __readfsqword(0x28u);
ptr = (void *)history_tokenize_internal(a1, a2, &v3);
if ( v3 != -1 && ptr )
{
v6 = *((_QWORD *)ptr + v3);
for ( i = 0; i < v3; ++i )
xfree(*((_QWORD *)ptr + i));
freewords((long)ptr, v3 + 1);
xfree(ptr);
return v6;
}
else
{
if ( ptr )
freewords((long)ptr, 0);
if ( ptr )
free(ptr);
return 0LL;
}
}
|
static void
setexecute(const char *path, struct stat *stab)
{
if ((stab->st_mode & 0555) == 0555)
return;
if (!chmod(path, 0755))
return;
ohshite(gettext("unable to set execute permissions on '%.250s'"), path);
}
|
void setexecute(char *a0, struct_0 *a1) {
unsigned long long v1;
unsigned long long v2;
unsigned long long v3;
unsigned long long v4;
v1 = a1->field_18 & 365;
if ((a1->field_18 & 365) != 365) {
v2 = chmod(a0, 0x1ed);
v3 = gettext("unable to set execute permissions on '%.250s'");
v4 = ohshite(v3, a0, v3);
}
return;
}
|
static void
ctime_coder (struct tar_stat_info const *st, char const *keyword,
struct xheader *xhdr, void const *data __attribute__ ((unused)))
{
code_time (st->ctime, keyword, xhdr);
}
|
unsigned long ctime_coder(long a1, char *a2, long a3)
{
return code_time(*(_QWORD *)(a1 + 264), *(_QWORD *)(a1 + 272), a2, a3);
}
|
static void
add_backref_segment (struct transform *tf, size_t ref)
{
struct replace_segm *segm = add_segment (tf);
segm->type = segm_backref;
segm->v.ref = ref;
}
|
void add_backref_segment(void* a0, unsigned long a1) {
struct_0 *v0;
struct_0 *v3;
*(&v0) = add_segment(a0);
v0->field_8 = 1;
v3 = v0;
v0->field_10 = a1;
return;
}
|
(*__errno_location ())
!= 0 || val < 0 || val > 24*60) {
log_it("CRON", getpid(), "ERROR", "bad value of RANDOM_DELAY", 0);
} else {
|
int * __errno_location(void)
{
halt_baddata();
}
|
int
ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
{
char *myproposal[PROPOSAL_MAX] = { "sntrup761x25519-sha512@openssh.com," "curve25519-sha256," "curve25519-sha256@libssh.org," "ecdh-sha2-nistp256," "ecdh-sha2-nistp384," "ecdh-sha2-nistp521," "diffie-hellman-group-exchange-sha256," "diffie-hellman-group16-sha512," "diffie-hellman-group18-sha512," "diffie-hellman-group14-sha256", "ssh-ed25519-cert-v01@openssh.com," "ecdsa-sha2-nistp256-cert-v01@openssh.com," "ecdsa-sha2-nistp384-cert-v01@openssh.com," "ecdsa-sha2-nistp521-cert-v01@openssh.com," "sk-ssh-ed25519-cert-v01@openssh.com," "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com," "rsa-sha2-512-cert-v01@openssh.com," "rsa-sha2-256-cert-v01@openssh.com," "ssh-ed25519," "ecdsa-sha2-nistp256," "ecdsa-sha2-nistp384," "ecdsa-sha2-nistp521," "sk-ssh-ed25519@openssh.com," "sk-ecdsa-sha2-nistp256@openssh.com," "rsa-sha2-512," "rsa-sha2-256", "chacha20-poly1305@openssh.com," "aes128-ctr,aes192-ctr,aes256-ctr," "aes128-gcm@openssh.com,aes256-gcm@openssh.com", "chacha20-poly1305@openssh.com," "aes128-ctr,aes192-ctr,aes256-ctr," "aes128-gcm@openssh.com,aes256-gcm@openssh.com", "umac-64-etm@openssh.com," "umac-128-etm@openssh.com," "hmac-sha2-256-etm@openssh.com," "hmac-sha2-512-etm@openssh.com," "hmac-sha1-etm@openssh.com," "umac-64@openssh.com," "umac-128@openssh.com," "hmac-sha2-256," "hmac-sha2-512," "hmac-sha1", "umac-64-etm@openssh.com," "umac-128-etm@openssh.com," "hmac-sha2-256-etm@openssh.com," "hmac-sha2-512-etm@openssh.com," "hmac-sha1-etm@openssh.com," "umac-64@openssh.com," "umac-128@openssh.com," "hmac-sha2-256," "hmac-sha2-512," "hmac-sha1", "none,zlib@openssh.com", "none,zlib@openssh.com", "", "" };
struct ssh *ssh;
char **proposal;
static int called;
int r;
if (!called) {
seed_rng();
called = 1;
}
if ((ssh = ssh_packet_set_connection(
((void *)0)
, -1, -1)) ==
((void *)0)
)
return -2;
if (is_server)
ssh_packet_set_server(ssh);
proposal = kex_params ? kex_params->proposal : myproposal;
if ((r = kex_ready(ssh, proposal)) != 0) {
ssh_free(ssh);
return r;
}
ssh->kex->server = is_server;
if (is_server) {
ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server;
ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server;
ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_server;
ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
ssh->kex->load_host_public_key=&_ssh_host_public_key;
ssh->kex->load_host_private_key=&_ssh_host_private_key;
ssh->kex->sign=&_ssh_host_key_sign;
} else {
ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client;
ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client;
ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client;
ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client;
ssh->kex->verify_host_key =&_ssh_verify_host_key;
}
*sshp = ssh;
return 0;
}
|
long long ssh_init(unsigned long long *a0, unsigned long a1, unsigned long long a2) {
unsigned int v0;
struct_0 *v1;
unsigned long long v2;
unsigned long 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 v14;
unsigned long long v15;
v3 = "sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256";
v4 = "ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256";
v5 = "chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com";
v6 = "chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com";
v7 = "umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1";
v8 = "umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1";
v9 = "none,zlib@openssh.com";
v10 = "none,zlib@openssh.com";
v11 = &g_401bac;
v12 = &g_401bac;
if (!called.19160) {
seed_rng();
called.19160 = 1;
}
v1 = ssh_packet_set_connection(0x0, 0xffffffff, 0xffffffff);
if (!v1) {
v14 = 4294967294;
} else {
if (a1)
ssh_packet_set_server(v1);
if (a2)
v15 = a2;
else
v15 = &v3;
v2 = v15;
v0 = kex_ready(v1, v2, v2);
if (v0) {
ssh_free(v1);
v14 = v0;
} else {
v1->field_8->field_18 = a1;
if (a1) {
v1->field_8->field_c8 = got.kex_gen_server;
v1->field_8->field_d0 = got.kex_gen_server;
v1->field_8->field_d8 = got.kex_gen_server;
v1->field_8->field_e0 = got.kex_gen_server;
v1->field_8->field_e8 = got.kex_gen_server;
v1->field_8->field_f0 = got.kexgex_server;
v1->field_8->field_f8 = got.kexgex_server;
v1->field_8->field_100 = got.kex_gen_server;
v1->field_8->field_108 = got.kex_gen_server;
v1->field_8->field_110 = got.kex_gen_server;
v1->field_8->field_a8 = _ssh_host_public_key;
v1->field_8->field_b0 = _ssh_host_private_key;
v1->field_8->field_c0 = _ssh_host_key_sign;
} else {
v1->field_8->field_c8 = got.kex_gen_client;
v1->field_8->field_d0 = got.kex_gen_client;
v1->field_8->field_d8 = got.kex_gen_client;
v1->field_8->field_e0 = got.kex_gen_client;
v1->field_8->field_e8 = got.kex_gen_client;
v1->field_8->field_f0 = got.kexgex_client;
v1->field_8->field_f8 = got.kexgex_client;
v1->field_8->field_100 = got.kex_gen_client;
v1->field_8->field_108 = got.kex_gen_client;
v1->field_8->field_110 = got.kex_gen_client;
v1->field_8->field_a0 = _ssh_verify_host_key;
}
*(a0) = v1;
v14 = 0;
}
}
return v14;
}
|
static void
initialize_shell_signals ()
{
if (interactive)
initialize_terminating_signals ();
sigemptyset (&top_level_mask);
sigprocmask (
0
, (sigset_t *)
((void *)0)
, &top_level_mask);
if (sigismember (&top_level_mask,
17
))
{
sigdelset (&top_level_mask,
17
);
sigprocmask (
2
, &top_level_mask, (sigset_t *)
((void *)0)
);
}
set_signal_handler (
3
,
((__sighandler_t) 1)
);
if (interactive)
{
set_signal_handler (
2
, sigint_sighandler);
get_original_signal (
15
);
set_signal_handler (
15
,
((__sighandler_t) 1)
);
set_sigwinch_handler ();
}
}
|
__sighandler_t initialize_shell_signals()
{
__sighandler_t result;
if ( interactive )
initialize_terminating_signals();
sigemptyset(&top_level_mask);
sigprocmask(0, 0LL, &top_level_mask);
if ( sigismember(&top_level_mask, 17) )
{
sigdelset(&top_level_mask, 17);
sigprocmask(2, &top_level_mask, 0LL);
}
set_signal_handler(3, (void (*)())((char *)initialize_signals + 1));
result = (__sighandler_t)interactive;
if ( interactive )
{
set_signal_handler(2, (void (*)())sigint_sighandler);
get_original_signal(15LL);
set_signal_handler(15, (void (*)())((char *)initialize_signals + 1));
return set_sigwinch_handler();
}
return result;
}
|
void
internal_error (const char *format, ...)
{
va_list args;
error_prolog (1);
__builtin_va_start(
args
,
format
)
;
vfprintf (
stderr
, format, args);
fprintf (
stderr
, "\n");
__builtin_va_end(
args
)
;
}
|
long long internal_error() {
unsigned int v0;
unsigned int v1;
unsigned long v2;
unsigned long v3;
unsigned long v4;
char v5;
unsigned long v6;
unsigned long v7;
unsigned long v8;
unsigned long v9;
unsigned long v10;
int v11;
int v12;
int v13;
int v14;
int v15;
int v16;
int v17;
int v18;
unsigned long v19;
unsigned long v20;
unsigned long v21;
unsigned long v22;
unsigned long v23;
unsigned long v24;
char v25;
int v26;
int v27;
int v28;
int v29;
int v30;
int v31;
int v32;
int v33;
unsigned long long *v34;
char *v35;
v6 = v20;
v7 = v21;
v8 = v22;
v9 = v23;
v10 = v24;
if (v25) {
v11 = v26;
v12 = v27;
v13 = v28;
v14 = v29;
v15 = v30;
v16 = v31;
v17 = v32;
v18 = v33;
}
v4 = v34[5];
error_prolog(0x1);
v0 = 8;
v1 = 48;
v2 = &v19;
v3 = &v5;
vfprintf(stderr, v35, &v0);
fprintf(stderr, "\n");
if ((v4 ^ v34[5]))
__stack_chk_fail();
return 0;
}
|
static
_Bool
parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr)
{
struct predicate *our_pred;
(void) argv;
(void) arg_ptr;
our_pred = insert_primary_noarg (entry);
our_pred->side_effects = our_pred->no_default_print =
1
;
options.do_dir_first =
0
;
our_pred->need_stat = our_pred->need_type =
0
;
our_pred->est_success_rate = 1.0f;
return
1
;
}
|
long long parse_delete(unsigned long long a0, unsigned long a1, unsigned long a2) {
unsigned long v0;
unsigned long v1;
struct_0 *v2;
v1 = a1;
v0 = a2;
v2 = insert_primary_noarg(a0);
v2->field_19 = 1;
v2->field_18 = v2->field_19;
options = 0;
v2->field_1b = 0;
v2->field_1a = v2->field_1b;
v2->field_24 = 0x3e99999a3f800000;
return 1;
}
|
static gnutls_privkey_t _load_privkey(gnutls_datum_t * dat,
common_info_st * info)
{
int ret;
gnutls_privkey_t key;
unsigned int flags = 0;
const char *pass;
ret = gnutls_privkey_init(&key);
if (ret < 0) {
fprintf(
stderr
, "privkey_init: %s\n", gnutls_strerror(ret));
app_exit(1);
}
ret =
gnutls_privkey_import_x509_raw(key, dat, info->incert_format,
((void *)0)
, 0);
if (ret == -24) {
pass = get_password(info, &flags, 0);
ret =
gnutls_privkey_import_x509_raw(key, dat,
info->incert_format,
pass, flags);
}
if (ret == -207) {
fprintf(
stderr
,
"import error: could not find a valid PEM header; "
"check if your key is PKCS #12 encoded\n");
app_exit(1);
}
if (ret < 0) {
fprintf(
stderr
, "error loading file at --load-privkey: %s: %s\n",
info->privkey, gnutls_strerror(ret));
app_exit(1);
}
return key;
}
|
int _load_privkey(unsigned long long a0, struct_0 *a1) {
unsigned int v0;
unsigned int v1;
char v2;
unsigned long long v3;
v0 = 0;
v1 = gnutls_privkey_init(&v2);
if (v1 < 0) {
fprintf(stderr, "privkey_init: %s\n", gnutls_strerror(v1));
app_exit(0x1);
}
v1 = gnutls_privkey_import_x509_raw(*(&v2), a0, a1->field_1c, 0x0, 0x0);
if (v1 == -24) {
v3 = get_password(a1, &v0, 0x0);
v1 = gnutls_privkey_import_x509_raw(*(&v2), a0, a1->field_1c, v3, v0);
}
if (v1 == -207) {
fprintf(stderr, "import error: could not find a valid PEM header; check if your key is PKCS #12 encoded\n");
app_exit(0x1);
}
if (v1 < 0) {
fprintf(stderr, "error loading file at --load-privkey: %s: %s\n", a1->field_8, gnutls_strerror(v1));
app_exit(0x1);
}
return *(&v2);
}
|
void
usage (int status)
{
if (status !=
0
)
do { fprintf (
stderr
, gettext ("Try '%s --help' for more information.\n"), program_name); } while (0);
else
{
printf (gettext ("Usage: %s [OPTION]... FILE1 FILE2\n")
,
program_name);
fputs_unlocked (gettext ("Compare sorted files FILE1 and FILE2 line by line.\n"),
stdout
)
;
fputs_unlocked (gettext ("\nWhen FILE1 or FILE2 (not both) is -, read standard input.\n"),
stdout
)
;
fputs_unlocked (gettext ("\nWith no options, produce three-column output. Column one contains\nlines unique to FILE1, column two contains lines unique to FILE2,\nand column three contains lines common to both files.\n"),
stdout
)
;
fputs_unlocked (gettext ("\n -1 suppress column 1 (lines unique to FILE1)\n -2 suppress column 2 (lines unique to FILE2)\n -3 suppress column 3 (lines that appear in both files)\n"),
stdout
)
;
fputs_unlocked (gettext ("\n --check-order check that the input is correctly sorted, even\n if all input lines are pairable\n --nocheck-order do not check that the input is correctly sorted\n"),
stdout
)
;
fputs_unlocked (gettext (" --output-delimiter=STR separate columns with STR\n"),
stdout
)
;
fputs_unlocked (gettext (" --total output a summary\n"),
stdout
)
;
fputs_unlocked (gettext (" -z, --zero-terminated line delimiter is NUL, not newline\n"),
stdout
)
;
fputs_unlocked (gettext (" --help display this help and exit\n"),
stdout
);
fputs_unlocked (gettext (" --version output version information and exit\n"),
stdout
);
fputs_unlocked (gettext ("\nNote, comparisons honor the rules specified by 'LC_COLLATE'.\n"),
stdout
)
;
printf (gettext ("\nExamples:\n %s -12 file1 file2 Print only lines present in both file1 and file2.\n %s -3 file1 file2 Print lines in file1 not in file2, and vice versa.\n")
,
program_name, program_name);
emit_ancillary_info ("comm");
}
exit (status);
}
|
void usage(unsigned long a0) {
unsigned long v0;
unsigned long v1;
unsigned long v3;
unsigned long v4;
v1 = v3;
v0 = v4;
if (a0) {
fprintf(stderr, gettext("Try '%s --help' for more information.\n"));
} else {
printf(gettext("Usage: %s [OPTION]... FILE1 FILE2\n"));
fputs_unlocked(gettext("Compare sorted files FILE1 and FILE2 line by line.\n"), stdout);
fputs_unlocked(gettext("\nWhen FILE1 or FILE2 (not both) is -, read standard input.\n"), stdout);
fputs_unlocked(gettext("\nWith no options, produce three-column output. Column one contains\nlines unique to FILE1, column two contains lines unique to FILE2,\nand column three contains lines common to both files.\n"), stdout);
fputs_unlocked(gettext("\n -1 suppress column 1 (lines unique to FILE1)\n -2 suppress column 2 (lines unique to FILE2)\n -3 suppress column 3 (lines that appear in both files)\n"), stdout);
fputs_unlocked(gettext("\n --check-order check that the input is correctly sorted, even\n if all input lines are pairable\n --nocheck-order do not check that the input is correctly sorted\n"), stdout);
fputs_unlocked(gettext(" --output-delimiter=STR separate columns with STR\n"), stdout);
fputs_unlocked(gettext(" --total output a summary\n"), stdout);
fputs_unlocked(gettext(" -z, --zero-terminated line delimiter is NUL, not newline\n"), stdout);
fputs_unlocked(gettext(" --help display this help and exit\n"), stdout);
fputs_unlocked(gettext(" --version output version information and exit\n"), stdout);
fputs_unlocked(gettext("\nNote, comparisons honor the rules specified by 'LC_COLLATE'.\n"), stdout);
printf(gettext("\nExamples:\n %s -12 file1 file2 Print only lines present in both file1 and file2.\n %s -3 file1 file2 Print lines in file1 not in file2, and vice versa.\n"));
emit_ancillary_info("comm");
}
exit(a0);
}
|
void
pr_forward_ed_script (struct change *script)
{
print_script (script, find_change, pr_forward_ed_hunk);
}
|
long long pr_forward_ed_script(unsigned long long a0) {
return print_script(a0, got.find_change, pr_forward_ed_hunk, got.find_change);
}
|
ulg
getcrc (void)
{
return crc ^ 0xffffffffL;
}
|
ulong getcrc(void)
{
return crc ^ 0xffffffff;
}
|
HASH_TABLE *
hash_create (buckets)
int buckets;
{
HASH_TABLE *new_table;
register int i;
new_table = (HASH_TABLE *)sh_xmalloc((sizeof (HASH_TABLE)), "hashlib.c", 68);
if (buckets == 0)
buckets = 128;
new_table->bucket_array =
(BUCKET_CONTENTS **)sh_xmalloc((buckets * sizeof (BUCKET_CONTENTS *)), "hashlib.c", 73);
new_table->nbuckets = buckets;
new_table->nentries = 0;
for (i = 0; i < buckets; i++)
new_table->bucket_array[i] = (BUCKET_CONTENTS *)
((void *)0)
;
return (new_table);
}
|
int hash_create(unsigned long a0) {
unsigned int v0;
struct_0 *v1;
void* v3;
v0 = a0;
v1 = sh_xmalloc(0x10, "hashlib.c", 0x44);
if (!v0)
v0 = 128;
v1->field_0 = sh_xmalloc(v0 * 8, "hashlib.c", 0x49);
v1->field_8 = v0;
v1->field_c = 0;
for (v3 = 0; v3 < v0; v3 = v3 + 1) {
*((&v1->field_0->field_0 + 0x8 * v3)) = 0;
}
return v1;
}
|
u_int
ssh_packet_get_maxsize(struct ssh *ssh)
{
return ssh->state->max_packet_size;
}
|
long ssh_packet_get_maxsize(long a1)
{
return *(unsigned int *)(*(_QWORD *)a1 + 312LL);
}
|
static errcode_t pass1_write_inode(ext2_filsys fs, ext2_ino_t ino,
struct ext2_inode *inode)
{
e2fsck_t ctx = (e2fsck_t) fs->priv_data;
if ((ino == ctx->stashed_ino) && ctx->stashed_inode &&
(inode != ctx->stashed_inode))
*ctx->stashed_inode = *inode;
return (2133571393L);
}
|
undefined8 pass1_write_inode(long param_1,int param_2,undefined8 *param_3)
{
long lVar1;
undefined8 *puVar2;
undefined8 uVar3;
lVar1 = *(long *)(param_1 + 0xe0);
if (((param_2 == *(int *)(lVar1 + 0x218)) && (*(long *)(lVar1 + 0x220) != 0)) &&
(param_3 != *(undefined8 **)(lVar1 + 0x220))) {
puVar2 = *(undefined8 **)(lVar1 + 0x220);
uVar3 = param_3[1];
*puVar2 = *param_3;
puVar2[1] = uVar3;
uVar3 = param_3[3];
puVar2[2] = param_3[2];
puVar2[3] = uVar3;
uVar3 = param_3[5];
puVar2[4] = param_3[4];
puVar2[5] = uVar3;
uVar3 = param_3[7];
puVar2[6] = param_3[6];
puVar2[7] = uVar3;
uVar3 = param_3[9];
puVar2[8] = param_3[8];
puVar2[9] = uVar3;
uVar3 = param_3[0xb];
puVar2[10] = param_3[10];
puVar2[0xb] = uVar3;
uVar3 = param_3[0xd];
puVar2[0xc] = param_3[0xc];
puVar2[0xd] = uVar3;
uVar3 = param_3[0xf];
puVar2[0xe] = param_3[0xe];
puVar2[0xf] = uVar3;
}
return 0x7f2bb741;
}
|
static int generate_dh_primes(void)
{
int prime_bits =
gnutls_sec_param_to_pk_bits(GNUTLS_PK_DH,
GNUTLS_SEC_PARAM_MEDIUM);
if (gnutls_dh_params_init(&dh_params) < 0) {
fprintf(
stderr
, "Error in dh parameter initialization\n");
exit(1);
}
printf
("Generating Diffie-Hellman parameters [%d]. Please wait...\n",
prime_bits);
fflush(
stdout
);
if (gnutls_dh_params_generate2(dh_params, prime_bits) < 0) {
fprintf(
stderr
, "Error in prime generation\n");
exit(1);
}
return 0;
}
|
undefined8 generate_dh_primes(void)
{
uint uVar1;
int iVar2;
uVar1 = gnutls_sec_param_to_pk_bits(3,0x23);
iVar2 = gnutls_dh_params_init(&dh_params);
if (iVar2 < 0) {
fprintf(stderr,"Error in dh parameter initialization\n");
exit(1);
}
printf("Generating Diffie-Hellman parameters [%d]. Please wait...\n",(ulong)uVar1);
fflush(stdout);
iVar2 = gnutls_dh_params_generate2(dh_params,uVar1);
if (iVar2 < 0) {
fprintf(stderr,"Error in prime generation\n");
exit(1);
}
return 0;
}
|
void
verifydir(char *cp)
{
struct stat stb;
if (!stat(cp, &stb)) {
if (
((((
stb.st_mode
)) & 0170000) == (0040000))
)
return;
(*__errno_location ())
=
20
;
}
run_err("%s: %s", cp, strerror(
(*__errno_location ())
));
killchild(0);
}
|
void verifydir(char *a0) {
char v0;
char v1;
char v2;
unsigned long long v4;
unsigned long long *v5;
unsigned long long v6;
v4 = stat(a0, &v0);
if (!v4) {
if ((*(&v1) & 0xf000) != 0x4000) {
*(__errno_location()) = 20;
} else {
v6 = *(&v2) ^ v5[5];
return;
}
}
if (v4 || (*(&v1) & 0xf000) != 0x4000) {
strerror(*(__errno_location()));
run_err();
killchild(0x0);
}
}
|
static int
has_any_alg(const char *proposal, const char *algs)
{
char *cp;
if ((cp = match_list(proposal, algs,
((void *)0)
)) ==
((void *)0)
)
return 0;
free(cp);
return 1;
}
|
bool has_any_alg(undefined8 param_1,undefined8 param_2)
{
void *__ptr;
__ptr = (void *)match_list(param_1,param_2,0);
if (__ptr != (void *)0x0) {
free(__ptr);
}
return __ptr != (void *)0x0;
}
|
int
localcmd(int argc, char **argv)
{
char *name;
if (!localvar_stack)
sh_error("not in a function");
argv = argptr;
while ((name = *argv++) !=
((void *)0)
) {
mklocal(name, 0);
}
return 0;
}
|
long long localcmd(unsigned long a0, unsigned long long a1, unsigned long long a2) {
unsigned long long *v0;
int tmp_11;
unsigned int v1;
void* v2;
v1 = a0;
v0 = a1;
if (false)
sh_error("not in a function", a1, a2);
v0 = argptr;
while (true) {
tmp_11 = v0;
v0 += 1;
v2 = *(tmp_11);
if (!v2)
break;
mklocal(v2, 0x0);
}
return 0;
}
|
static int
process_dir (char *dir, struct savewd *wd, void *options)
{
struct cp_options const *x = options;
int ret = (make_dir_parents (dir, wd, make_ancestor, options,
dir_mode, announce_mkdir,
dir_mode_bits, owner_id, group_id,
0
)
?
0
:
1
);
if (ret ==
0
&& x->set_security_context)
{
if (! restorecon (x->set_security_context, last_component (dir),
0
)
&& ! ignorable_ctx_err (
(*__errno_location ())
))
error (0,
(*__errno_location ())
, gettext ("failed to restore context for %s"),
quotearg_style (shell_escape_always_quoting_style, dir));
}
return ret;
}
|
long long process_dir(unsigned long long a0, unsigned long long a1, struct_0 *a2) {
void* v0;
unsigned int v1;
unsigned long long v4;
unsigned long long v5;
v0 = 0;
v1 = make_dir_parents(a0, a1, make_ancestor, a2, dir_mode, announce_mkdir, dir_mode_bits, owner_id, group_id) ^ 1;
if (!v1 && a2->field_28) {
v4 = last_component(a0);
*(&v4) = restorecon(a2->field_28, v4, 0x0, v4) ^ 1;
if (v4) {
*(&v4) = ignorable_ctx_err(*(__errno_location())) ^ 1;
if (v4) {
v5 = quotearg_style(0x4, a0);
error(0x0, *(__errno_location()), gettext("failed to restore context for %s"));
}
}
}
return v1;
}
|
static int
g_lstat(Char *fn, struct stat *sb, _ssh_compat_glob_t *pglob)
{
char buf[
4096
];
if (g_Ctoc(fn, buf, sizeof(buf)))
return(-1);
if (pglob->gl_flags & 0x0040)
return((*pglob->gl_lstat)(buf, sb));
return(lstat(buf, sb));
}
|
int g_lstat(unsigned long long a0, void* a1, struct_0 *a2) {
char v0;
char v1;
unsigned int v3;
v1 = *(&v1);
if (g_Ctoc(a0, &v0, 0x1000)) {
v3 = -1;
return v3;
} else if ((a2->field_18 & 64)) {
v3 = a2->field_50(&v0, a1, a1, a2->field_50);
return v3;
} else {
v3 = lstat(&v0, a1);
return v3;
}
}
|
int
unset_nonblock(int fd)
{
int val;
val = fcntl(fd,
3
);
if (val == -1) {
sshlog("misc.c", __func__, 135, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "fcntl(%d, F_GETFL): %s", fd, strerror(
(*__errno_location ())
));
return (-1);
}
if (!(val &
04000
)) {
sshlog("misc.c", __func__, 139, 0, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "fd %d is not O_NONBLOCK", fd);
return (0);
}
sshlog("misc.c", __func__, 142, 0, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "fd %d clearing O_NONBLOCK", fd);
val &= ~
04000
;
if (fcntl(fd,
4
, val) == -1) {
sshlog("misc.c", __func__, 145, 0, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "fcntl(%d, F_SETFL, ~O_NONBLOCK): %s", fd, strerror(
(*__errno_location ())
))
;
return (-1);
}
return (0);
}
|
undefined8 unset_nonblock(int param_1)
{
uint uVar1;
int iVar2;
int *piVar3;
char *pcVar4;
undefined8 uVar5;
uVar1 = fcntl(param_1,3);
if (uVar1 == 0xffffffff) {
piVar3 = __errno_location();
uVar5 = 0x1002a0;
pcVar4 = strerror(*piVar3);
sshlog("misc.c","unset_nonblock",0x87,0,2,0,"fcntl(%d, F_GETFL): %s",param_1,pcVar4,uVar5);
uVar5 = 0xffffffff;
}
else if ((uVar1 & 0x800) == 0) {
sshlog("misc.c","unset_nonblock",0x8b,0,7,0,"fd %d is not O_NONBLOCK",param_1);
uVar5 = 0;
}
else {
sshlog("misc.c","unset_nonblock",0x8e,0,5,0,"fd %d clearing O_NONBLOCK",param_1);
iVar2 = fcntl(param_1,4,(ulong)(uVar1 & 0xfffff7ff));
if (iVar2 == -1) {
piVar3 = __errno_location();
uVar5 = 0x1003b0;
pcVar4 = strerror(*piVar3);
sshlog("misc.c","unset_nonblock",0x91,0,5,0,"fcntl(%d, F_SETFL, ~O_NONBLOCK): %s",param_1,
pcVar4,uVar5);
uVar5 = 0xffffffff;
}
else {
uVar5 = 0;
}
}
return uVar5;
}
|
static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv)
{
struct {
struct nlmsghdr n;
struct rtmsg r;
char buf[4096];
} req = {
.n.nlmsg_len = ((sizeof(struct rtmsg)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))),
.n.nlmsg_flags = 0x01 | flags,
.n.nlmsg_type = cmd,
.r.rtm_family = preferred_family,
.r.rtm_table = RT_TABLE_MAIN,
.r.rtm_scope = RT_SCOPE_NOWHERE,
};
char mxbuf[256];
struct rtattr *mxrta = (void *)mxbuf;
unsigned int mxlock = 0;
char *d =
((void *)0)
;
int gw_ok = 0;
int dst_ok = 0;
int nhs_ok = 0;
int scope_ok = 0;
int table_ok = 0;
int raw = 0;
int type_ok = 0;
__u32 nhid = 0;
if (cmd != RTM_DELROUTE) {
req.r.rtm_protocol = 3;
req.r.rtm_scope = RT_SCOPE_UNIVERSE;
req.r.rtm_type = RTN_UNICAST;
}
mxrta->rta_type = RTA_METRICS;
mxrta->rta_len = (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0));
while (argc > 0) {
if (strcmp(*argv, "src") == 0) {
inet_prefix addr;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
get_addr(&addr, *argv, req.r.rtm_family);
if (req.r.rtm_family ==
0
)
req.r.rtm_family = addr.family;
addattr_l(&req.n, sizeof(req),
RTA_PREFSRC, &addr.data, addr.bytelen);
} else if (strcmp(*argv, "as") == 0) {
inet_prefix addr;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "to") == 0) {
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
get_addr(&addr, *argv, req.r.rtm_family);
if (req.r.rtm_family ==
0
)
req.r.rtm_family = addr.family;
addattr_l(&req.n, sizeof(req),
RTA_NEWDST, &addr.data, addr.bytelen);
} else if (strcmp(*argv, "via") == 0) {
inet_prefix addr;
int family;
if (gw_ok) {
invarg("use nexthop syntax to specify multiple via\n",
*argv);
}
gw_ok = 1;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
family = read_family(*argv);
if (family ==
0
)
family = req.r.rtm_family;
else
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
get_addr(&addr, *argv, family);
if (req.r.rtm_family ==
0
)
req.r.rtm_family = addr.family;
if (addr.family == req.r.rtm_family)
addattr_l(&req.n, sizeof(req), RTA_GATEWAY,
&addr.data, addr.bytelen);
else
addattr_l(&req.n, sizeof(req), RTA_VIA,
&addr.family, addr.bytelen+2);
} else if (strcmp(*argv, "from") == 0) {
inet_prefix addr;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
get_prefix(&addr, *argv, req.r.rtm_family);
if (req.r.rtm_family ==
0
)
req.r.rtm_family = addr.family;
if (addr.bytelen)
addattr_l(&req.n, sizeof(req), RTA_SRC, &addr.data, addr.bytelen);
req.r.rtm_src_len = addr.bitlen;
} else if (strcmp(*argv, "tos") == 0 ||
matches(*argv, "dsfield") == 0) {
__u32 tos;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (rtnl_dsfield_a2n(&tos, *argv))
invarg("\"tos\" value is invalid\n", *argv);
req.r.rtm_tos = tos;
} else if (strcmp(*argv, "expires") == 0) {
__u32 expires;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (get_u32(&expires, *argv, 0))
invarg("\"expires\" value is invalid\n", *argv);
addattr32(&req.n, sizeof(req), RTA_EXPIRES, expires);
} else if (matches(*argv, "metric") == 0 ||
matches(*argv, "priority") == 0 ||
strcmp(*argv, "preference") == 0) {
__u32 metric;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (get_u32(&metric, *argv, 0))
invarg("\"metric\" value is invalid\n", *argv);
addattr32(&req.n, sizeof(req), RTA_PRIORITY, metric);
} else if (strcmp(*argv, "scope") == 0) {
__u32 scope = 0;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (rtnl_rtscope_a2n(&scope, *argv))
invarg("invalid \"scope\" value\n", *argv);
req.r.rtm_scope = scope;
scope_ok = 1;
} else if (strcmp(*argv, "mtu") == 0) {
unsigned int mtu;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_MTU);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&mtu, *argv, 0))
invarg("\"mtu\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_MTU, mtu);
} else if (strcmp(*argv, "hoplimit") == 0) {
unsigned int hoplimit;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_HOPLIMIT);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&hoplimit, *argv, 0) || hoplimit > 255)
invarg("\"hoplimit\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_HOPLIMIT, hoplimit);
} else if (strcmp(*argv, "advmss") == 0) {
unsigned int mss;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_ADVMSS);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&mss, *argv, 0))
invarg("\"mss\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_ADVMSS, mss);
} else if (matches(*argv, "reordering") == 0) {
unsigned int reord;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_REORDERING);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&reord, *argv, 0))
invarg("\"reordering\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_REORDERING, reord);
} else if (strcmp(*argv, "rtt") == 0) {
unsigned int rtt;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_RTT);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_time_rtt(&rtt, *argv, &raw))
invarg("\"rtt\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_RTT,
(raw) ? rtt : rtt * 8);
} else if (strcmp(*argv, "rto_min") == 0) {
unsigned int rto_min;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
mxlock |= (1<<RTAX_RTO_MIN);
if (get_time_rtt(&rto_min, *argv, &raw))
invarg("\"rto_min\" value is invalid\n",
*argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_RTO_MIN,
rto_min);
} else if (matches(*argv, "window") == 0) {
unsigned int win;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_WINDOW);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&win, *argv, 0))
invarg("\"window\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_WINDOW, win);
} else if (matches(*argv, "cwnd") == 0) {
unsigned int win;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_CWND);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&win, *argv, 0))
invarg("\"cwnd\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_CWND, win);
} else if (matches(*argv, "initcwnd") == 0) {
unsigned int win;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_INITCWND);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&win, *argv, 0))
invarg("\"initcwnd\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf),
RTAX_INITCWND, win);
} else if (matches(*argv, "initrwnd") == 0) {
unsigned int win;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_INITRWND);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&win, *argv, 0))
invarg("\"initrwnd\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf),
RTAX_INITRWND, win);
} else if (matches(*argv, "features") == 0) {
unsigned int features = 0;
while (argc > 0) {
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "ecn") == 0)
features |= (1 << 0);
else
invarg("\"features\" value not valid\n", *argv);
break;
}
rta_addattr32(mxrta, sizeof(mxbuf),
RTAX_FEATURES, features);
} else if (matches(*argv, "quickack") == 0) {
unsigned int quickack;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (get_unsigned(&quickack, *argv, 0))
invarg("\"quickack\" value is invalid\n", *argv);
if (quickack != 1 && quickack != 0)
invarg("\"quickack\" value should be 0 or 1\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf),
RTAX_QUICKACK, quickack);
} else if (matches(*argv, "congctl") == 0) {
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= 1 << RTAX_CC_ALGO;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
rta_addattr_l(mxrta, sizeof(mxbuf), RTAX_CC_ALGO, *argv,
strlen(*argv));
} else if (matches(*argv, "rttvar") == 0) {
unsigned int win;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_RTTVAR);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_time_rtt(&win, *argv, &raw))
invarg("\"rttvar\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_RTTVAR,
(raw) ? win : win * 4);
} else if (matches(*argv, "ssthresh") == 0) {
unsigned int win;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "lock") == 0) {
mxlock |= (1<<RTAX_SSTHRESH);
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if (get_unsigned(&win, *argv, 0))
invarg("\"ssthresh\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_SSTHRESH, win);
} else if (matches(*argv, "realms") == 0) {
__u32 realm;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (get_rt_realms_or_raw(&realm, *argv))
invarg("\"realm\" value is invalid\n", *argv);
addattr32(&req.n, sizeof(req), RTA_FLOW, realm);
} else if (strcmp(*argv, "onlink") == 0) {
req.r.rtm_flags |= 4;
} else if (strcmp(*argv, "nexthop") == 0) {
nhs_ok = 1;
break;
} else if (!strcmp(*argv, "nhid")) {
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (get_u32(&nhid, *argv, 0))
invarg("\"id\" value is invalid\n", *argv);
addattr32(&req.n, sizeof(req), RTA_NH_ID, nhid);
} else if (matches(*argv, "protocol") == 0) {
__u32 prot;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (rtnl_rtprot_a2n(&prot, *argv))
invarg("\"protocol\" value is invalid\n", *argv);
req.r.rtm_protocol = prot;
} else if (matches(*argv, "table") == 0) {
__u32 tid;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (rtnl_rttable_a2n(&tid, *argv))
invarg("\"table\" value is invalid\n", *argv);
if (tid < 256)
req.r.rtm_table = tid;
else {
req.r.rtm_table = RT_TABLE_UNSPEC;
addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
}
table_ok = 1;
} else if (matches(*argv, "vrf") == 0) {
__u32 tid;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
tid = ipvrf_get_table(*argv);
if (tid == 0)
invarg("Invalid VRF\n", *argv);
if (tid < 256)
req.r.rtm_table = tid;
else {
req.r.rtm_table = RT_TABLE_UNSPEC;
addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
}
table_ok = 1;
} else if (strcmp(*argv, "dev") == 0 ||
strcmp(*argv, "oif") == 0) {
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
d = *argv;
} else if (matches(*argv, "pref") == 0) {
__u8 pref;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (strcmp(*argv, "low") == 0)
pref = 0x3;
else if (strcmp(*argv, "medium") == 0)
pref = 0x0;
else if (strcmp(*argv, "high") == 0)
pref = 0x1;
else if (get_u8(&pref, *argv, 0))
invarg("\"pref\" value is invalid\n", *argv);
addattr8(&req.n, sizeof(req), RTA_PREF, pref);
} else if (strcmp(*argv, "encap") == 0) {
char buf[1024];
struct rtattr *rta = (void *)buf;
rta->rta_type = RTA_ENCAP;
rta->rta_len = (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0));
lwt_parse_encap(rta, sizeof(buf), &argc, &argv,
RTA_ENCAP, RTA_ENCAP_TYPE);
if (rta->rta_len > (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))
addraw_l(&req.n, 1024
, ((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((rta)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
} else if (strcmp(*argv, "ttl-propagate") == 0) {
__u8 ttl_prop;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (matches(*argv, "enabled") == 0)
ttl_prop = 1;
else if (matches(*argv, "disabled") == 0)
ttl_prop = 0;
else
invarg("\"ttl-propagate\" value is invalid\n",
*argv);
addattr8(&req.n, sizeof(req), RTA_TTL_PROPAGATE,
ttl_prop);
} else if (matches(*argv, "fastopen_no_cookie") == 0) {
unsigned int fastopen_no_cookie;
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
if (get_unsigned(&fastopen_no_cookie, *argv, 0))
invarg("\"fastopen_no_cookie\" value is invalid\n", *argv);
if (fastopen_no_cookie != 1 && fastopen_no_cookie != 0)
invarg("\"fastopen_no_cookie\" value should be 0 or 1\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_FASTOPEN_NO_COOKIE, fastopen_no_cookie);
} else {
int type;
inet_prefix dst;
if (strcmp(*argv, "to") == 0) {
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
}
if ((**argv < '0' || **argv > '9') &&
rtnl_rtntype_a2n(&type, *argv) == 0) {
do { argv++; if (--argc <= 0) incomplete_command(); } while(0);
req.r.rtm_type = type;
type_ok = 1;
}
if (matches(*argv, "help") == 0)
usage();
if (dst_ok)
duparg2("to", *argv);
get_prefix(&dst, *argv, req.r.rtm_family);
if (req.r.rtm_family ==
0
)
req.r.rtm_family = dst.family;
req.r.rtm_dst_len = dst.bitlen;
dst_ok = 1;
if (dst.bytelen)
addattr_l(&req.n, sizeof(req),
RTA_DST, &dst.data, dst.bytelen);
}
argc--; argv++;
}
if (!dst_ok)
usage();
if (d) {
int idx = ll_name_to_index(d);
if (!idx)
return nodev(d);
addattr32(&req.n, sizeof(req), RTA_OIF, idx);
}
if (mxrta->rta_len > (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))) {
if (mxlock)
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_LOCK, mxlock);
addattr_l(&req.n, sizeof(req), RTA_METRICS, ((void*)(((char*)(mxrta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((mxrta)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
}
if (nhs_ok && parse_nexthops(&req.n, &req.r, argc, argv))
return -1;
if (req.r.rtm_family ==
0
)
req.r.rtm_family =
2
;
if (!table_ok) {
if (req.r.rtm_type == RTN_LOCAL ||
req.r.rtm_type == RTN_BROADCAST ||
req.r.rtm_type == RTN_NAT ||
req.r.rtm_type == RTN_ANYCAST)
req.r.rtm_table = RT_TABLE_LOCAL;
}
if (!scope_ok) {
if (req.r.rtm_family ==
10
||
req.r.rtm_family ==
28
)
req.r.rtm_scope = RT_SCOPE_UNIVERSE;
else if (req.r.rtm_type == RTN_LOCAL ||
req.r.rtm_type == RTN_NAT)
req.r.rtm_scope = RT_SCOPE_HOST;
else if (req.r.rtm_type == RTN_BROADCAST ||
req.r.rtm_type == RTN_MULTICAST ||
req.r.rtm_type == RTN_ANYCAST)
req.r.rtm_scope = RT_SCOPE_LINK;
else if (req.r.rtm_type == RTN_UNICAST ||
req.r.rtm_type == RTN_UNSPEC) {
if (cmd == RTM_DELROUTE)
req.r.rtm_scope = RT_SCOPE_NOWHERE;
else if (!gw_ok && !nhs_ok && !nhid)
req.r.rtm_scope = RT_SCOPE_LINK;
}
}
if (!type_ok && req.r.rtm_family ==
28
)
req.r.rtm_type = RTN_UNICAST;
if (rtnl_talk(&rth, &req.n,
((void *)0)
) < 0)
return -2;
return 0;
}
|
undefined8 iproute_modify(int param_1,undefined4 param_2,int param_3,char **param_4)
{
char cVar1;
int iVar2;
undefined8 uVar3;
long lVar4;
undefined8 *puVar5;
long in_FS_OFFSET;
char **local_16c0;
int local_16b4;
undefined4 local_16b0;
int local_16ac;
undefined local_1699;
int local_1698;
int local_1694;
undefined4 local_1690;
uint local_168c;
int local_1688;
int local_1684;
int local_1680;
int local_167c;
int local_1678;
int local_1674;
uint local_1670;
uint local_166c;
uint local_1668;
int local_1664;
char *local_1660;
ushort *local_1658;
ushort *local_1650;
undefined local_1648 [2];
ushort local_1646;
undefined2 local_1644;
ushort local_1642;
undefined local_1640 [264];
undefined8 local_1538;
byte local_1528;
undefined local_1527;
undefined local_1526;
undefined local_1525;
undefined local_1524;
undefined local_1523;
undefined local_1522;
char local_1521;
uint local_1520;
ushort local_518;
undefined2 uStack1302;
ushort local_418;
undefined2 uStack1046;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
puVar5 = &local_1538;
for (lVar4 = 0x203; lVar4 != 0; lVar4 = lVar4 + -1) {
*puVar5 = 0;
puVar5 = puVar5 + 1;
}
*(undefined4 *)puVar5 = 0;
local_1538._0_4_ = 0x1c;
local_1538._4_2_ = (undefined2)param_1;
local_1538._6_2_ = (ushort)param_2 | 1;
local_1528 = (byte)preferred_family;
local_1524 = 0xfe;
local_1522 = 0xff;
local_1658 = &local_518;
local_168c = 0;
local_1660 = (char *)0x0;
local_1688 = 0;
local_1684 = 0;
local_1680 = 0;
local_167c = 0;
local_1678 = 0;
local_1698 = 0;
local_1674 = 0;
local_1694 = 0;
if (param_1 != 0x19) {
local_1523 = 3;
local_1522 = 0;
local_1521 = '\x01';
}
uStack1302 = 8;
local_518 = 4;
local_16c0 = param_4;
local_16b0 = param_2;
local_16ac = param_1;
for (local_16b4 = param_3; 0 < local_16b4; local_16b4 = local_16b4 + -1) {
iVar2 = strcmp(*local_16c0,"src");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
get_addr(local_1648,*local_16c0,local_1528);
if (local_1528 == 0) {
local_1528 = (byte)local_1642;
}
addattr_l(&local_1538,0x101c,7,local_1640,local_1646);
}
else {
iVar2 = strcmp(*local_16c0,"as");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"to");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
get_addr(local_1648,*local_16c0,local_1528);
if (local_1528 == 0) {
local_1528 = (byte)local_1642;
}
addattr_l(&local_1538,0x101c,0x13,local_1640,local_1646);
}
else {
iVar2 = strcmp(*local_16c0,"via");
if (iVar2 == 0) {
if (local_1688 != 0) {
invarg("use nexthop syntax to specify multiple via\n",*local_16c0);
}
local_1688 = 1;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
local_1670 = read_family(*local_16c0);
if (local_1670 == 0) {
local_1670 = (uint)local_1528;
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
get_addr(local_1648,*local_16c0,local_1670);
if (local_1528 == 0) {
local_1528 = (byte)local_1642;
}
if (local_1642 == local_1528) {
addattr_l(&local_1538,0x101c,5,local_1640,local_1646);
}
else {
addattr_l(&local_1538,0x101c,0x12,&local_1642,local_1646 + 2);
}
}
else {
iVar2 = strcmp(*local_16c0,"from");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
get_prefix(local_1648,*local_16c0,local_1528);
if (local_1528 == 0) {
local_1528 = (byte)local_1642;
}
if (local_1646 != 0) {
addattr_l(&local_1538,0x101c,2,local_1640,local_1646);
}
local_1526 = (undefined)local_1644;
}
else {
iVar2 = strcmp(*local_16c0,"tos");
if ((iVar2 == 0) || (cVar1 = matches(*local_16c0,"dsfield"), cVar1 != '\x01')) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = rtnl_dsfield_a2n(&local_1690,*local_16c0);
if (iVar2 != 0) {
invarg("\"tos\" value is invalid\n",*local_16c0);
}
local_1525 = (undefined)local_1690;
}
else {
iVar2 = strcmp(*local_16c0,"expires");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = get_u32(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"expires\" value is invalid\n",*local_16c0);
}
addattr32(&local_1538,0x101c,0x17);
}
else {
cVar1 = matches(*local_16c0,"metric");
if (((cVar1 == '\x01') && (cVar1 = matches(*local_16c0,"priority"), cVar1 == '\x01')
) && (iVar2 = strcmp(*local_16c0,"preference"), iVar2 != 0)) {
iVar2 = strcmp(*local_16c0,"scope");
if (iVar2 == 0) {
local_1690 = 0;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = rtnl_rtscope_a2n(&local_1690,*local_16c0);
if (iVar2 != 0) {
invarg("invalid \"scope\" value\n",*local_16c0);
}
local_1522 = (undefined)local_1690;
local_167c = 1;
}
else {
iVar2 = strcmp(*local_16c0,"mtu");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 4;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"mtu\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,2);
}
else {
iVar2 = strcmp(*local_16c0,"hoplimit");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x400;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if ((iVar2 != 0) || (0xff < local_1690)) {
invarg("\"hoplimit\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,10);
}
else {
iVar2 = strcmp(*local_16c0,"advmss");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x100;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"mss\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,8);
}
else {
cVar1 = matches(*local_16c0,"reordering");
if (cVar1 == '\x01') {
iVar2 = strcmp(*local_16c0,"rtt");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x10;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_time_rtt(&local_1690,*local_16c0,&local_1698);
if (iVar2 != 0) {
invarg("\"rtt\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,4);
}
else {
iVar2 = strcmp(*local_16c0,"rto_min");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
local_168c = local_168c | 0x2000;
iVar2 = get_time_rtt(&local_1690,*local_16c0,&local_1698);
if (iVar2 != 0) {
invarg("\"rto_min\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,0xd);
}
else {
cVar1 = matches(*local_16c0,"window");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,&DAT_001093df);
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"initcwnd");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"initrwnd");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"features");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"quickack");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"congctl");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"rttvar");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"ssthresh");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"realms");
if (cVar1 == '\x01') {
iVar2 = strcmp(*local_16c0,"onlink");
if (iVar2 == 0) {
local_1520 = local_1520 | 4;
}
else {
iVar2 = strcmp(*local_16c0,"nexthop");
if (iVar2 == 0) {
local_1680 = 1;
break;
}
iVar2 = strcmp(*local_16c0,"nhid");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = get_u32(&local_1694,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"id\" value is invalid\n",
*local_16c0);
}
addattr32(&local_1538,0x101c,0x1e);
}
else {
cVar1 = matches(*local_16c0,"protocol");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,"table");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,
&DAT_0010a681);
if (cVar1 == '\x01') {
iVar2 = strcmp(*local_16c0,"dev");
if ((iVar2 == 0) ||
(iVar2 = strcmp(*local_16c0,"oif"),
iVar2 == 0)) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
local_1660 = *local_16c0;
}
else {
cVar1 = matches(*local_16c0,
&DAT_00109fc8);
if (cVar1 == '\x01') {
iVar2 = strcmp(*local_16c0,"encap"
);
if (iVar2 == 0) {
local_1650 = &local_418;
uStack1046 = 0x16;
local_418 = 4;
lwt_parse_encap(local_1650,0x400
,&local_16b4,
&local_16c0,0x16
,0x15);
if (4 < *local_1650) {
addraw_l(&local_1538,0x400,
local_1650 + 2);
}
}
else {
iVar2 = strcmp(*local_16c0,
"ttl-propagate");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
cVar1 = matches(*local_16c0,
"enabled");
if (cVar1 == '\x01') {
cVar1 = matches(*local_16c0,
"disabled");
if (cVar1 == '\x01') {
invarg(
"\"ttl-propagate\" value is invalid\n",*local_16c0
);
}
else {
local_1699 = 0;
}
}
else {
local_1699 = 1;
}
addattr8(&local_1538,0x101c,0x1a);
}
else {
cVar1 = matches(*local_16c0,"fastopen_no_cookie"
);
if (cVar1 == '\x01') {
iVar2 = strcmp(*local_16c0,"to");
if (iVar2 == 0) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
if (((**local_16c0 < '0') ||
('9' < **local_16c0)) &&
(iVar2 = rtnl_rtntype_a2n(&local_1690,
*local_16c0),
iVar2 == 0)) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
local_1521 = (char)local_1690;
local_1674 = 1;
}
cVar1 = matches(*local_16c0,&DAT_0010a73d);
if (cVar1 != '\x01') {
usage();
}
if (local_1684 != 0) {
duparg2(&DAT_0010a0f2,*local_16c0);
}
get_prefix(local_1648,*local_16c0,local_1528);
if (local_1528 == 0) {
local_1528 = (byte)local_1642;
}
local_1527 = (undefined)local_1644;
local_1684 = 1;
if (local_1646 != 0) {
addattr_l(&local_1538,0x101c,1,local_1640,
local_1646);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0
);
if (iVar2 != 0) {
invarg(
"\"fastopen_no_cookie\" value is invalid\n",
*local_16c0);
}
if ((local_1690 != 1) && (local_1690 != 0)) {
invarg(
"\"fastopen_no_cookie\" value should be 0 or 1\n",
*local_16c0);
}
rta_addattr32(local_1658,0x100,0x11);
}
}
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"low");
if (iVar2 == 0) {
local_1690 = CONCAT31(local_1690._1_3_,3);
}
else {
iVar2 = strcmp(*local_16c0,"medium");
if (iVar2 == 0) {
local_1690 = local_1690 & 0xffffff00;
}
else {
iVar2 = strcmp(*local_16c0,"high");
if (iVar2 == 0) {
local_1690 = CONCAT31(local_1690._1_3_,1);
}
else {
iVar2 = get_u8(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"pref\" value is invalid\n",
*local_16c0);
}
}
}
}
addattr8(&local_1538,0x101c,0x14);
}
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
local_1668 = ipvrf_get_table(*local_16c0);
if (local_1668 == 0) {
invarg("Invalid VRF\n",*local_16c0);
}
if (local_1668 < 0x100) {
local_1524 = (undefined)local_1668;
}
else {
local_1524 = 0;
addattr32(&local_1538,0x101c,0xf);
}
local_1678 = 1;
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = rtnl_rttable_a2n(&local_1690,*local_16c0
);
if (iVar2 != 0) {
invarg("\"table\" value is invalid\n",
*local_16c0);
}
if (local_1690 < 0x100) {
local_1524 = (undefined)local_1690;
}
else {
local_1524 = 0;
addattr32(&local_1538,0x101c,0xf);
}
local_1678 = 1;
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = rtnl_rtprot_a2n(&local_1690,*local_16c0)
;
if (iVar2 != 0) {
invarg("\"protocol\" value is invalid\n",
*local_16c0);
}
local_1523 = (undefined)local_1690;
}
}
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = get_rt_realms_or_raw
(&local_1690,*local_16c0);
if (iVar2 != 0) {
invarg("\"realm\" value is invalid\n",
*local_16c0);
}
addattr32(&local_1538,0x101c,0xb);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x40;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"ssthresh\" value is invalid\n",
*local_16c0);
}
rta_addattr32(local_1658,0x100,6);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x20;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_time_rtt(&local_1690,*local_16c0,
&local_1698);
if (iVar2 != 0) {
invarg("\"rttvar\" value is invalid\n",*local_16c0
);
}
rta_addattr32(local_1658,0x100,5);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x10000;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
strlen(*local_16c0);
rta_addattr_l(local_1658,0x100,0x10);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"quickack\" value is invalid\n",*local_16c0);
}
if ((local_1690 != 1) && (local_1690 != 0)) {
invarg("\"quickack\" value should be 0 or 1\n",
*local_16c0);
}
rta_addattr32(local_1658,0x100,0xf);
}
}
else {
local_166c = 0;
if (0 < local_16b4) {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"ecn");
if (iVar2 == 0) {
local_166c = local_166c | 1;
}
else {
invarg("\"features\" value not valid\n",*local_16c0);
}
}
rta_addattr32(local_1658,0x100,0xc);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x4000;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"initrwnd\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,0xe);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x800;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"initcwnd\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,0xb);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x80;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"cwnd\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,7);
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 8;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"window\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,3);
}
}
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = strcmp(*local_16c0,"lock");
if (iVar2 == 0) {
local_168c = local_168c | 0x200;
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
}
iVar2 = get_unsigned(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"reordering\" value is invalid\n",*local_16c0);
}
rta_addattr32(local_1658,0x100,9);
}
}
}
}
}
}
else {
local_16c0 = local_16c0 + 1;
local_16b4 = local_16b4 + -1;
if (local_16b4 < 1) {
incomplete_command();
}
iVar2 = get_u32(&local_1690,*local_16c0,0);
if (iVar2 != 0) {
invarg("\"metric\" value is invalid\n",*local_16c0);
}
addattr32(&local_1538,0x101c,6);
}
}
}
}
}
}
}
local_16c0 = local_16c0 + 1;
}
if (local_1684 == 0) {
usage();
}
if (local_1660 != (char *)0x0) {
local_1664 = ll_name_to_index(local_1660);
if (local_1664 == 0) {
uVar3 = nodev(local_1660);
goto LAB_001062d9;
}
addattr32(&local_1538,0x101c,4,local_1664);
}
if (4 < *local_1658) {
if (local_168c != 0) {
rta_addattr32(local_1658,0x100,1,local_168c);
}
addattr_l(&local_1538,0x101c,8,local_1658 + 2,*local_1658 - 4);
}
if ((local_1680 == 0) ||
(iVar2 = parse_nexthops(&local_1538,&local_1528,local_16b4,local_16c0), iVar2 == 0)) {
if (local_1528 == 0) {
local_1528 = 2;
}
if ((local_1678 == 0) &&
((((local_1521 == '\x02' || (local_1521 == '\x03')) || (local_1521 == '\n')) ||
(local_1521 == '\x04')))) {
local_1524 = 0xff;
}
if (local_167c == 0) {
if ((local_1528 == 10) || (local_1528 == 0x1c)) {
local_1522 = 0;
}
else if ((local_1521 == '\x02') || (local_1521 == '\n')) {
local_1522 = 0xfe;
}
else if (((local_1521 == '\x03') || (local_1521 == '\x05')) || (local_1521 == '\x04')) {
local_1522 = 0xfd;
}
else if ((local_1521 == '\x01') || (local_1521 == '\0')) {
if (local_16ac == 0x19) {
local_1522 = 0xff;
}
else if (((local_1688 == 0) && (local_1680 == 0)) && (local_1694 == 0)) {
local_1522 = 0xfd;
}
}
}
if ((local_1674 == 0) && (local_1528 == 0x1c)) {
local_1521 = '\x01';
}
iVar2 = rtnl_talk(&rth,&local_1538,0);
if (iVar2 < 0) {
uVar3 = 0xfffffffe;
}
else {
uVar3 = 0;
}
}
else {
uVar3 = 0xffffffff;
}
LAB_001062d9:
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return uVar3;
}
|
int main (int argc, char **argv)
{
char *name;
const struct group *grp;
Prog = Basename (argv[0]);
log_set_progname(Prog);
log_set_logfd(
stderr
);
(void) setlocale (
6
, "");
(void) bindtextdomain ("shadow", "/usr/share/locale");
(void) textdomain ("shadow");
process_root_flag ("-R", argc, argv);
openlog("groupmems", (
0x01
),
(10<<3)
);
is_shadowgrp = sgr_file_present ();
process_flags (argc, argv);
if (
((void *)0)
== thisgroup) {
name = whoami ();
if (!list && (
((void *)0)
== name)) {
fprintf (
stderr
, gettext ("%s: your groupname does not match your username\n"), Prog);
fail_exit (5);
}
} else {
name = thisgroup;
if (!list && !(getuid () == 0)) {
fprintf (
stderr
, gettext ("%s: only root can use the -g/--group option\n"), Prog);
fail_exit (3);
}
}
check_perms ();
open_files ();
grp = gr_locate (name);
if (
((void *)0)
== grp) {
fprintf (
stderr
, gettext ("%s: group '%s' does not exist in %s\n"),
Prog, name, gr_dbname ());
fail_exit (9);
}
if (list) {
display_members ((const char *const *)grp->gr_mem);
} else if (
((void *)0)
!= adduser) {
add_user (adduser, grp);
} else if (
((void *)0)
!= deluser) {
remove_user (deluser, grp);
} else if (purge) {
purge_members (grp);
}
close_files ();
exit (0);
}
|
int main(unsigned long a0) {
unsigned long long v0;
struct_0 *v1;
unsigned long v2;
unsigned long v3;
unsigned long v5;
unsigned long v6;
unsigned long long *v7;
unsigned int v8;
unsigned long long v9;
unsigned long long v10;
unsigned long long v11;
unsigned long long v12;
unsigned long long v14;
v3 = v5;
v2 = v6;
Prog = Basename(*(v7));
log_set_progname(0xfffefe810ec8348);
log_set_logfd(stderr);
setlocale(0x6, &g_401b84);
bindtextdomain("shadow", "/usr/share/locale");
textdomain("shadow");
process_root_flag("-R", a0, v7);
v8 = 80;
openlog("groupmems", 0x1, 0x50);
is_shadowgrp = sgr_file_present("groupmems", 0x1, v9, v10, v11, v12);
process_flags(a0, v7);
if (!thisgroup) {
v0 = whoami();
if ((list ^ 1) && !v0) {
fprintf(stderr, gettext("%s: your groupname does not match your username\n"));
fail_exit(0x5);
}
} else {
v0 = thisgroup;
if ((list ^ 1) && getuid()) {
fprintf(stderr, gettext("%s: only root can use the -g/--group option\n"));
fail_exit(0x3);
}
}
check_perms();
open_files();
v1 = gr_locate(v0);
if (!v1) {
v14 = gr_dbname();
fprintf(stderr, gettext("%s: group '%s' does not exist in %s\n"));
fail_exit(0x9);
}
if (list) {
display_members(v1->field_18);
} else if (adduser) {
add_user(adduser, v1);
} else if (deluser) {
remove_user(deluser, v1);
} else if (purge) {
purge_members(v1);
}
close_files();
exit(0x0);
}
|
static void
realloc_line (int minsize)
{
int minimum_size;
int newsize, delta;
minimum_size = 1024;
if (minsize < minimum_size)
minsize = minimum_size;
if (minsize <= _rl_screenwidth)
minsize = _rl_screenwidth + 1;
if (line_size >= minsize)
return;
newsize = minimum_size;
while (newsize < minsize)
newsize *= 2;
(line_state_visible->line) = (char *)xrealloc ((line_state_visible->line), newsize);
(line_state_visible->lface) = (char *)xrealloc ((line_state_visible->lface), newsize);
(line_state_invisible->line) = (char *)xrealloc ((line_state_invisible->line), newsize);
(line_state_invisible->lface) = (char *)xrealloc ((line_state_invisible->lface), newsize);
delta = newsize - line_size;
memset ((line_state_visible->line) + line_size, 0, delta);
memset ((line_state_visible->lface) + line_size, '0', delta);
memset ((line_state_invisible->line) + line_size, 1, delta);
memset ((line_state_invisible->lface) + line_size, ((char)1), delta);
line_size = newsize;
}
|
long realloc_line(int a1)
{
long result;
_QWORD *v2;
_QWORD *v3;
_QWORD *v4;
_QWORD *v5;
int v6;
int i;
int v8;
v6 = a1;
if ( a1 < 1024 )
v6 = 1024;
if ( v6 <= rl_screenwidth )
v6 = rl_screenwidth + 1;
result = (unsigned int)line_size;
if ( v6 > line_size )
{
for ( i = 1024; i < v6; i *= 2 )
;
v2 = line_state_visible;
*v2 = xrealloc(*(_QWORD *)line_state_visible, i);
v3 = line_state_visible;
v3[1] = xrealloc(*((_QWORD *)line_state_visible + 1), i);
v4 = line_state_invisible;
*v4 = xrealloc(*(_QWORD *)line_state_invisible, i);
v5 = line_state_invisible;
v5[1] = xrealloc(*((_QWORD *)line_state_invisible + 1), i);
v8 = i - line_size;
memset((void *)(line_size + *(_QWORD *)line_state_visible), 0, i - line_size);
memset((void *)(line_size + *((_QWORD *)line_state_visible + 1)), 48, v8);
memset((void *)(line_size + *(_QWORD *)line_state_invisible), 1, v8);
memset((void *)(line_size + *((_QWORD *)line_state_invisible + 1)), 1, v8);
result = (unsigned int)i;
line_size = i;
}
return result;
}
|
static int
ssh_proxy_connect(struct ssh *ssh, const char *host, const char *host_arg,
u_short port, const char *proxy_command)
{
char *command_string;
int pin[2], pout[2];
pid_t pid;
char *shell;
if ((shell = getenv("SHELL")) ==
((void *)0)
|| *shell == '\0')
shell =
"/bin/sh"
;
if (pipe(pin) == -1 || pipe(pout) == -1)
sshfatal("sshconnect.c", __func__, 209, 0, SYSLOG_LEVEL_FATAL,
((void *)0)
, "Could not create pipes to communicate with the proxy: %.100s", strerror(
(*__errno_location ())
))
;
command_string = expand_proxy_command(proxy_command, options.user,
host, host_arg, port);
sshlog("sshconnect.c", __func__, 214, 0, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "Executing proxy command: %.500s", command_string);
if ((pid = fork()) == 0) {
char *argv[10];
close(pin[1]);
if (pin[0] != 0) {
if (dup2(pin[0], 0) == -1)
perror("dup2 stdin");
close(pin[0]);
}
close(pout[0]);
if (dup2(pout[1], 1) == -1)
perror("dup2 stdout");
close(pout[1]);
if (!debug_flag && options.control_path !=
((void *)0)
&&
options.control_persist && stdfd_devnull(0, 0, 1) == -1)
sshlog("sshconnect.c", __func__, 239, 1, SYSLOG_LEVEL_ERROR,
((void *)0)
, "stdfd_devnull failed");
argv[0] = shell;
argv[1] = "-c";
argv[2] = command_string;
argv[3] =
((void *)0)
;
ssh_signal(
13
,
((__sighandler_t) 0)
);
execv(argv[0], argv);
perror(argv[0]);
exit(1);
}
if (pid == -1)
sshfatal("sshconnect.c", __func__, 257, 0, SYSLOG_LEVEL_FATAL,
((void *)0)
, "fork failed: %.100s", strerror(
(*__errno_location ())
));
else
proxy_command_pid = pid;
close(pin[0]);
close(pout[1]);
free(command_string);
if (ssh_packet_set_connection(ssh, pout[0], pin[1]) ==
((void *)0)
)
return -1;
return 0;
}
|
void ssh_proxy_connect(unsigned long long a0, unsigned long long a1, unsigned long long a2, unsigned long a3, unsigned long long a4) {
unsigned long v0;
unsigned int v1;
unsigned long long v2;
void* v3;
char v4;
char v5;
char v6;
char v7;
unsigned long long v8;
unsigned long long v9;
unsigned long v10;
void* v11;
unsigned long long v12;
unsigned long v13;
char v14;
unsigned long v16;
v2 = getenv("SHELL");
if (!v2 || !*(v2))
v2 = "/bin/sh";
if (pipe(&v4) == -1 || pipe(&v6) == -1) {
v0 = strerror(*(__errno_location()));
sshfatal("sshconnect.c", "ssh_proxy_connect", 0xd1, 0x0, 0x1, 0x0, "Could not create pipes to communicate with the proxy: %.100s");
}
v3 = expand_proxy_command(a4, memcpy, a1, a2, a3);
v13 = v3;
v12 = "Executing proxy command: %.500s";
sshlog("sshconnect.c", "ssh_proxy_connect", 0xd6, 0x0, 0x5, 0x0, *(&v14));
v1 = fork();
if (!v1) {
close(*(&v5));
if (*(&v4)) {
if (dup2(*(&v4), 0x0) == -1)
perror("dup2 stdin");
close(*(&v4));
}
close(*(&v6));
if (dup2(*(&v7), 0x1) == -1)
perror("dup2 stdout");
close(*(&v7));
if (!debug_flag && *(5247840) && *(5247852) && stdfd_devnull(0x0, 0x0, 0x1) == -1) {
v12 = "stdfd_devnull failed";
sshlog("sshconnect.c", "ssh_proxy_connect", 0xef, 0x1, 0x2, 0x0, *(&v14));
}
v8 = v2;
v9 = "-c";
v10 = v3;
v11 = 0;
ssh_signal(0xd, 0x0);
execv(v8, &v8);
perror(v8);
exit(0x1);
} else {
if (v1 == -1) {
v13 = strerror(*(__errno_location()));
v12 = "fork failed: %.100s";
sshfatal("sshconnect.c", "ssh_proxy_connect", 0x101, 0x0, 0x1, 0x0, *(&v14));
}
proxy_command_pid = v1;
close(*(&v4));
close(*(&v7));
free(v3);
v16 = (!ssh_packet_set_connection(a0, *(&v6), *(&v5), *(&v6)) ? 0 : 4294967295);
return;
}
}
|
static int set_xmpp_name(int type, void *crt)
{
int ret = 0, i;
if (batch) {
if (!cfg.xmpp_name)
return 0;
for (i = 0; cfg.xmpp_name[i] !=
((void *)0)
; i ++) {
if (type == 1)
ret =
gnutls_x509_crt_set_subject_alt_name
(crt, GNUTLS_SAN_OTHERNAME_XMPP,
cfg.xmpp_name[i], strlen(cfg.xmpp_name[i]),
1);
else
ret =
gnutls_x509_crq_set_subject_alt_name
(crt, GNUTLS_SAN_OTHERNAME_XMPP,
cfg.xmpp_name[i], strlen(cfg.xmpp_name[i]),
1);
if (ret < 0)
break;
}
}
if (ret < 0) {
fprintf(
stderr
, "set_subject_alt_name(XMPP): %s\n",
gnutls_strerror(ret));
exit(1);
}
return ret;
}
|
long set_xmpp_name(int a1, long a2)
{
unsigned int v3;
const char *v4;
int v5;
int i;
v5 = 0;
if ( batch )
{
if ( !*(_QWORD *)&cfg[94] )
return 0LL;
for ( i = 0; *(_QWORD *)(8LL * i + *(_QWORD *)&cfg[94]); ++i )
{
v3 = strlen(*(const char **)(8LL * i + *(_QWORD *)&cfg[94]));
v5 = a1 == 1
? gnutls_x509_crt_set_subject_alt_name(a2, 1000LL, *(_QWORD *)(8LL * i + *(_QWORD *)&cfg[94]), v3, 1LL)
: gnutls_x509_crq_set_subject_alt_name(a2, 1000LL, *(_QWORD *)(8LL * i + *(_QWORD *)&cfg[94]), v3, 1LL);
if ( v5 < 0 )
break;
}
}
if ( v5 < 0 )
{
v4 = (const char *)gnutls_strerror((unsigned int)v5);
fprintf(stderr, "set_subject_alt_name(XMPP): %s\n", v4);
exit(1);
}
return (unsigned int)v5;
}
|
static void
map_print_all_keys(EditLine *el)
{
int prev, i;
(void) fprintf(el->el_outfile, "Standard key bindings\n");
prev = 0;
for (i = 0; i < 256; i++) {
if (el->el_map.key[prev] == el->el_map.key[i])
continue;
map_print_some_keys(el, el->el_map.key, prev, i - 1);
prev = i;
}
map_print_some_keys(el, el->el_map.key, prev, i - 1);
(void) fprintf(el->el_outfile, "Alternative key bindings\n");
prev = 0;
for (i = 0; i < 256; i++) {
if (el->el_map.alt[prev] == el->el_map.alt[i])
continue;
map_print_some_keys(el, el->el_map.alt, prev, i - 1);
prev = i;
}
map_print_some_keys(el, el->el_map.alt, prev, i - 1);
(void) fprintf(el->el_outfile, "Multi-character bindings\n");
keymacro_print(el, L"");
(void) fprintf(el->el_outfile, "Arrow key bindings\n");
terminal_print_arrow(el, L"");
}
|
void map_print_all_keys(long param_1)
{
int local_10;
int local_c;
fprintf(*(FILE **)(param_1 + 0x10),"Standard key bindings\n");
local_10 = 0;
for (local_c = 0; local_c < 0x100; local_c = local_c + 1) {
if (*(char *)((long)local_10 + *(long *)(param_1 + 0x3f8)) !=
*(char *)((long)local_c + *(long *)(param_1 + 0x3f8))) {
map_print_some_keys(param_1,*(undefined8 *)(param_1 + 0x3f8),local_10,local_c + -1);
local_10 = local_c;
}
}
map_print_some_keys(param_1,*(undefined8 *)(param_1 + 0x3f8),local_10,local_c + -1);
fprintf(*(FILE **)(param_1 + 0x10),"Alternative key bindings\n");
local_10 = 0;
for (local_c = 0; local_c < 0x100; local_c = local_c + 1) {
if (*(char *)((long)local_10 + *(long *)(param_1 + 0x3f0)) !=
*(char *)((long)local_c + *(long *)(param_1 + 0x3f0))) {
map_print_some_keys(param_1,*(undefined8 *)(param_1 + 0x3f0),local_10,local_c + -1);
local_10 = local_c;
}
}
map_print_some_keys(param_1,*(undefined8 *)(param_1 + 0x3f0),local_10,local_c + -1);
fprintf(*(FILE **)(param_1 + 0x10),"Multi-character bindings\n");
keymacro_print(param_1,&DAT_00107778);
fprintf(*(FILE **)(param_1 + 0x10),"Arrow key bindings\n");
terminal_print_arrow(param_1,&DAT_00107778);
return;
}
|
static void
splitbuf_grow (struct splitbuf *ss)
{
idx_t old_half_alloc = ss->half_alloc;
idx_t string_bytes = (intptr_t) ss->argv[ss->argc];
ss->argv = xpalloc (ss->argv, &ss->half_alloc, 1,
(((0x7fffffff)<((9223372036854775807L)))?(0x7fffffff):((9223372036854775807L)))
, 2 * sizeof *ss->argv);
memmove (ss->argv + ss->half_alloc, ss->argv + old_half_alloc, string_bytes);
}
|
void splitbuf_grow(struct_0 *a0) {
unsigned long v0;
unsigned int v1;
unsigned long long v3;
v0 = a0->field_10;
*(&v1) = *((a0->field_8 * 8 + a0->field_0));
a0->field_0 = xpalloc(a0->field_0, &a0->field_10, 0x1, 0x7fffffff, 0x10);
v3 = memmove(a0->field_0 + a0->field_10 * 8, a0->field_0 + v0 * 8, *(&v1));
return;
}
|
char **
rl_completion_matches(const char *str, rl_compentry_func_t *fun)
{
size_t len, max, i, j, min;
char **list, *match, *a, *b;
len = 1;
max = 10;
if ((list = calloc(max, sizeof(*list))) ==
((void *)0)
)
return
((void *)0)
;
while ((match = (*fun)(str, (int)(len - 1))) !=
((void *)0)
) {
list[len++] = match;
if (len == max) {
char **nl;
max += 10;
if ((nl = realloc(list, max * sizeof(*nl))) ==
((void *)0)
)
goto out;
list = nl;
}
}
if (len == 1)
goto out;
list[len] =
((void *)0)
;
if (len == 2) {
if ((list[0] = strdup(list[1])) ==
((void *)0)
)
goto out;
return list;
}
qsort(&list[1], len - 1, sizeof(*list),
(int (*)(const void *, const void *)) strcmp);
min =
(18446744073709551615UL)
;
for (i = 1, a = list[i]; i < len - 1; i++, a = b) {
b = list[i + 1];
for (j = 0; a[j] && a[j] == b[j]; j++)
continue;
if (min > j)
min = j;
}
if (min == 0 && *str) {
if ((list[0] = strdup(str)) ==
((void *)0)
)
goto out;
} else {
if ((list[0] = calloc(min + 1, sizeof(*list[0]))) ==
((void *)0)
)
goto out;
(void)memcpy(list[0], list[1], min);
list[0][min] = '\0';
}
return list;
out:
free(list);
return
((void *)0)
;
}
|
long long rl_completion_matches(char *a0, unsigned long long a1) {
unsigned long long v0;
int tmp_17;
unsigned long long v1;
unsigned long long v2;
void* v3;
unsigned long long v4;
unsigned long long v5;
void* v6;
unsigned long v7;
void* v8;
void* v9;
unsigned long long v11;
v0 = 1;
v1 = 10;
v5 = calloc(v1, 0x8);
if (!v5) {
v11 = 0;
} else {
while (true) {
v7 = (stack_base)[104](a0, v0 - 1, a1, v0 - 1);
if (v7) {
tmp_17 = v0;
v0 += 1;
*((tmp_17 * 8 + v5)) = v7;
if (v0 != v1)
continue;
if (v0 == v1) {
v1 += 10;
v9 = realloc(v5, v1 * 8);
if (v9) {
v5 = v9;
continue;
}
}
} else {
if (v0 != 1) {
*((v5 + v0 * 8)) = 0;
if (v0 != 2) {
qsort(v5 + 8, v0 - 1, 0x8, got.strcmp);
v4 = -1;
v2 = 1;
for (v6 = *((v5 + v2 * 8)); v2 < v0 - 1; v6 = v8) {
v8 = *((v5 + (v2 + 1) * 8));
for (v3 = 0; *((v3 + v6)); v3 += 1) {
if (*((v3 + v6)) != *((v3 + v8)))
break;
}
if (v4 > v3)
v4 = v3;
v2 += 1;
}
if (!v4 && *(a0))
*(v5) = strdup(a0);
if (!*(a0) || v4) {
*(v5) = calloc(v4 + 1, 0x1);
if (*(v5)) {
memcpy(*(v5), *((v5 + 8)), v4);
*((v4 + *(v5))) = 0;
}
}
if ((!v4 || *(v5)) && (*(v5) || *(a0)) && (!*(a0) || *(v5) || v4)) {
v11 = v5;
break;
}
}
if (v0 == 2 && *(v5)) {
v11 = v5;
break;
}
}
if (v0 == 2)
*(v5) = strdup(*((v5 + 8)));
}
if (!v7 && !v4 && v0 != 1 && v0 != 2 && *(a0) && !*(v5) || !v7 && v0 != 1 && v0 != 2 && (!*(a0) || v4) && !*(v5) || v0 == 2 && !v7 && v0 != 1 && !*(v5) || v0 == v1 && v7 && !v9 || !v7 && v0 == 1) {
free(v5);
v11 = 0;
break;
}
}
}
return v11;
}
|
WORD_DESC *
dequote_word (word)
WORD_DESC *word;
{
register char *s;
s = dequote_string (word->word);
if (((word->word)[0] == '\177' && (word->word)[1] == '\0'))
word->flags &= ~(1 << 18);
sh_xfree((word->word), "subst.c", 4946);
word->word = s;
return word;
}
|
long long dequote_word(struct_0 *a0) {
unsigned long long v1;
v1 = dequote_string(a0->field_0);
if (a0->field_0->field_0 == 127 && !a0->field_0->field_1)
a0->field_8 = a0->field_8 & -262145;
sh_xfree(a0->field_0, "subst.c", 0x1352);
a0->field_0 = v1;
return a0;
}
|
int
main (int argc, char **argv)
{
int end_of_leading_options = 0;
struct predicate *eval_tree;
if (argv[0])
set_program_name (argv[0]);
else
set_program_name ("find");
record_initial_cwd ();
state.already_issued_stat_error_msg =
0
;
state.exit_status =
0
;
state.execdirs_outstanding =
0
;
state.cwd_dir_fd =
-100
;
if (fd_leak_check_is_enabled ())
{
remember_non_cloexec_fds ();
}
state.shared_files = sharefile_init ("w");
if (
((void *)0)
== state.shared_files)
{
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), gettext (\"Failed to initialize shared-file hash table\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
,
(*__errno_location ())
, gettext ("Failed to initialize shared-file hash table")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
,
(*__errno_location ())
, gettext ("Failed to initialize shared-file hash table")), ((
0
) ? (void) 0 : __builtin_unreachable ()))))
;
}
set_option_defaults (&options);
setlocale (
6
, "");
bindtextdomain ("findutils", "/usr/local/share/locale");
textdomain ("findutils");
if (atexit (close_stdout))
{
((!!sizeof (struct { _Static_assert (
1
, "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), gettext (\"The atexit library function failed\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
1
,
(*__errno_location ())
, gettext ("The atexit library function failed")), ((
0
) ? (void) 0 : __builtin_unreachable ()))) : ((error (
1
,
(*__errno_location ())
, gettext ("The atexit library function failed")), ((
0
) ? (void) 0 : __builtin_unreachable ()))));
}
end_of_leading_options = process_leading_options (argc, argv);
if (options.debug_options & DebugStat)
options.xstat = debug_stat;
if (options.debug_options & DebugTime)
fprintf (
stderr
, "cur_day_start = %s", ctime (&options.cur_day_start.tv_sec));
eval_tree = build_expression_tree (argc, argv, end_of_leading_options);
if (!options.open_nofollow_available)
{
}
if (process_all_startpoints (argc-end_of_leading_options,
argv+end_of_leading_options))
{
show_success_rates (eval_tree);
cleanup ();
}
return state.exit_status;
}
|
undefined4 main(int param_1,long *param_2)
{
char cVar1;
int iVar2;
undefined8 uVar3;
int *piVar4;
char *pcVar5;
EVP_PKEY_CTX *ctx;
if (*param_2 == 0) {
set_program_name(&DAT_00101c5a);
}
else {
set_program_name(*param_2);
}
record_initial_cwd();
safely_quote_err_filename = (code)0x0;
DAT_00102034 = 0;
rpl_fts_set = (code)0x0;
_get_eval_tree = 0xffffff9c;
cVar1 = fd_leak_check_is_enabled();
if (cVar1 != '\0') {
remember_non_cloexec_fds();
}
_quotearg_n_style = sharefile_init(&DAT_00101c5f);
if (_quotearg_n_style == 0) {
uVar3 = gettext("Failed to initialize shared-file hash table");
piVar4 = __errno_location();
error(1,*piVar4,uVar3);
}
set_option_defaults(&options);
setlocale(6,"");
bindtextdomain("findutils","/usr/local/share/locale");
textdomain("findutils");
iVar2 = atexit(p_Ram00000000001015bb);
if (iVar2 != 0) {
uVar3 = gettext("The atexit library function failed");
piVar4 = __errno_location();
error(1,*piVar4,uVar3);
}
iVar2 = process_leading_options(param_1,param_2);
if ((_rpl_fts_open & 2) != 0) {
_rpl_fts_read = uRam000000000010161b;
}
if ((_rpl_fts_open & 0x80) != 0) {
pcVar5 = ctime((time_t *)nonfatal_target_file_error);
fprintf(stderr,"cur_day_start = %s",pcVar5);
}
ctx = (EVP_PKEY_CTX *)build_expression_tree(param_1,param_2,iVar2);
cVar1 = process_all_startpoints(param_1 - iVar2,param_2 + iVar2);
if (cVar1 != '\0') {
show_success_rates();
cleanup(ctx);
}
return DAT_00102034;
}
|
static const char *tnl_defname(const struct ip_tunnel_parm *p)
{
switch (p->iph.protocol) {
case
IPPROTO_IPIP
:
if (p->i_flags & ((__be16)0x0001))
return "ip_vti0";
else
return "tunl0";
case
IPPROTO_GRE
:
return "gre0";
case
IPPROTO_IPV6
:
return "sit0";
}
return
((void *)0)
;
}
|
const char * tnl_defname(long a1)
{
int v1;
v1 = *(unsigned char *)(a1 + 41);
if ( v1 == 47 )
return "gre0";
if ( *(unsigned char *)(a1 + 41) > 0x2Fu )
return 0LL;
if ( v1 != 4 )
{
if ( v1 == 41 )
return "sit0";
return 0LL;
}
if ( (*(_WORD *)(a1 + 20) & 1) != 0 )
return "ip_vti0";
else
return "tunl0";
}
|
static void
print_field (BLOCK field)
{
char *cursor;
for (cursor = field.start; cursor < field.end; cursor++)
{
unsigned char character = *cursor;
if (edited_flag[character])
{
switch (character)
{
case '"':
putchar_unlocked ('"');
putchar_unlocked ('"');
break;
case '$':
case '%':
case '&':
case '#':
case '_':
putchar_unlocked ('\\');
putchar_unlocked (character);
break;
case '{':
case '}':
printf ("$\\%c$", character);
break;
case '\\':
fputs_unlocked ("\\backslash{}",
stdout
);
break;
default:
putchar_unlocked (' ');
}
}
else
putchar_unlocked (*cursor);
}
}
|
void print_field(byte *param_1,byte *param_2)
{
byte bVar1;
byte *local_10;
local_10 = param_1;
do {
if (param_2 <= local_10) {
return;
}
bVar1 = *local_10;
if (edited_flag[(int)(uint)bVar1] == '\0') {
putchar_unlocked((int)(char)*local_10);
goto LAB_001017ba;
}
if (bVar1 == 0x7d) {
LAB_0010176c:
printf("$\\%c$",(ulong)bVar1);
}
else {
if (bVar1 < 0x7e) {
if (bVar1 == 0x7b) goto LAB_0010176c;
if (bVar1 < 0x7c) {
if (bVar1 == 0x5f) {
LAB_00101755:
putchar_unlocked(0x5c);
putchar_unlocked((uint)bVar1);
goto LAB_001017ba;
}
if (bVar1 < 0x60) {
if (bVar1 == 0x5c) {
fputs_unlocked("\\backslash{}",stdout);
goto LAB_001017ba;
}
if (bVar1 < 0x5d) {
if (bVar1 == 0x22) {
putchar_unlocked(0x22);
putchar_unlocked(0x22);
goto LAB_001017ba;
}
if ((0x21 < bVar1) && (bVar1 - 0x23 < 4)) goto LAB_00101755;
}
}
}
}
putchar_unlocked(0x20);
}
LAB_001017ba:
local_10 = local_10 + 1;
} while( true );
}
|
errcode_t e2fsck_check_rebuild_extents(e2fsck_t ctx, ext2_ino_t ino,
struct ext2_inode *inode,
struct problem_context *pctx)
{
struct extent_tree_info eti;
struct ext2_extent_info info, top_info;
struct ext2fs_extent extent;
ext2_extent_handle_t ehandle;
ext2_filsys fs = ctx->fs;
errcode_t retval;
if (!(inode->i_flags & 0x00080000) &&
!(inode->i_flags & 0x10000000) &&
(ctx->options & 0x4000)) {
return e2fsck_rebuild_extents_later(ctx, ino);
}
if (!(inode->i_flags & 0x00080000))
return 0;
memset(&eti, 0, sizeof(eti));
eti.ino = ino;
retval = ext2fs_extent_open2(fs, ino, inode, &ehandle);
if (retval)
return 0;
retval = ext2fs_extent_get_info(ehandle, &top_info);
if (retval)
goto out;
pctx->ino = ino;
pctx->blk = top_info.max_depth;
pctx->blk2 = ext2fs_max_extent_depth(ehandle);
if (pctx->blk2 < pctx->blk &&
fix_problem(ctx, 0x01007F, pctx))
eti.force_rebuild = 1;
pctx->blk = 5;
if (pctx->blk2 > pctx->blk)
fix_problem(ctx, 0x014005, pctx);
if (ctx->options & 0x8000)
goto out;
retval = ext2fs_extent_get(ehandle, 0x0001, &extent);
if (retval)
goto out;
do {
retval = ext2fs_extent_get_info(ehandle, &info);
if (retval)
break;
if (info.curr_entry == 1 &&
!(extent.e_flags & 0x0004) &&
!eti.force_rebuild) {
struct extent_tree_level *etl;
etl = eti.ext_info + info.curr_level;
etl->num_extents += info.num_entries;
etl->max_extents += info.max_entries;
if (info.curr_level &&
info.num_entries < info.max_entries)
etl->max_extents--;
}
if (extent.e_flags & 0x0001) {
retval = ext2fs_extent_get(ehandle,
0x0004,
&extent);
if (retval)
break;
}
retval = ext2fs_extent_get(ehandle, 0x0009, &extent);
} while (retval == 0);
out:
ext2fs_extent_free(ehandle);
return e2fsck_should_rebuild_extents(ctx, pctx, &eti, &top_info);
}
|
long long e2fsck_check_rebuild_extents(struct_1 *a0, unsigned long a1, struct_2 *a2, struct_0 *a3) {
char v0;
unsigned long long v1;
unsigned long v2;
unsigned int v3[2];
char v4;
char v5;
char v6;
char v7;
char v8;
char v9;
char v10;
char v11;
char v12;
unsigned int v13;
char v14;
void* v16;
v1 = a0->field_0;
if (!(a2->field_20 & 0x80000) && !(a2->field_20 & 0x10000000) && (a0->field_4c & 0x4000)) {
v16 = e2fsck_rebuild_extents_later(a0, a1);
goto LABEL_40178a;
}
if (!(a2->field_20 & 0x80000)) {
v16 = 0;
} else {
memset(&v12, 0x0, 0x30);
v12 = a1;
v2 = ext2fs_extent_open2(v1, a1, a2, &v0);
if (v2) {
v16 = 0;
} else {
v2 = ext2fs_extent_get_info(*(&v0), &v10, &v10);
if (!v2) {
a3->field_8 = a1;
a3->field_28 = *(&v11);
a3->field_30 = ext2fs_max_extent_depth(*(&v0));
if (a3->field_30 < a3->field_28 && fix_problem(a0, 0x1007f, a3, &v0))
v13 = 1;
a3->field_28 = 5;
if (a3->field_30 > a3->field_28)
fix_problem(a0, 0x14005, a3, &v0);
if (!(a0->field_4c & 0x8000)) {
v2 = ext2fs_extent_get(*(&v0), 0x1, &v4);
if (!v2) {
while (true) {
v2 = ext2fs_extent_get_info(*(&v0), &v6, &v6);
if (v2)
break;
if (*(&v6) == 1 && !(*(&v5) & 4) && !v13) {
*(&v3[0]) = &(&v14)[8 * *(&v7)];
v3[0] = *(&v8) + v3[0];
v3[1] = *(&v9) + v3[1];
if (*(&v7) && *(&v8) < *(&v9))
v3[1] = v3[1] - 1;
}
if ((*(&v5) & 1)) {
v2 = ext2fs_extent_get(*(&v0), 0x4, &v4);
if (v2)
break;
}
v2 = ext2fs_extent_get(*(&v0), 0x9, &v4);
if (v2)
break;
}
}
}
}
ext2fs_extent_free(*(&v0));
v16 = e2fsck_should_rebuild_extents(a0, a3, &v12, &v10);
}
}
LABEL_40178a:
return v16;
}
|
int
auth_shadow_pwexpired(Authctxt *ctxt)
{
struct spwd *spw =
((void *)0)
;
const char *user = ctxt->pw->pw_name;
time_t today;
int r, daysleft, disabled = 0;
if ((spw = getspnam((char *)user)) ==
((void *)0)
) {
sshlog("auth-shadow.c", __func__, 96, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "Could not get shadow information for %.100s", user);
return 0;
}
today = time(
((void *)0)
) / (24L * 60 * 60);
sshlog("auth-shadow.c", __func__, 101, 0, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "%s: today %d sp_lstchg %d sp_max %d", __func__, (int)today, (int)spw->sp_lstchg, (int)spw->sp_max)
;
daysleft = spw->sp_lstchg + spw->sp_max - today;
if (disabled) {
sshlog("auth-shadow.c", __func__, 122, 0, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "password expiration disabled");
} else if (spw->sp_lstchg == 0) {
sshlog("auth-shadow.c", __func__, 124, 0, SYSLOG_LEVEL_INFO,
((void *)0)
, "User %.100s password has expired (root forced)", user);
return 1;
} else if (spw->sp_max == -1) {
sshlog("auth-shadow.c", __func__, 127, 0, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "password expiration disabled");
} else if (daysleft < 0) {
sshlog("auth-shadow.c", __func__, 129, 0, SYSLOG_LEVEL_INFO,
((void *)0)
, "User %.100s password has expired (password aged)", user);
return 1;
} else if (daysleft <= spw->sp_warn) {
sshlog("auth-shadow.c", __func__, 132, 0, SYSLOG_LEVEL_DEBUG3,
((void *)0)
, "password will expire in %d days", daysleft);
if ((r = sshbuf_putf(loginmsg,
"Your password will expire in %d day%s.\n", daysleft,
daysleft == 1 ? "" : "s")) != 0)
sshfatal("auth-shadow.c", __func__, 136, 0, SYSLOG_LEVEL_FATAL,
((void *)0)
, "%s: buffer error: %s", __func__, ssh_err(r));
}
return 0;
}
|
long long auth_shadow_pwexpired(struct_0 *a0) {
char v0;
char v1;
unsigned int v2;
unsigned int v3;
unsigned int v4;
void* v5;
unsigned long long v6;
unsigned long long v7;
unsigned long long v10;
unsigned long long v11;
v5 = 0;
v6 = a0->field_30->field_0;
v2 = 0;
v5[0] = getspnam(v6);
if (!v5) {
sshlog("auth-shadow.c", "auth_shadow_pwexpired", 0x60, 0x0, 0x2, 0x0, "Could not get shadow information for %.100s", v6, *(&v1), a0);
v10 = 0;
} else {
v7 = (time(NULL) * 1749024623285053783 >> 64 >> 13) - (time(NULL) >> 63);
sshlog("auth-shadow.c", "auth_shadow_pwexpired", 0x65, 0x0, 0x7, 0x0, "%s: today %d sp_lstchg %d sp_max %d", "auth_shadow_pwexpired", v7, v5[2]);
v3 = v5[2] + v5[4] - v7;
if (v2) {
sshlog("auth-shadow.c", "auth_shadow_pwexpired", 0x7a, 0x0, 0x7, 0x0, "password expiration disabled", *(&v0), *(&v1), a0);
} else {
if (!v5[2]) {
sshlog("auth-shadow.c", "auth_shadow_pwexpired", 0x7c, 0x0, 0x3, 0x0, "User %.100s password has expired (root forced)", v6, *(&v1), a0);
v10 = 1;
goto LABEL_400599;
}
if (v5[4] == -1) {
sshlog("auth-shadow.c", "auth_shadow_pwexpired", 0x7f, 0x0, 0x7, 0x0, "password expiration disabled", *(&v0), *(&v1), a0);
} else if (v3 < 0) {
sshlog("auth-shadow.c", "auth_shadow_pwexpired", 0x81, 0x0, 0x3, 0x0, "User %.100s password has expired (password aged)", v6, *(&v1), a0);
v10 = 1;
goto LABEL_400599;
} else if (v3 <= v5[5]) {
sshlog("auth-shadow.c", "auth_shadow_pwexpired", 0x84, 0x0, 0x7, 0x0, "password will expire in %d days", v3, *(&v1), a0);
if (v3 == 1)
v11 = &g_40062f;
else
v11 = "s";
v4 = sshbuf_putf(loginmsg, "Your password will expire in %d day%s.\n", v3, v11);
if (v4) {
ssh_err(v4);
sshfatal("auth-shadow.c", "auth_shadow_pwexpired", 0x88, 0x0, 0x1, 0x0, "%s: buffer error: %s", "auth_shadow_pwexpired");
}
}
}
v10 = 0;
}
LABEL_400599:
return v10;
}
|
void
report_difference (struct tar_stat_info *st, const char *fmt, ...)
{
if (fmt)
{
va_list ap;
fprintf (stdlis, "%s: ", quote_n_colon (QUOTE_NAME, st->file_name));
__builtin_va_start(
ap
,
fmt
)
;
vfprintf (stdlis, fmt, ap);
__builtin_va_end(
ap
)
;
fprintf (stdlis, "\n");
}
set_exit_status (1);
}
|
void report_difference() {
unsigned int v0;
unsigned int v1;
unsigned long v2;
unsigned long v3;
unsigned long long v4;
char v5;
unsigned long v6;
unsigned long v7;
unsigned long v8;
unsigned long v9;
int v10;
int v11;
int v12;
int v13;
int v14;
int v15;
int v16;
int v17;
unsigned long v18;
unsigned long v19;
unsigned long v20;
unsigned long v21;
unsigned long v22;
char v23;
int v24;
int v25;
int v26;
int v27;
int v28;
int v29;
int v30;
int v31;
unsigned long long *v32;
char *v33;
struct_0 *v34;
unsigned long long v35;
v6 = v19;
v7 = v20;
v8 = v21;
v9 = v22;
if (v23) {
v10 = v24;
v11 = v25;
v12 = v26;
v13 = v27;
v14 = v28;
v15 = v29;
v16 = v30;
v17 = v31;
}
v4 = v32[5];
if (v33) {
fprintf(stdlis, "%s: ", quote_n_colon(0x1, v34->field_8));
v0 = 16;
v1 = 48;
v2 = &v18;
v3 = &v5;
vfprintf(stdlis, v33, &v0);
fprintf(stdlis, "\n");
}
set_exit_status(0x1);
v35 = v4 ^ v32[5];
if (!(v4 ^ v32[5]))
return;
__stack_chk_fail();
}
|
int
commandcmd(argc, argv)
int argc;
char **argv;
{
char *cmd;
int c;
enum {
VERIFY_BRIEF = 1,
VERIFY_VERBOSE = 2,
} verify = 0;
const char *path =
((void *)0)
;
while ((c = nextopt("pvV")) != '\0')
if (c == 'V')
verify |= VERIFY_VERBOSE;
else if (c == 'v')
verify |= VERIFY_BRIEF;
else
path = (defpathvar + 36);
cmd = *argptr;
if (verify && cmd)
return describe_command(out1, cmd, path, verify - VERIFY_BRIEF);
return 0;
}
|
long long commandcmd(unsigned long a0, unsigned long a1) {
unsigned long v0;
unsigned int v1;
unsigned int v2;
unsigned int v3;
unsigned long long v4;
char *v5;
void* v7;
v1 = a0;
v0 = a1;
v2 = 0;
v4 = 0;
while (true) {
v3 = nextopt("pvV");
if (!v3)
break;
if (v3 == 86) {
v2 |= 2;
} else if (v3 != 118) {
v4 = 5243292;
} else {
v2 |= 1;
}
}
v5 = *(argptr);
if (v2 && v5) {
v7 = describe_command(out1, v5, v4, v2 - 1);
goto LABEL_4016e3;
}
v7 = 0;
LABEL_4016e3:
return v7;
}
|
struct connection_info *
get_connection_info(struct ssh *ssh, int populate, int use_dns)
{
static struct connection_info ci;
if (ssh ==
((void *)0)
|| !populate)
return &ci;
ci.host = auth_get_canonical_hostname(ssh, use_dns);
ci.address = ssh_remote_ipaddr(ssh);
ci.laddress = ssh_local_ipaddr(ssh);
ci.lport = ssh_local_port(ssh);
ci.rdomain = ssh_packet_rdomain_in(ssh);
return &ci;
}
|
long long get_connection_info(unsigned long long a0, unsigned long a1, unsigned long a2) {
if (!a0) {
return &ci.20626;
} else if (!a1) {
return &ci.20626;
} else {
g_40b188 = auth_get_canonical_hostname(a0, a2, a2);
g_40b190 = ssh_remote_ipaddr(a0);
g_40b198 = ssh_local_ipaddr(a0);
g_40b1a0 = ssh_local_port(a0);
g_40b1a8 = ssh_packet_rdomain_in(a0);
return &ci.20626;
}
}
|
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_400318:
v1 = 1;
} else {
if ((a0->field_18 & 0xf000) == 0xa000)
goto LABEL_400318;
v1 = 0;
}
v2 = v1 & 1;
return v2;
}
|
void
rl_redraw_prompt_last_line (void)
{
char *t;
t = strrchr (rl_display_prompt, '\n');
if (t)
redraw_prompt (++t);
else
rl_forced_update_display ();
}
|
long long rl_redraw_prompt_last_line() {
unsigned long v0;
unsigned long long v2;
v0 = strrchr(rl_display_prompt, 0xa);
if (v0) {
v0 += 1;
v2 = redraw_prompt(v0);
} else {
v2 = rl_forced_update_display();
}
return v2;
}
|
void
add_unwind_protect (cleanup, arg)
Function *cleanup;
char *arg;
{
without_interrupts (add_unwind_protect_internal, (char *)cleanup, arg);
}
|
long add_unwind_protect(long a1, long a2)
{
return without_interrupts((long ( *)(long, long))add_unwind_protect_internal, a1, a2);
}
|
static
_Bool
mkancesdirs_safe_wd (char const *from, char *to, struct cp_options *x,
_Bool
save_always)
{
_Bool
save_working_directory =
save_always
|| ! ((((from)[0]) == '/') && (((to)[0]) == '/'));
int status =
0
;
struct savewd wd;
savewd_init (&wd);
if (! save_working_directory)
savewd_finish (&wd);
if (mkancesdirs (to, &wd, make_ancestor, x) == -1)
{
error (0,
(*__errno_location ())
, gettext ("cannot create directory %s"), quotearg_style (shell_escape_always_quoting_style, to));
status =
1
;
}
if (save_working_directory)
{
int restore_result = savewd_restore (&wd, status);
int restore_errno =
(*__errno_location ())
;
savewd_finish (&wd);
if (
0
< restore_result)
return
0
;
if (restore_result < 0 && status ==
0
)
{
error (0, restore_errno, gettext ("cannot create directory %s"),
quotearg_style (shell_escape_always_quoting_style, to));
return
0
;
}
}
return status ==
0
;
}
|
bool mkancesdirs_safe_wd(_BYTE *a1, _BYTE *a2, long a3, char a4)
{
bool v4;
long v5;
char *v6;
int *v7;
long v9;
char *v10;
bool v12;
unsigned int v13;
int v14;
int errnum;
char v16[8];
unsigned long v17;
v17 = __readfsqword(0x28u);
v4 = a4 || *a1 != 47 || *a2 != 47;
v12 = v4;
v13 = 0;
savewd_init(v16);
if ( !v12 )
savewd_finish(v16);
if ( mkancesdirs(a2, v16, make_ancestor, a3) == -1 )
{
v5 = quotearg_style(4LL, a2);
v6 = gettext("cannot create directory %s");
v7 = _errno_location();
error(0, *v7, v6, v5);
v13 = 1;
}
if ( !v12 )
return v13 == 0;
v14 = savewd_restore(v16, v13);
errnum = *_errno_location();
savewd_finish(v16);
if ( v14 > 0 )
return 0;
if ( v14 >= 0 || v13 )
return v13 == 0;
v9 = quotearg_style(4LL, a2);
v10 = gettext("cannot create directory %s");
error(0, errnum, v10, v9);
return 0;
}
|
static
_Bool
oldgnu_get_sparse_info (struct tar_sparse_file *file)
{
size_t i;
union block *h = current_header;
int ext_p;
enum oldgnu_add_status rc;
file->stat_info->sparse_map_avail = 0;
for (i = 0; i < 4; i++)
{
rc = oldgnu_add_sparse (file, &h->oldgnu_header.sp[i]);
if (rc != add_ok)
break;
}
for (ext_p = h->oldgnu_header.isextended;
rc == add_ok && ext_p; ext_p = h->sparse_header.isextended)
{
h = find_next_block ();
if (!h)
{
do { if (error_hook) error_hook (); error (0, 0, gettext ("Unexpected EOF in archive")); exit_status = 2; } while (0);
return
0
;
}
set_next_block_after (h);
for (i = 0; i < 21 && rc == add_ok; i++)
rc = oldgnu_add_sparse (file, &h->sparse_header.sp[i]);
}
if (rc == add_fail)
{
do { if (error_hook) error_hook (); error (0, 0, gettext ("%s: invalid sparse archive member"), file->stat_info->orig_file_name); exit_status = 2; } while (0)
;
return
0
;
}
return
1
;
}
|
long long oldgnu_get_sparse_info(struct_0 *a0) {
unsigned int v0;
unsigned int v1;
void* v2;
struct_3 *v3;
unsigned long long v5;
v3 = current_header;
a0->field_18->field_130 = 0;
v2 = 0;
while (true) {
if (v2 > 3)
break;
v1 = oldgnu_add_sparse(a0, 386 + v3 + 0x18 * v2);
if (v1)
break;
v2 += 1;
}
v0 = v3->field_1e2;
while (true) {
if (v1) {
LABEL_401d9e:
if (v1 != 2) {
v5 = 1;
break;
} else {
if (*(&error_hook))
*(5243008)();
error(0x0, 0x0, gettext("%s: invalid sparse archive member"));
exit_status = 2;
v5 = 0;
break;
}
} else {
if (!v0)
goto LABEL_401d9e;
v3 = find_next_block();
if (!v3) {
if (*(&error_hook))
*(5243008)();
error(0x0, 0x0, gettext("Unexpected EOF in archive"));
exit_status = 2;
v5 = 0;
break;
} else {
set_next_block_after(v3);
v2 = 0;
while (true) {
if (v2 > 20)
break;
if (v1)
break;
v1 = oldgnu_add_sparse(a0, v3 + 0x18 * v2);
v2 += 1;
}
v0 = v3->field_1f8;
}
}
}
return v5;
}
|
void
usage (int status)
{
if (status !=
0
)
do { fprintf (
stderr
, gettext ("Try '%s --help' for more information.\n"), program_name); } while (0);
else
{
printf (gettext ("Usage: %s [OPTION]... [FILE]...\n")
,
program_name);
fputs_unlocked (gettext ("Write each FILE to standard output, last line first.\n"),
stdout
)
;
emit_stdin_note ();
emit_mandatory_arg_note ();
fputs_unlocked (gettext (" -b, --before attach the separator before instead of after\n -r, --regex interpret the separator as a regular expression\n -s, --separator=STRING use STRING as the separator instead of newline\n"),
stdout
)
;
fputs_unlocked (gettext (" --help display this help and exit\n"),
stdout
);
fputs_unlocked (gettext (" --version output version information and exit\n"),
stdout
);
emit_ancillary_info ("tac");
}
exit (status);
}
|
void usage(int param_1)
{
FILE *pFVar1;
undefined8 uVar2;
char *pcVar3;
uVar2 = program_name;
if (param_1 == 0) {
pcVar3 = (char *)gettext("Usage: %s [OPTION]... [FILE]...\n");
printf(pcVar3,uVar2);
pFVar1 = stdout;
pcVar3 = (char *)gettext("Write each FILE to standard output, last line first.\n");
fputs_unlocked(pcVar3,pFVar1);
emit_stdin_note();
emit_mandatory_arg_note();
pFVar1 = stdout;
pcVar3 = (char *)gettext(
" -b, --before attach the separator before instead of after\n -r, --regex interpret the separator as a regular expression\n -s, --separator=STRING use STRING as the separator instead of newline\n"
);
fputs_unlocked(pcVar3,pFVar1);
pFVar1 = stdout;
pcVar3 = (char *)gettext(" --help display this help and exit\n");
fputs_unlocked(pcVar3,pFVar1);
pFVar1 = stdout;
pcVar3 = (char *)gettext(" --version output version information and exit\n");
fputs_unlocked(pcVar3,pFVar1);
emit_ancillary_info();
}
else {
pcVar3 = (char *)gettext("Try \'%s --help\' for more information.\n");
fprintf(stderr,pcVar3,uVar2);
}
exit(param_1);
}
|
static void
client_wait_until_can_do_something(struct ssh *ssh, struct pollfd **pfdp,
u_int *npfd_allocp, u_int *npfd_activep, int rekeying,
int *conn_in_readyp, int *conn_out_readyp)
{
int timeout_secs, pollwait;
time_t minwait_secs = 0, now = monotime();
int ret;
u_int p;
*conn_in_readyp = *conn_out_readyp = 0;
channel_prepare_poll(ssh, pfdp, npfd_allocp, npfd_activep, 2,
&minwait_secs);
if (*npfd_activep < 2)
sshfatal("clientloop.c", __func__, 530, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "bad npfd %u", *npfd_activep);
if (session_closed && !channel_still_open(ssh) &&
!ssh_packet_have_data_to_write(ssh)) {
for (p = 0; p < *npfd_activep; p++)
(*pfdp)[p].revents = 0;
return;
}
(*pfdp)[0].fd = connection_in;
(*pfdp)[0].events =
0x001
;
(*pfdp)[1].fd = connection_out;
(*pfdp)[1].events = ssh_packet_have_data_to_write(ssh) ?
0x004
: 0;
timeout_secs = 0x7fffffff;
if (options.server_alive_interval > 0)
timeout_secs = (((server_alive_time - now) > (0)) ? (server_alive_time - now) : (0));
if (options.rekey_interval > 0 && !rekeying)
timeout_secs = (((timeout_secs) < (ssh_packet_get_rekey_timeout(ssh))) ? (timeout_secs) : (ssh_packet_get_rekey_timeout(ssh)))
;
set_control_persist_exit_time(ssh);
if (control_persist_exit_time > 0) {
timeout_secs = (((timeout_secs) < (control_persist_exit_time - now)) ? (timeout_secs) : (control_persist_exit_time - now))
;
if (timeout_secs < 0)
timeout_secs = 0;
}
if (minwait_secs != 0)
timeout_secs = (((timeout_secs) < ((int)minwait_secs)) ? (timeout_secs) : ((int)minwait_secs));
if (timeout_secs == 0x7fffffff)
pollwait = -1;
else if (timeout_secs >= 0x7fffffff / 1000)
pollwait = 0x7fffffff;
else
pollwait = timeout_secs * 1000;
ret = poll(*pfdp, *npfd_activep, pollwait);
if (ret == -1) {
for (p = 0; p < *npfd_activep; p++)
(*pfdp)[p].revents = 0;
if (
(*__errno_location ())
==
4
)
return;
quit_message("poll: %s", strerror(
(*__errno_location ())
));
return;
}
*conn_in_readyp = (*pfdp)[0].revents != 0;
*conn_out_readyp = (*pfdp)[1].revents != 0;
if (options.server_alive_interval > 0 && !*conn_in_readyp &&
monotime() >= server_alive_time) {
server_alive_check(ssh);
}
}
|
void client_wait_until_can_do_something
(undefined8 param_1,pollfd **param_2,undefined8 param_3,uint *param_4,int param_5,
uint *param_6,uint *param_7)
{
uint uVar1;
pollfd *__fds;
int iVar2;
long lVar3;
int *piVar4;
char *pcVar5;
short sVar6;
long lVar7;
char **ppcVar8;
long in_FS_OFFSET;
char *pcStack152;
ulong uStack144;
undefined auStack136 [8];
uint *local_80;
uint *local_78;
int local_6c;
uint *local_68;
undefined8 local_60;
pollfd **local_58;
undefined8 local_50;
int local_40;
int local_3c;
uint local_38;
int local_34;
long local_30;
undefined8 local_28;
long local_20;
ppcVar8 = (char **)auStack136;
local_80 = param_7;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_30 = 0;
uStack144 = 0x100ee0;
local_78 = param_6;
local_6c = param_5;
local_68 = param_4;
local_60 = param_3;
local_58 = param_2;
local_50 = param_1;
local_28 = monotime();
*local_80 = 0;
*local_78 = *local_80;
uStack144 = 0x100f1f;
channel_prepare_poll(local_50,local_58,local_60,local_68,2,&local_30);
if (*local_68 < 2) {
uStack144 = (ulong)*local_68;
ppcVar8 = &pcStack152;
pcStack152 = "bad npfd %u";
sshfatal("clientloop.c","client_wait_until_can_do_something",0x212,1,1,0);
}
if (session_closed != 0) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x100f7d;
iVar2 = channel_still_open(local_50);
if (iVar2 == 0) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x100f8d;
iVar2 = ssh_packet_have_data_to_write(local_50);
if (iVar2 == 0) {
for (local_38 = 0; local_38 < *local_68; local_38 = local_38 + 1) {
(*local_58)[local_38].revents = 0;
}
goto LAB_00101217;
}
}
}
(*local_58)->fd = connection_in;
(*local_58)->events = 1;
(*local_58)[1].fd = connection_out;
*(undefined8 *)((long)ppcVar8 + -8) = 0x101000;
iVar2 = ssh_packet_have_data_to_write(local_50);
if (iVar2 == 0) {
sVar6 = 0;
}
else {
sVar6 = 4;
}
(*local_58)[1].events = sVar6;
local_40 = 0x7fffffff;
if (0 < _DAT_0010d37c) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x101043;
lVar3 = __subvdi3(server_alive_time,local_28);
if (lVar3 < 0) {
lVar3 = 0;
}
local_40 = (int)lVar3;
}
if ((0 < _DAT_0010d370) && (local_6c == 0)) {
lVar7 = (long)local_40;
*(undefined8 *)((long)ppcVar8 + -8) = 0x101074;
lVar3 = ssh_packet_get_rekey_timeout(local_50);
if (lVar3 <= lVar7) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x101085;
local_40 = ssh_packet_get_rekey_timeout(local_50);
}
}
*(undefined8 *)((long)ppcVar8 + -8) = 0x101099;
set_control_persist_exit_time(local_50);
if (0 < control_persist_exit_time) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x1010b8;
lVar3 = __subvdi3(control_persist_exit_time,local_28);
if (lVar3 <= local_40) {
local_40 = (int)lVar3;
}
if (local_40 < 0) {
local_40 = 0;
}
}
iVar2 = local_40;
if ((local_30 != 0) && (iVar2 = (int)local_30, local_40 <= (int)local_30)) {
iVar2 = local_40;
}
local_40 = iVar2;
if (local_40 == 0x7fffffff) {
local_3c = -1;
}
else if (local_40 < 0x20c49b) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x10111f;
local_3c = __mulvsi3(local_40,1000);
}
else {
local_3c = 0x7fffffff;
}
uVar1 = *local_68;
__fds = *local_58;
*(undefined8 *)((long)ppcVar8 + -8) = 0x10113f;
local_34 = poll(__fds,(ulong)uVar1,local_3c);
if (local_34 == -1) {
for (local_38 = 0; local_38 < *local_68; local_38 = local_38 + 1) {
(*local_58)[local_38].revents = 0;
}
*(undefined8 *)((long)ppcVar8 + -8) = 0x10117c;
piVar4 = __errno_location();
if (*piVar4 != 4) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x10118c;
piVar4 = __errno_location();
iVar2 = *piVar4;
*(undefined8 *)((long)ppcVar8 + -8) = 0x101195;
pcVar5 = strerror(iVar2);
*(undefined8 *)((long)ppcVar8 + -8) = 0x1011a9;
quit_message("poll: %s",pcVar5);
}
}
else {
*local_78 = (uint)((*local_58)->revents != 0);
*local_80 = (uint)((*local_58)[1].revents != 0);
if ((0 < _DAT_0010d37c) && (*local_78 == 0)) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x1011fc;
lVar3 = monotime();
if (server_alive_time <= lVar3) {
*(undefined8 *)((long)ppcVar8 + -8) = 0x101214;
server_alive_check(local_50);
}
}
}
LAB_00101217:
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
return;
}
*(undefined8 *)((long)ppcVar8 + -8) = 0x10122b;
__stack_chk_fail();
}
|
void test_dict_deflate(compr, comprLen)
Byte *compr;
uLong comprLen;
{
z_stream c_stream;
int err;
c_stream.zalloc = zalloc;
c_stream.zfree = zfree;
c_stream.opaque = (voidpf)0;
err = deflateInit_((&c_stream), (9), "1.2.13", (int)sizeof(z_stream));
{ if (err != 0) { fprintf(
stderr
, "%s error: %d\n", "deflateInit", err); exit(1); } };
err = deflateSetDictionary(&c_stream,
(const Bytef*)dictionary, (int)sizeof(dictionary));
{ if (err != 0) { fprintf(
stderr
, "%s error: %d\n", "deflateSetDictionary", err); exit(1); } };
dictId = c_stream.adler;
c_stream.next_out = compr;
c_stream.avail_out = (uInt)comprLen;
c_stream.next_in = ( unsigned char *)hello;
c_stream.avail_in = (uInt)strlen(hello)+1;
err = deflate(&c_stream, 4);
if (err != 1) {
fprintf(
stderr
, "deflate should report Z_STREAM_END\n");
exit(1);
}
err = deflateEnd(&c_stream);
{ if (err != 0) { fprintf(
stderr
, "%s error: %d\n", "deflateEnd", err); exit(1); } };
}
|
void test_dict_deflate(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
undefined8 param_5,undefined8 param_6)
{
uint uVar1;
int iVar2;
size_t sVar3;
long in_FS_OFFSET;
char *local_88;
int local_80;
undefined8 local_70;
undefined4 local_68;
undefined8 local_48;
undefined8 local_40;
undefined8 local_38;
undefined8 local_28;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = zalloc;
local_40 = zfree;
local_38 = 0;
uVar1 = deflateInit_(&local_88,9,"1.2.13",0x70,param_5,param_6,param_2,param_1);
local_68 = (undefined4)param_2;
if (uVar1 != 0) {
fprintf(stderr,"%s error: %d\n","deflateInit",(ulong)uVar1);
exit(1);
}
uVar1 = deflateSetDictionary(&local_88,"hello",6);
if (uVar1 != 0) {
fprintf(stderr,"%s error: %d\n","deflateSetDictionary",(ulong)uVar1);
exit(1);
}
dictId = local_28;
local_88 = hello;
local_70 = param_1;
sVar3 = strlen(hello);
local_80 = (int)sVar3 + 1;
iVar2 = deflate(&local_88,4);
if (iVar2 != 1) {
fprintf(stderr,"deflate should report Z_STREAM_END\n");
exit(1);
}
uVar1 = deflateEnd(&local_88);
if (uVar1 != 0) {
fprintf(stderr,"%s error: %d\n","deflateEnd",(ulong)uVar1);
exit(1);
}
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
__stack_chk_fail();
}
return;
}
|
idx_t
wordchar_next (char const *buf, char const *end)
{
return wordchars_count (buf, end,
0
);
}
|
void wordchar_next(undefined8 param_1,undefined8 param_2)
{
wordchars_count(param_1,param_2,0);
return;
}
|
void crypto_sign_ed25519_ref_fe25519_setone(crypto_sign_ed25519_ref_fe25519 *r)
{
int i;
r->v[0] = 1;
for(i=1;i<32;i++) r->v[i]=0;
}
|
void crypto_sign_ed25519_ref_fe25519_setone(undefined4 *param_1)
{
int local_c;
*param_1 = 1;
for (local_c = 1; local_c < 0x20; local_c = __addvsi3(local_c,1)) {
param_1[local_c] = 0;
}
return;
}
|
int
rl_reset_terminal(const char *p __attribute__((__unused__)))
{
if (h ==
((void *)0)
|| e ==
((void *)0)
)
rl_initialize();
el_reset(e);
return 0;
}
|
long long rl_reset_terminal(unsigned long a0) {
unsigned long v0;
v0 = a0;
if (!h || !e)
rl_initialize();
el_reset(e);
return 0;
}
|
void crypto_sign_ed25519_ref_sc25519_window3(signed char r[85], const crypto_sign_ed25519_ref_sc25519 *s)
{
char carry;
int i;
for(i=0;i<10;i++)
{
r[8*i+0] = s->v[3*i+0] & 7;
r[8*i+1] = (s->v[3*i+0] >> 3) & 7;
r[8*i+2] = (s->v[3*i+0] >> 6) & 7;
r[8*i+2] ^= (s->v[3*i+1] << 2) & 7;
r[8*i+3] = (s->v[3*i+1] >> 1) & 7;
r[8*i+4] = (s->v[3*i+1] >> 4) & 7;
r[8*i+5] = (s->v[3*i+1] >> 7) & 7;
r[8*i+5] ^= (s->v[3*i+2] << 1) & 7;
r[8*i+6] = (s->v[3*i+2] >> 2) & 7;
r[8*i+7] = (s->v[3*i+2] >> 5) & 7;
}
r[8*i+0] = s->v[3*i+0] & 7;
r[8*i+1] = (s->v[3*i+0] >> 3) & 7;
r[8*i+2] = (s->v[3*i+0] >> 6) & 7;
r[8*i+2] ^= (s->v[3*i+1] << 2) & 7;
r[8*i+3] = (s->v[3*i+1] >> 1) & 7;
r[8*i+4] = (s->v[3*i+1] >> 4) & 7;
carry = 0;
for(i=0;i<84;i++)
{
r[i] += carry;
r[i+1] += r[i] >> 3;
r[i] &= 7;
carry = r[i] >> 2;
r[i] -= carry<<3;
}
r[84] += carry;
}
|
long long crypto_sign_ed25519_ref_sc25519_window3(unsigned long a0, unsigned int *a1) {
char v0[85];
char v1;
unsigned int v2;
unsigned int v4;
unsigned int v5;
unsigned long long v6;
unsigned int v7;
unsigned int v8;
unsigned int v9;
unsigned int v10;
unsigned int v11;
unsigned int v12;
unsigned int v16;
unsigned int v19;
unsigned long long v21;
*(&v0[0]) = a0;
for (v2 = 0; v2 <= 9; v2 = __addvsi3(v2, 0x1, v21)) {
v4 = a1[__mulvsi3(v2, 0x3)];
*(&v4) = v4 & 7;
v0[__mulvsi3(v2, 0x8)] = *(&v4);
v5 = a1[__mulvsi3(v2, 0x3)] >> 3;
*(&v5) = v5 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x1, v6)] = *(&v5);
v7 = a1[__mulvsi3(v2, 0x3)] >> 6;
*(&v7) = v7 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x2, v6)] = *(&v7);
v8 = v0[__addvsi3(__mulvsi3(v2, 0x8), 0x2, v6)];
*(&v8) = v8 ^ (a1[__addvsi3(__mulvsi3(v2, 0x3), 0x1, v6)] * 4) & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x2, v6)] = v8;
v9 = a1[__addvsi3(__mulvsi3(v2, 0x3), 0x1, v6)] >> 1;
*(&v9) = v9 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x3, v6)] = *(&v9);
v10 = a1[__addvsi3(__mulvsi3(v2, 0x3), 0x1, v6)] >> 4;
*(&v10) = v10 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x4, v6)] = *(&v10);
v11 = a1[__addvsi3(__mulvsi3(v2, 0x3), 0x1, v6)] >> 7;
*(&v11) = v11 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x5, v6)] = *(&v11);
v12 = v0[__addvsi3(__mulvsi3(v2, 0x8), 0x5, v6)];
*(&v12) = v12 ^ a1[__addvsi3(__mulvsi3(v2, 0x3), 0x2, v6)] * 2 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x5, v6)] = v8;
v16 = a1[__addvsi3(__mulvsi3(v2, 0x3), 0x2, v6)] >> 2;
*(&v16) = v16 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x6, v6)] = *(&v16);
v19 = a1[__addvsi3(__mulvsi3(v2, 0x3), 0x2, v6)] >> 5;
v21 = v19 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x7, v6)] = v21;
}
*(&v21) = a1[__mulvsi3(v2, 0x3)];
*(&v21) = v21 & 7;
v0[__mulvsi3(v2, 0x8)] = *(&v21);
*(&v21) = a1[__mulvsi3(v2, 0x3)] >> 3;
*(&v21) = v21 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x1, v6)] = *(&v21);
*(&v21) = a1[__mulvsi3(v2, 0x3)] >> 6;
*(&v21) = v21 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x2, v6)] = *(&v21);
*(&v21) = v0[__addvsi3(__mulvsi3(v2, 0x8), 0x2, v6)];
*(&v21) = v21 ^ (a1[__addvsi3(__mulvsi3(v2, 0x3), 0x1, v6)] * 4) & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x2, v6)] = v8;
*(&v21) = a1[__addvsi3(__mulvsi3(v2, 0x3), 0x1, v6)] >> 1;
*(&v21) = v21 & 7;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x3, v6)] = *(&v21);
*(&v21) = a1[__addvsi3(__mulvsi3(v2, 0x3), 0x1, v6)] >> 4;
v0[__addvsi3(__mulvsi3(v2, 0x8), 0x4, v6)] = v21 & 7;
v1 = 0;
for (v2 = 0; v2 <= 83; v2 = __addvsi3(v2, 0x1, v0[v2] - (v1 * 8))) {
v0[v2] = v0[v2] + v1;
*(&v21) = v0[__addvsi3(v2, 0x1, v0[v2] + v1)] + (v0[v2] >> 3);
v0[__addvsi3(v2, 0x1, v2)] = v8;
v0[v2] = v0[v2] & 7;
v1 = v0[v2] >> 2;
v0[v2] = v0[v2] - (v1 * 8);
}
v0[84] = v0[84] + v1;
return &v0[84];
}
|
void get_country_crt_set(gnutls_x509_crt_t crt)
{
int ret;
if (batch) {
if (!cfg.country)
return;
ret =
gnutls_x509_crt_set_dn_by_oid(crt,
"2.5.4.6",
0, cfg.country,
strlen(cfg.country));
if (ret < 0) {
fprintf(
stderr
, "set_dn: %s\n",
gnutls_strerror(ret));
exit(1);
}
} else {
read_crt_set(crt, "Country name (2 chars): ",
"2.5.4.6");
}
}
|
void get_country_crt_set(undefined8 param_1)
{
if (*piRam0000000000104e75 == 0) {
read_crt_set(param_1,"Country name (2 chars): ","2.5.4.6");
}
else if (*(long *)(lRam0000000000104e86 + 0x68) != 0) {
strlen(*(char **)(lRam0000000000104e9a + 0x68));
}
return;
}
|
int
main (int argc, char **argv)
{
int optc;
operand first = { 1, 1, 0 };
operand step = { 1, 1, 0 };
operand last;
struct layout layout = { 0, 0 };
char const *format_str =
((void *)0)
;
;
set_program_name (argv[0]);
locale_ok = !!setlocale (
6
, "");
bindtextdomain ("coreutils", "/usr/local/share/locale");
textdomain ("coreutils");
atexit (close_stdout);
equal_width =
0
;
separator = "\n";
while (optind < argc)
{
if (argv[optind][0] == '-'
&& ((optc = argv[optind][1]) == '.' || ((unsigned int) (optc) - '0' <= 9)))
{
break;
}
optc = getopt_long (argc, argv, "+f:s:w", long_options,
((void *)0)
);
if (optc == -1)
break;
switch (optc)
{
case 'f':
format_str = optarg;
break;
case 's':
separator = optarg;
break;
case 'w':
equal_width =
1
;
break;
case GETOPT_HELP_CHAR: usage (
0
); break;;
case GETOPT_VERSION_CHAR: version_etc (
stdout
, "seq", "GNU coreutils", Version, ("Ulrich Drepper"), (char *)
((void *)0)
); exit (
0
); break;;
default:
usage (
1
);
}
}
unsigned int n_args = argc - optind;
if (n_args < 1)
{
error (0, 0, gettext ("missing operand"));
usage (
1
);
}
if (3 < n_args)
{
error (0, 0, gettext ("extra operand %s"), quote (argv[optind + 3]));
usage (
1
);
}
if (format_str)
format_str = long_double_format (format_str, &layout);
if (format_str !=
((void *)0)
&& equal_width)
{
error (0, 0, gettext ("format string may not be specified" " when printing equal width strings")
);
usage (
1
);
}
_Bool
fast_step_ok =
0
;
if (n_args != 3
|| (all_digits_p (argv[optind + 1])
&& xstrtold (argv[optind + 1],
((void *)0)
, &step.value, cl_strtold)
&& 0 < step.value && step.value <= 200))
fast_step_ok =
1
;
if (all_digits_p (argv[optind])
&& (n_args == 1 || all_digits_p (argv[optind + 1]))
&& (n_args < 3 || (fast_step_ok
&& all_digits_p (argv[optind + 2])))
&& !equal_width && !format_str && strlen (separator) == 1)
{
char const *s1 = n_args == 1 ? "1" : argv[optind];
char const *s2 = argv[optind + (n_args - 1)];
seq_fast (s1, s2, step.value);
}
last = scan_arg (argv[optind++]);
if (optind < argc)
{
first = last;
last = scan_arg (argv[optind++]);
if (optind < argc)
{
step = last;
if (step.value == 0)
{
error (0, 0, gettext ("invalid Zero increment value: %s"),
quote (argv[optind - 1]));
usage (
1
);
}
last = scan_arg (argv[optind++]);
}
}
if (first.precision == 0 && step.precision == 0 && last.precision == 0
&& ((first.value) * 0 == 0) && 0 <= first.value && 0 <= last.value
&& 0 < step.value && step.value <= 200
&& !equal_width && !format_str && strlen (separator) == 1)
{
char *s1;
char *s2;
if (asprintf (&s1, "%0.Lf", first.value) < 0)
xalloc_die ();
if (! ((last.value) * 0 == 0))
s2 = xstrdup ("inf");
else if (asprintf (&s2, "%0.Lf", last.value) < 0)
xalloc_die ();
if (*s1 != '-' && *s2 != '-')
seq_fast (s1, s2, step.value);
free (s1);
free (s2);
}
if (format_str ==
((void *)0)
)
format_str = get_default_format (first, step, last);
print_numbers (format_str, layout, first.value, step.value, last.value);
return
0
;
}
|
undefined8 main(int param_1,undefined8 *param_2)
{
float10 fVar1;
char cVar2;
int iVar3;
char *pcVar4;
undefined8 uVar5;
undefined8 uVar6;
size_t sVar7;
long lVar8;
ulong uVar9;
long in_FS_OFFSET;
ushort in_FPUControlWord;
undefined8 local_108;
undefined8 local_100;
undefined8 local_f8;
ulong local_f0;
undefined8 *local_e8;
ushort local_e0;
int local_dc;
char local_c9;
int local_c8;
uint local_c4;
char *local_c0;
char *local_b8;
char *local_b0;
undefined *local_a8;
undefined8 local_a0;
undefined8 local_98;
undefined8 local_90;
undefined8 local_88;
undefined2 uStack128;
undefined8 local_78;
ulong local_70;
undefined8 local_68;
undefined2 uStack96;
undefined6 uStack94;
undefined8 local_58;
ulong local_50;
undefined8 local_48;
undefined2 uStack64;
undefined6 uStack62;
undefined8 local_38;
ulong local_30;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_88 = SUB108((float10)1,0);
uStack128 = (undefined2)((unkuint10)(float10)1 >> 0x40);
local_78 = 1;
local_70 = local_70 & 0xffffffff00000000;
local_68 = SUB108((float10)1,0);
uStack96 = (undefined2)((unkuint10)(float10)1 >> 0x40);
local_58 = 1;
local_50 = local_50 & 0xffffffff00000000;
local_98 = 0;
local_90 = 0;
local_b0 = (char *)0x0;
local_e8 = param_2;
local_dc = param_1;
set_program_name(*param_2);
pcVar4 = setlocale(6,"");
locale_ok = pcVar4 != (char *)0x0;
bindtextdomain("coreutils","/usr/local/share/locale");
textdomain("coreutils");
atexit(p_Ram000000000010163c);
equal_width = '\0';
separator = "\n";
LAB_001017e5:
while( true ) {
if (((local_dc <= optind) ||
((*(char *)local_e8[optind] == '-' &&
((local_c8 = (int)*(char *)(local_e8[optind] + 1), local_c8 == 0x2e ||
(local_c8 - 0x30U < 10)))))) ||
(local_c8 = getopt_long(local_dc,local_e8,"+f:s:w",long_options,0), local_c8 == -1)) {
local_c4 = local_dc - optind;
if (local_c4 == 0) {
uVar5 = gettext("missing operand");
error(0,0,uVar5);
usage(1);
}
if (3 < local_c4) {
uVar5 = quote(local_e8[(long)optind + 3]);
uVar6 = gettext("extra operand %s");
error(0,0,uVar6,uVar5);
usage(1);
}
if (local_b0 != (char *)0x0) {
local_b0 = (char *)long_double_format(local_b0,&local_98);
}
if ((local_b0 != (char *)0x0) && (equal_width != '\0')) {
uVar5 = gettext("format string may not be specified when printing equal width strings");
error(0,0,uVar5);
usage(1);
}
local_c9 = '\0';
if ((local_c4 != 3) ||
((((cVar2 = all_digits_p(local_e8[(long)optind + 1]), cVar2 != '\0' &&
(cVar2 = xstrtold(local_e8[(long)optind + 1],0,&local_68,uRam0000000000101984),
cVar2 != '\0')) && ((float10)0 < (float10)CONCAT28(uStack96,local_68))) &&
((float10)CONCAT28(uStack96,local_68) <= _DAT_00102940)))) {
local_c9 = '\x01';
}
cVar2 = all_digits_p(local_e8[optind]);
if ((((cVar2 != '\0') &&
((local_c4 == 1 || (cVar2 = all_digits_p(local_e8[(long)optind + 1]), cVar2 != '\0'))))
&& ((local_c4 < 3 ||
((local_c9 != '\0' &&
(cVar2 = all_digits_p(local_e8[(long)optind + 2]), cVar2 != '\0')))))) &&
((equal_width != '\x01' &&
((local_b0 == (char *)0x0 && (sVar7 = strlen(separator), sVar7 == 1)))))) {
if (local_c4 == 1) {
local_a8 = &DAT_0010290d;
}
else {
local_a8 = (undefined *)local_e8[optind];
}
local_a0 = local_e8[(local_c4 + optind) - 1];
fVar1 = (float10)CONCAT28(uStack96,local_68);
if (_DAT_00102950 <= fVar1) {
local_e0 = in_FPUControlWord & 0xff | (ushort)(byte)((ulong)in_FPUControlWord >> 8) << 8;
uVar9 = (long)ROUND(fVar1 - _DAT_00102950) ^ 0x8000000000000000;
}
else {
local_e0 = in_FPUControlWord & 0xff | (ushort)(byte)((ulong)in_FPUControlWord >> 8) << 8;
uVar9 = (ulong)ROUND(fVar1);
}
local_e0 = local_e0 | 0xc00;
seq_fast(local_a8,local_a0,uVar9);
}
lVar8 = (long)optind;
optind = optind + 1;
scan_arg(&local_48,local_e8[lVar8]);
if (optind < local_dc) {
local_88 = local_48;
uStack128 = uStack64;
local_78 = local_38;
local_70 = local_30;
lVar8 = (long)optind;
optind = optind + 1;
scan_arg(&local_108,local_e8[lVar8]);
local_48 = local_108;
uStack64 = (undefined2)local_100;
uStack62 = (undefined6)((ulong)local_100 >> 0x10);
local_38 = local_f8;
local_30 = local_f0;
if (optind < local_dc) {
local_68 = local_108;
local_58 = local_f8;
local_50 = local_f0;
uStack96 = uStack64;
uStack94 = uStack62;
if ((float10)0 == (float10)CONCAT28(uStack64,local_108)) {
uVar5 = quote(local_e8[(long)optind + -1]);
uVar6 = gettext("invalid Zero increment value: %s");
error(0,0,uVar6,uVar5);
usage(1);
}
lVar8 = (long)optind;
optind = optind + 1;
scan_arg(&local_108,local_e8[lVar8]);
local_48 = local_108;
uStack64 = (undefined2)local_100;
uStack62 = (undefined6)((ulong)local_100 >> 0x10);
local_38 = local_f8;
local_30 = local_f0;
}
}
if (((((((int)local_70 == 0) && ((int)local_50 == 0)) && ((int)local_30 == 0)) &&
((((float10)0 == (float10)0 * (float10)CONCAT28(uStack128,local_88) &&
((float10)0 <= (float10)CONCAT28(uStack128,local_88))) &&
(((float10)0 <= (float10)CONCAT28(uStack64,local_48) &&
(((float10)0 < (float10)CONCAT28(uStack96,local_68) &&
((float10)CONCAT28(uStack96,local_68) <= _DAT_00102940)))))))) &&
(equal_width != '\x01')) &&
((local_b0 == (char *)0x0 && (sVar7 = strlen(separator), sVar7 == 1)))) {
iVar3 = asprintf(&local_c0,"%0.Lf");
if (iVar3 < 0) {
xalloc_die();
}
if ((float10)0 == (float10)0 * (float10)CONCAT28(uStack64,local_48)) {
iVar3 = asprintf(&local_b8,"%0.Lf");
if (iVar3 < 0) {
xalloc_die();
}
}
else {
local_b8 = (char *)xstrdup(&DAT_00102872);
}
if ((*local_c0 != '-') && (*local_b8 != '-')) {
fVar1 = (float10)CONCAT28(uStack96,local_68);
if (_DAT_00102950 <= fVar1) {
local_e0 = in_FPUControlWord & 0xff | (ushort)(byte)((ulong)in_FPUControlWord >> 8) << 8
;
uVar9 = (long)ROUND(fVar1 - _DAT_00102950) ^ 0x8000000000000000;
}
else {
local_e0 = in_FPUControlWord & 0xff | (ushort)(byte)((ulong)in_FPUControlWord >> 8) << 8
;
uVar9 = (ulong)ROUND(fVar1);
}
local_e0 = local_e0 | 0xc00;
seq_fast(local_c0,local_b8,uVar9);
}
free(local_c0);
free(local_b8);
}
if (local_b0 == (char *)0x0) {
local_b0 = (char *)get_default_format();
}
print_numbers(local_b0,local_98,local_90);
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
return 0;
}
__stack_chk_fail();
}
if (local_c8 != 0x77) break;
equal_width = '\x01';
}
if (local_c8 < 0x78) {
if (local_c8 == 0x73) {
separator = optarg;
goto LAB_001017e5;
}
if (0x73 < local_c8) goto LAB_001017db;
if (local_c8 == 0x66) {
local_b0 = optarg;
goto LAB_001017e5;
}
if (local_c8 < 0x67) {
if (local_c8 == -0x83) {
LAB_00101798:
version_etc(stdout,&DAT_00102758,"GNU coreutils",Version,"Ulrich Drepper",0);
exit(0);
}
if (local_c8 == -0x82) {
usage(0);
goto LAB_00101798;
}
}
}
LAB_001017db:
usage();
goto LAB_001017e5;
}
|
static
_Bool
is_feasible_path_argument (const char *arg,
_Bool
foldcase)
{
const char *last = strrchr (arg, '/');
if (last && !last[1])
{
if (matches_start_point (arg, foldcase))
{
return
1
;
}
else
{
return
0
;
}
}
return
1
;
}
|
int is_feasible_path_argument(char *a0, unsigned long a1) {
struct_0 *v0;
unsigned int v2;
v0 = &strrchr(a0, 0x2f);
if (!v0) {
v2 = 1;
return v2;
} else if (v0->field_1) {
v2 = 1;
return v2;
} else {
v2 = (!matches_start_point(a0, a1, a1) ? 1 : 0);
return v2;
}
}
|
static char *
extract_varname (char const *str)
{
idx_t i;
char const *p;
p = scan_varname (str);
if (!p)
return
((void *)0)
;
i = p - str - 2;
if (i >= vnlen)
{
vnlen = i + 1;
varname = xrealloc (varname, vnlen);
}
memcpy (varname, str + 2, i);
varname[i] = 0;
return varname;
}
|
void * extract_varname(long param_1)
{
long lVar1;
size_t __n;
void *pvVar2;
lVar1 = scan_varname(param_1);
if (lVar1 == 0) {
pvVar2 = (void *)0x0;
}
else {
__n = (lVar1 - param_1) - 2;
if (vnlen <= (long)__n) {
vnlen = (lVar1 - param_1) + -1;
varname = (void *)xrealloc(varname,vnlen);
}
memcpy(varname,(void *)(param_1 + 2),__n);
*(undefined *)(__n + (long)varname) = 0;
pvVar2 = varname;
}
return pvVar2;
}
|
static int ipnh_bucket_get_id(__u32 id, __u16 bucket_index)
{
struct {
struct nlmsghdr n;
struct nhmsg nhm;
char buf[1024];
} req = {
.n.nlmsg_len = ((sizeof(struct nhmsg)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))),
.n.nlmsg_flags = 0x01,
.n.nlmsg_type = RTM_GETNEXTHOPBUCKET,
.nhm.nh_family = preferred_family,
};
struct nlmsghdr *answer;
struct rtattr *nest;
addattr32(&req.n, sizeof(req), NHA_ID, id);
nest = addattr_nest(&req.n, sizeof(req), NHA_RES_BUCKET);
nest->rta_type |= (1 << 15);
addattr16(&req.n, sizeof(req), NHA_RES_BUCKET_INDEX, bucket_index);
addattr_nest_end(&req.n, nest);
if (rtnl_talk(&rth, &req.n, &answer) < 0)
return -2;
new_json_obj(json);
if (print_nexthop_bucket(answer, (void *)
stdout
) < 0) {
free(answer);
return -1;
}
delete_json_obj();
fflush(
stdout
);
free(answer);
return 0;
}
|
long ipnh_bucket_get_id(unsigned int a1, unsigned short a2)
{
void *ptr;
long v4;
int v5[262];
unsigned long v6;
v6 = __readfsqword(0x28u);
memset(v5, 0, sizeof(v5));
v5[0] = 24;
v5[1] = 65654;
LOBYTE(v5[4]) = preferred_family;
addattr32(v5, 1048LL, 1LL, a1);
v4 = addattr_nest(v5, 1048LL, 13LL);
*(_WORD *)(v4 + 2) |= 0x8000u;
addattr16(v5, 1048LL, 1LL, a2);
addattr_nest_end(v5, v4);
if ( (int)rtnl_talk(&rth, v5, &ptr) < 0 )
return 4294967294LL;
new_json_obj(json);
if ( (int)print_nexthop_bucket((unsigned int *)ptr, stdout) >= 0 )
{
delete_json_obj();
fflush(stdout);
free(ptr);
return 0LL;
}
else
{
free(ptr);
return 0xFFFFFFFFLL;
}
}
|
static void
check_start_new_arg (struct splitbuf *ss)
{
if (ss->sep)
{
splitbuf_append_byte (ss, '\0');
int argc = ss->argc;
if (ss->half_alloc <= argc + ss->extra_argc + 1)
splitbuf_grow (ss);
ss->argv[argc + 1] = ss->argv[argc];
ss->argc = argc + 1;
ss->sep =
0
;
}
}
|
void check_start_new_arg(struct_0 *a0) {
unsigned int v0;
unsigned long long v2;
struct_0 *v3;
v2 = a0->field_1c;
if (a0->field_1c) {
splitbuf_append_byte(a0, 0x0);
v0 = a0->field_8;
if (a0->field_10 <= v0 + a0->field_18 + 1)
splitbuf_grow(a0);
*(((v0 + 1) * 8 + a0->field_0)) = *((a0->field_0 + v0 * 8));
a0->field_8 = v0 + 1;
v3 = a0;
a0->field_1c = 0;
}
return;
}
|
int
do_word_assignment (word, flags)
WORD_DESC *word;
int flags;
{
return do_assignment_internal (word, 1);
}
|
long do_word_assignment(long a1)
{
return do_assignment_internal(a1, 1);
}
|
static __u32 fscrypt_context_to_policy(const void *xattr, size_t xattr_size,
union fscrypt_policy *policy_u)
{
const union fscrypt_context *ctx_u = xattr;
if (xattr_size < 1)
return ((__u32)-2);
switch (ctx_u->version) {
case 0:
return ((__u32)-2);
case 1: {
struct fscrypt_policy_v1 *policy = &policy_u->v1;
const struct fscrypt_context_v1 *ctx = &ctx_u->v1;
if (xattr_size != sizeof(*ctx))
return ((__u32)-2);
policy->version = ctx->version;
policy->contents_encryption_mode =
ctx->contents_encryption_mode;
policy->filenames_encryption_mode =
ctx->filenames_encryption_mode;
policy->flags = ctx->flags;
memcpy(policy->master_key_descriptor,
ctx->master_key_descriptor,
sizeof(policy->master_key_descriptor));
return 0;
}
case 2: {
struct fscrypt_policy_v2 *policy = &policy_u->v2;
const struct fscrypt_context_v2 *ctx = &ctx_u->v2;
if (xattr_size != sizeof(*ctx))
return ((__u32)-2);
policy->version = ctx->version;
policy->contents_encryption_mode =
ctx->contents_encryption_mode;
policy->filenames_encryption_mode =
ctx->filenames_encryption_mode;
policy->flags = ctx->flags;
memcpy(policy->__reserved, ctx->__reserved,
sizeof(policy->__reserved));
memcpy(policy->master_key_identifier,
ctx->master_key_identifier,
sizeof(policy->master_key_identifier));
return 0;
}
}
return ((__u32)-3);
}
|
int fscrypt_context_to_policy(char a0[4], unsigned long a1, unsigned long a2) {
char v0[4];
char v1[4];
char v2[4];
char v3[4];
unsigned int v5;
if (!a1) {
v5 = -2;
return v5;
}
switch (a0[0]) {
case 2:
*(&v0) = a2;
*(&v1) = a0;
if (a1 != 40) {
v5 = -2;
return v5;
}
v0[0] = v1[0];
v0[1] = v1[1];
v0[2] = v1[2];
v0[3] = v1[3];
memcpy(v0 + 1, v1 + 1, 0x4);
memcpy(v0 + 2, v1 + 2, 0x10);
v5 = 0;
return v5;
case 0:
v5 = -2;
return v5;
case 1:
*(&v2) = a2;
*(&v3) = a0;
if (a1 != 28) {
v5 = -2;
return v5;
}
v2[0] = v3[0];
v2[1] = v3[1];
v2[2] = v3[2];
v2[3] = v3[3];
memcpy(v2 + 1, v3 + 1, 0x8);
v5 = 0;
return v5;
default:
v5 = -3;
return v5;
}
}
|
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 *param_1)
{
FILE *__stream;
int iVar1;
char *pcVar2;
char *pcVar3;
long in_FS_OFFSET;
char *local_b8;
char **local_b0;
char *local_98;
char *local_90;
char *local_88;
char *local_80;
char *local_78;
char *local_70;
char *local_68;
char *local_60;
char *local_58;
char *local_50;
char *local_48;
char *local_40;
undefined8 local_38;
undefined8 local_30;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_98 = "[";
local_90 = "test invocation";
local_88 = "coreutils";
local_80 = "Multi-call invocation";
local_78 = "sha224sum";
local_70 = "sha2 utilities";
local_68 = "sha256sum";
local_60 = "sha2 utilities";
local_58 = "sha384sum";
local_50 = "sha2 utilities";
local_48 = "sha512sum";
local_40 = "sha2 utilities";
local_38 = 0;
local_30 = 0;
local_b0 = &local_98;
while ((*local_b0 != (char *)0x0 && (iVar1 = strcmp(param_1,*local_b0), iVar1 != 0))) {
local_b0 = local_b0 + 2;
}
local_b8 = param_1;
if (local_b0[1] != (char *)0x0) {
local_b8 = local_b0[1];
}
pcVar2 = (char *)gettext("\n%s online help: <%s>\n");
printf(pcVar2,"GNU coreutils","https:
pcVar2 = setlocale(5,(char *)0x0);
if ((pcVar2 != (char *)0x0) && (iVar1 = strncmp(pcVar2,"en_",3), __stream = stdout, iVar1 != 0)) {
pcVar2 = (char *)gettext(
"Report any translation bugs to <https:
);
fputs_unlocked(pcVar2,__stream);
}
iVar1 = strcmp(param_1,"[");
pcVar2 = param_1;
if (iVar1 == 0) {
pcVar2 = "test";
}
pcVar3 = (char *)gettext("Full documentation <%s%s>\n");
printf(pcVar3,"https:
if (local_b8 == param_1) {
pcVar2 = " invocation";
}
else {
pcVar2 = "";
}
pcVar3 = (char *)gettext("or available locally via: info \'(coreutils) %s%s\'\n");
printf(pcVar3,local_b8,pcVar2);
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
return;
}
__stack_chk_fail();
}
|
static void
add_file_name (char *name, char *names[2],
int operand_status[2], int joption_count[2], int *nfiles,
int *prev_optc_status, int *optc_status)
{
int n = *nfiles;
if (n == 2)
{
_Bool
op0 = (operand_status[0] == MUST_BE_OPERAND);
char *arg = names[op0];
switch (operand_status[op0])
{
case MUST_BE_OPERAND:
error (0, 0, gettext ("extra operand %s"), quotearg_style (shell_escape_always_quoting_style, name));
usage (
1
);
case MIGHT_BE_J1_ARG:
joption_count[0]--;
set_join_field (&join_field_1, string_to_join_field (arg));
break;
case MIGHT_BE_J2_ARG:
joption_count[1]--;
set_join_field (&join_field_2, string_to_join_field (arg));
break;
case MIGHT_BE_O_ARG:
add_field_list (arg);
break;
}
if (!op0)
{
operand_status[0] = operand_status[1];
names[0] = names[1];
}
n = 1;
}
operand_status[n] = *prev_optc_status;
names[n] = name;
*nfiles = n + 1;
if (*prev_optc_status == MIGHT_BE_O_ARG)
*optc_status = MIGHT_BE_O_ARG;
}
|
void add_file_name(unsigned long long a0, unsigned long long a1[2], unsigned int a2[2], unsigned int a3[2], unsigned int *a4, unsigned int *a5, unsigned int *v6) {
unsigned int v0[2];
unsigned int v1[2];
unsigned long long v2[2];
char v3;
unsigned int v4;
void* v5;
unsigned long long v7;
unsigned long long v8;
unsigned int *v9;
v2[0] = a1;
*(&v1[0]) = a2;
*(&v0[0]) = a3;
v4 = *(a4);
if (v4 == 2) {
v3 = !a2[0];
v5 = a1[v3];
if (a2[v3] == 3) {
add_field_list(v5);
} else if (a2[v3] <= 3) {
if (a2[v3] == 2) {
a3[1] = a3[1] - 1;
set_join_field(&join_field_2, string_to_join_field(v5));
} else if (a2[v3] <= 2) {
if (!a2[v3]) {
v7 = quotearg_style(0x4, a0);
error(0x0, 0x0, gettext("extra operand %s"));
usage(0x1);
} else if (a2[v3] == 1) {
a3[0] = a3[0] - 1;
set_join_field(&join_field_1, string_to_join_field(v5));
}
}
}
if (a2[v3] == 3 || a2[v3] == 2 || a2[v3] > 2 || a2[v3] || a2[v3] > 3) {
if ((v3 ^ 1)) {
a2[0] = a2[1];
a1[0] = a1[1];
}
v4 = 1;
}
}
if (a2[v3] == 3 || a2[v3] == 2 || v4 != 2 || a2[v3] > 2 || a2[v3] || a2[v3] > 3) {
a2[v4] = *(a5);
a1[v4] = a0;
*(a4) = v4 + 1;
v8 = *(a5);
if (*(a5) == 3) {
v9 = v6;
*(v6) = 3;
}
return;
}
}
|
, "Offending %s key in %s:%lu", sshkey_type(host_found->key), host_found->file, host_found->line)
;
if (options.strict_host_key_checking !=
0) {
sshlog("sshconnect.c", __func__, 1280, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "Host key for %.200s has changed and you have " "requested strict checking.", host)
;
goto fail;
}
|
void sshkey_type(void)
{
halt_baddata();
}
|
void
chan_ibuf_empty(struct ssh *ssh, Channel *c)
{
sshlog("nchan.c", __func__, 131, 0, SYSLOG_LEVEL_DEBUG2,
((void *)0)
, "channel %d: ibuf empty", c->self);
if (sshbuf_len(c->input)) {
sshlog("nchan.c", __func__, 133, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "channel %d: chan_ibuf_empty for non empty buffer", c->self)
;
return;
}
switch (c->istate) {
case 1:
if (!(c->flags & (0x01|0x10)))
chan_send_eof2(ssh, c);
chan_set_istate(c, 3);
break;
default:
sshlog("nchan.c", __func__, 144, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "channel %d: chan_ibuf_empty for istate %d", c->self, c->istate)
;
break;
}
}
|
long long chan_ibuf_empty(unsigned long long a0, struct_0 *a1) {
unsigned long long v2;
sshlog("nchan.c", "chan_ibuf_empty", 0x83, 0x0, 0x6, 0x0, "channel %d: ibuf empty", a1->field_4, a1);
if (sshbuf_len(a1->field_68)) {
v2 = sshlog("nchan.c", "chan_ibuf_empty", 0x85, 0x0, 0x2, 0x0, "channel %d: chan_ibuf_empty for non empty buffer", a1->field_4, a1);
} else if (a1->field_10 == 1) {
if (!(a1->field_18 & 17))
chan_send_eof2(a0, a1);
v2 = chan_set_istate(a1, 0x3);
} else {
v2 = sshlog("nchan.c", "chan_ibuf_empty", 0x90, 0x0, 0x2, 0x0, "channel %d: chan_ibuf_empty for istate %d", a1->field_4, a1->field_10);
}
return v2;
}
|
static void
assign_assoc_from_kvlist (var, nlist, h, flags)
SHELL_VAR *var;
WORD_LIST *nlist;
HASH_TABLE *h;
int flags;
{
WORD_LIST *list;
char *akey, *aval, *k, *v;
for (list = nlist; list; list = list->next)
{
k = list->word->word;
v = list->next ? list->next->word->word : 0;
if (list->next)
list = list->next;
akey = expand_subscript_string (k, 0);
if (akey == 0 || *akey == 0)
{
err_badarraysub (k);
do { if (akey) sh_xfree((akey), "arrayfunc.c", 649); } while (0);
continue;
}
aval = expand_subscript_string (v, 0);
if (aval == 0)
{
aval = (char *)sh_xmalloc((1), "arrayfunc.c", 656);
aval[0] = '\0';
}
bind_assoc_var_internal (var, h, akey, aval, flags);
sh_xfree((aval), "arrayfunc.c", 661);
}
}
|
void assign_assoc_from_kvlist(void* a0, unsigned long long a1, unsigned long long a2, unsigned long a3) {
struct_0 *v0;
char *v1;
unsigned long long v2;
unsigned long long v3;
char *v4;
unsigned long long v6;
unsigned long long v8[2];
v6 = a1;
for (v0 = a1; v0; v0 = &v0->field_0->field_0) {
v2 = v0->field_8->field_0;
*(&v3) = (!v0->field_0 ? v0->field_0->field_8->field_0 : 0);
if (v0->field_0)
v0 = &v0->field_0->field_0;
v4 = expand_subscript_string(v2, 0x0);
if (!v4 || !*(v4)) {
err_badarraysub(v2);
if (v4)
sh_xfree(v4, "arrayfunc.c", 0x289);
} else {
v1 = expand_subscript_string(v3, 0x0);
if (!v1) {
v1 = sh_xmalloc(0x1, "arrayfunc.c", 0x290);
*(v1) = 0;
}
bind_assoc_var_internal(a0, a2, v4, v1, a3);
sh_xfree(v1, "arrayfunc.c", 0x295);
}
v8 = v0->field_0;
}
return;
}
|
static const char *strxf_limit(__u64 limit)
{
static char str[32];
if (limit == (~(__u64)0))
strcpy(str, "(INF)");
else
sprintf(str, "%llu", (unsigned long long) limit);
return str;
}
|
char * strxf_limit(long a1)
{
if ( a1 == -1 )
strcpy(str_9320, "(INF)");
else
sprintf(str_9320, "%llu", a1);
return str_9320;
}
|
static int ipstats_set_do(int ifindex, int at,
_Bool
enable)
{
struct ipstats_req req = {
.nlh.nlmsg_len = ((sizeof(struct if_stats_msg)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))),
.nlh.nlmsg_flags = 0x01,
.nlh.nlmsg_type = RTM_SETSTATS,
.ifsm.family =
0
,
.ifsm.ifindex = ifindex,
};
addattr8(&req.nlh, sizeof(req), at, enable);
if (rtnl_talk(&rth, &req.nlh,
((void *)0)
) < 0)
return -2;
return 0;
}
|
void ipstats_set_do(unsigned long a0, unsigned long a1, unsigned long a2) {
unsigned int v0;
char v1;
unsigned short v2;
unsigned short v3;
unsigned int v4;
unsigned long long v6;
void* v7;
unsigned long v8;
unsigned long long v10;
void* v11;
v0 = a0;
v6 = 19;
for (v7 = &v1; v6; v7 += v8 * 8) {
v6 -= 1;
v1 = 0;
}
*(v7) = 0;
v1 = 28;
v2 = 95;
v3 = 1;
v4 = v0;
addattr8(&v1, 0x9c, a1, a2);
if (rtnl_talk(0x5000f8, &v1, 0x0) < 0)
v10 = 4294967294;
else
v11 = 0;
return;
}
|
static int
mux_client_forward(int fd, int cancel_flag, u_int ftype, struct Forward *fwd)
{
struct sshbuf *m;
char *e, *fwd_desc;
const char *lhost, *chost;
u_int type, rid;
int r;
fwd_desc = format_forward(ftype, fwd);
sshlog("mux.c", __func__, 1752, 0, SYSLOG_LEVEL_DEBUG1,
((void *)0)
, "Requesting %s %s", cancel_flag ? "cancellation of" : "forwarding of", fwd_desc)
;
free(fwd_desc);
type = cancel_flag ? 0x10000007 : 0x10000006;
if (fwd->listen_path !=
((void *)0)
)
lhost = fwd->listen_path;
else if (fwd->listen_host ==
((void *)0)
)
lhost = "";
else if (*fwd->listen_host == '\0')
lhost = "*";
else
lhost = fwd->listen_host;
if (fwd->connect_path !=
((void *)0)
)
chost = fwd->connect_path;
else if (fwd->connect_host ==
((void *)0)
)
chost = "";
else
chost = fwd->connect_host;
if ((m = sshbuf_new()) ==
((void *)0)
)
sshfatal("mux.c", __func__, 1774, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "sshbuf_new");
if ((r = sshbuf_put_u32(m, type)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0 ||
(r = sshbuf_put_u32(m, ftype)) != 0 ||
(r = sshbuf_put_cstring(m, lhost)) != 0 ||
(r = sshbuf_put_u32(m, fwd->listen_port)) != 0 ||
(r = sshbuf_put_cstring(m, chost)) != 0 ||
(r = sshbuf_put_u32(m, fwd->connect_port)) != 0)
sshfatal("mux.c", __func__, 1782, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "request");
if (mux_client_write_packet(fd, m) != 0)
sshfatal("mux.c", __func__, 1785, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "write packet: %s", strerror(
(*__errno_location ())
));
sshbuf_reset(m);
if (mux_client_read_packet(fd, m) != 0) {
sshbuf_free(m);
return -1;
}
if ((r = sshbuf_get_u32(m, &type)) != 0 ||
(r = sshbuf_get_u32(m, &rid)) != 0)
sshfatal("mux.c", __func__, 1797, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse");
if (rid != muxclient_request_id)
sshfatal("mux.c", __func__, 1799, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "out of sequence reply: my id %u theirs %u", muxclient_request_id, rid)
;
switch (type) {
case 0x80000001:
break;
case 0x80000007:
if (cancel_flag)
sshfatal("mux.c", __func__, 1807, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "got MUX_S_REMOTE_PORT for cancel");
if ((r = sshbuf_get_u32(m, &fwd->allocated_port)) != 0)
sshfatal("mux.c", __func__, 1809, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse port");
sshlog("mux.c", __func__, 1810, 0, SYSLOG_LEVEL_VERBOSE,
((void *)0)
, "Allocated port %u for remote forward to %s:%d", fwd->allocated_port, fwd->connect_host ? fwd->connect_host : "", fwd->connect_port)
;
if (muxclient_command == 5)
fprintf(
stdout
, "%i\n", fwd->allocated_port);
break;
case 0x80000002:
if ((r = sshbuf_get_cstring(m, &e,
((void *)0)
)) != 0)
sshfatal("mux.c", __func__, 1819, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse error message");
sshbuf_free(m);
sshlog("mux.c", __func__, 1821, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "Master refused forwarding request: %s", e);
return -1;
case 0x80000003:
if ((r = sshbuf_get_cstring(m, &e,
((void *)0)
)) != 0)
sshfatal("mux.c", __func__, 1825, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse error message");
sshbuf_free(m);
sshlog("mux.c", __func__, 1827, 1, SYSLOG_LEVEL_ERROR,
((void *)0)
, "forwarding request failed: %s", e);
return -1;
default:
sshfatal("mux.c", __func__, 1830, 1, SYSLOG_LEVEL_FATAL,
((void *)0)
, "unexpected response from master 0x%08x", type);
}
sshbuf_free(m);
muxclient_request_id++;
return 0;
}
|
undefined8 mux_client_forward(undefined4 param_1,int param_2,undefined4 param_3,char **param_4)
{
undefined4 uVar1;
uint uVar2;
int iVar3;
char *pcVar4;
undefined8 uVar5;
int *piVar6;
undefined *puVar7;
undefined *puVar8;
undefined *puVar9;
undefined *puVar10;
long in_FS_OFFSET;
char *apcStackY272 [2];
ulong uStackY256;
char *pcStackY248;
ulong uStackY240;
char *apcStackY232 [3];
ulong uStackY208;
char *pcStackY200;
ulong auStackY192 [3];
char *apcStackY168 [4];
char *pcStack120;
undefined8 uStack112;
undefined auStack104 [8];
char **local_60;
undefined4 local_54;
int local_50;
undefined4 local_4c;
uint local_44;
uint local_40;
int local_3c;
undefined8 local_38;
char *local_30;
char *local_28;
char *local_20;
long local_18;
long local_10;
puVar7 = auStack104;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uStack112 = 0x105ef2;
local_60 = param_4;
local_54 = param_3;
local_50 = param_2;
local_4c = param_1;
pcStack120 = (char *)format_forward(param_3,param_4);
if (local_50 == 0) {
pcVar4 = "forwarding of";
}
else {
pcVar4 = "cancellation of";
}
local_20 = pcStack120;
sshlog("mux.c","mux_client_forward",0x6d8,0,5,0,"Requesting %s %s",pcVar4);
uStack112 = 0x105f5a;
free(local_20);
if (local_50 == 0) {
local_44 = 0x10000006;
}
else {
local_44 = 0x10000007;
}
if (local_60[2] == (char *)0x0) {
if (*local_60 == (char *)0x0) {
local_30 = "";
}
else if (**local_60 == '\0') {
local_30 = "*";
}
else {
local_30 = *local_60;
}
}
else {
local_30 = local_60[2];
}
if (local_60[5] == (char *)0x0) {
if (local_60[3] == (char *)0x0) {
local_28 = "";
}
else {
local_28 = local_60[3];
}
}
else {
local_28 = local_60[5];
}
uStack112 = 0x10600f;
local_18 = sshbuf_new();
if (local_18 == 0) {
puVar7 = (undefined *)&pcStack120;
pcStack120 = "sshbuf_new";
sshfatal("mux.c","mux_client_forward",0x6ee,1,1,0);
}
*(undefined8 *)(puVar7 + -8) = 0x106065;
local_3c = sshbuf_put_u32(local_18,local_44);
if (local_3c == 0) {
*(undefined8 *)(puVar7 + -8) = 0x106086;
local_3c = sshbuf_put_u32(local_18,muxclient_request_id);
if (local_3c != 0) goto LAB_00106125;
*(undefined8 *)(puVar7 + -8) = 0x1060a4;
local_3c = sshbuf_put_u32(local_18,local_54);
if (local_3c != 0) goto LAB_00106125;
*(undefined8 *)(puVar7 + -8) = 0x1060c0;
local_3c = sshbuf_put_cstring(local_18,local_30);
if (local_3c != 0) goto LAB_00106125;
uVar1 = *(undefined4 *)(local_60 + 1);
*(undefined8 *)(puVar7 + -8) = 0x1060e0;
local_3c = sshbuf_put_u32(local_18,uVar1);
if (local_3c != 0) goto LAB_00106125;
*(undefined8 *)(puVar7 + -8) = 0x1060fc;
local_3c = sshbuf_put_cstring(local_18,local_28);
if (local_3c != 0) goto LAB_00106125;
uVar1 = *(undefined4 *)(local_60 + 4);
*(undefined8 *)(puVar7 + -8) = 0x10611c;
local_3c = sshbuf_put_u32(local_18,uVar1);
puVar9 = puVar7;
if (local_3c != 0) goto LAB_00106125;
}
else {
LAB_00106125:
*(undefined8 *)(puVar7 + -8) = 0x10612f;
uVar5 = ssh_err(local_3c);
puVar9 = puVar7 + -0x10;
*(char **)(puVar7 + -0x10) = "request";
*(undefined8 *)(puVar7 + -0x18) = 0x106166;
sshfatal("mux.c","mux_client_forward",0x6f6,1,1,uVar5);
}
*(undefined8 *)(puVar9 + -8) = 0x106177;
iVar3 = mux_client_write_packet(local_4c,local_18);
puVar10 = puVar9;
if (iVar3 != 0) {
*(undefined8 *)(puVar9 + -8) = 0x106180;
piVar6 = __errno_location();
iVar3 = *piVar6;
*(undefined8 *)(puVar9 + -8) = 0x106189;
pcVar4 = strerror(iVar3);
*(char **)(puVar9 + -8) = pcVar4;
puVar10 = puVar9 + -0x10;
*(char **)(puVar9 + -0x10) = "write packet: %s";
*(undefined8 *)(puVar9 + -0x18) = 0x1061c0;
sshfatal("mux.c","mux_client_forward",0x6f9,1,1,0);
}
*(undefined8 *)(puVar10 + -8) = 0x1061cc;
sshbuf_reset(local_18);
*(undefined8 *)(puVar10 + -8) = 0x1061dd;
iVar3 = mux_client_read_packet(local_4c,local_18);
if (iVar3 != 0) {
*(undefined8 *)(puVar10 + -8) = 0x1061ed;
sshbuf_free(local_18);
uVar5 = 0xffffffff;
goto LAB_00106611;
}
*(undefined8 *)(puVar10 + -8) = 0x10620a;
local_3c = sshbuf_get_u32(local_18,&local_44);
if (local_3c == 0) {
*(undefined8 *)(puVar10 + -8) = 0x106226;
local_3c = sshbuf_get_u32(local_18,&local_40);
puVar9 = puVar10;
if (local_3c != 0) goto LAB_0010622f;
}
else {
LAB_0010622f:
*(undefined8 *)(puVar10 + -8) = 0x106239;
uVar5 = ssh_err(local_3c);
puVar9 = puVar10 + -0x10;
*(char **)(puVar10 + -0x10) = "parse";
*(undefined8 *)(puVar10 + -0x18) = 0x106270;
sshfatal("mux.c","mux_client_forward",0x705,1,1,uVar5);
}
puVar8 = puVar9;
if (local_40 != muxclient_request_id) {
*(ulong *)(puVar9 + -0x10) = (ulong)local_40;
*(ulong *)(puVar9 + -0x18) = (ulong)muxclient_request_id;
puVar8 = puVar9 + -0x20;
*(char **)(puVar9 + -0x20) = "out of sequence reply: my id %u theirs %u";
*(undefined8 *)(puVar9 + -0x28) = 0x1062c2;
sshfatal("mux.c","mux_client_forward",0x707,1,1,0);
}
if (local_44 == 0x80000007) {
puVar9 = puVar8;
if (local_50 != 0) {
puVar9 = puVar8 + -0x10;
*(char **)(puVar8 + -0x10) = "got MUX_S_REMOTE_PORT for cancel";
*(undefined8 *)(puVar8 + -0x18) = 0x106348;
sshfatal("mux.c","mux_client_forward",0x70f,1,1,0);
}
*(undefined8 *)(puVar9 + -8) = 0x10635f;
local_3c = sshbuf_get_u32(local_18,local_60 + 6);
puVar10 = puVar9;
if (local_3c != 0) {
*(undefined8 *)(puVar9 + -8) = 0x106372;
uVar5 = ssh_err(local_3c);
puVar10 = puVar9 + -0x10;
*(char **)(puVar9 + -0x10) = "parse port";
*(undefined8 *)(puVar9 + -0x18) = 0x1063a9;
sshfatal("mux.c","mux_client_forward",0x711,1,1,uVar5);
}
if (local_60[3] == (char *)0x0) {
pcVar4 = "";
}
else {
pcVar4 = local_60[3];
}
uVar2 = *(uint *)(local_60 + 6);
*(ulong *)(puVar10 + -8) = (ulong)*(uint *)(local_60 + 4);
*(char **)(puVar10 + -0x10) = pcVar4;
*(ulong *)(puVar10 + -0x18) = (ulong)uVar2;
*(char **)(puVar10 + -0x20) = "Allocated port %u for remote forward to %s:%d";
*(undefined8 *)(puVar10 + -0x28) = 0x10640e;
sshlog("mux.c","mux_client_forward",0x712,0,4,0);
if (muxclient_command == 5) {
uVar2 = *(uint *)(local_60 + 6);
*(undefined8 *)(puVar10 + -8) = 0x106443;
fprintf(stdout,"%i\n",(ulong)uVar2);
}
}
else {
if (local_44 < 0x80000008) {
puVar10 = puVar8;
if (local_44 == 0x80000003) {
*(undefined8 *)(puVar8 + -8) = 0x106517;
local_3c = sshbuf_get_cstring(local_18,&local_38,0);
if (local_3c != 0) {
*(undefined8 *)(puVar8 + -8) = 0x10652a;
uVar5 = ssh_err(local_3c);
puVar10 = puVar8 + -0x10;
*(char **)(puVar8 + -0x10) = "parse error message";
*(undefined8 *)(puVar8 + -0x18) = 0x106561;
sshfatal("mux.c","mux_client_forward",0x721,1,1,uVar5);
}
*(undefined8 *)(puVar10 + -8) = 0x10656d;
sshbuf_free(local_18);
*(undefined8 *)(puVar10 + -8) = local_38;
*(char **)(puVar10 + -0x10) = "forwarding request failed: %s";
*(undefined8 *)(puVar10 + -0x18) = 0x1065a8;
sshlog("mux.c","mux_client_forward",0x723,1,2,0);
uVar5 = 0xffffffff;
goto LAB_00106611;
}
if (local_44 < 0x80000004) {
if (local_44 == 0x80000001) goto LAB_001065f1;
if (local_44 == 0x80000002) {
*(undefined8 *)(puVar8 + -8) = 0x106460;
local_3c = sshbuf_get_cstring(local_18,&local_38,0);
if (local_3c != 0) {
*(undefined8 *)(puVar8 + -8) = 0x106473;
uVar5 = ssh_err(local_3c);
puVar10 = puVar8 + -0x10;
*(char **)(puVar8 + -0x10) = "parse error message";
*(undefined8 *)(puVar8 + -0x18) = 0x1064aa;
sshfatal("mux.c","mux_client_forward",0x71b,1,1,uVar5);
}
*(undefined8 *)(puVar10 + -8) = 0x1064b6;
sshbuf_free(local_18);
*(undefined8 *)(puVar10 + -8) = local_38;
*(char **)(puVar10 + -0x10) = "Master refused forwarding request: %s";
*(undefined8 *)(puVar10 + -0x18) = 0x1064f1;
sshlog("mux.c","mux_client_forward",0x71d,0,2,0);
uVar5 = 0xffffffff;
goto LAB_00106611;
}
}
}
*(ulong *)(puVar8 + -8) = (ulong)local_44;
puVar10 = puVar8 + -0x10;
*(char **)(puVar8 + -0x10) = "unexpected response from master 0x%08x";
*(undefined8 *)(puVar8 + -0x18) = 0x1065ed;
sshfatal("mux.c","mux_client_forward",0x726,1,1,0);
}
LAB_001065f1:
*(undefined8 *)(puVar10 + -8) = 0x1065fd;
sshbuf_free(local_18);
muxclient_request_id = muxclient_request_id + 1;
uVar5 = 0;
LAB_00106611:
if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
return uVar5;
}
*(undefined8 *)(puVar10 + -8) = 0x106625;
__stack_chk_fail();
}
|
int compress_cert_set_methods(gnutls_session_t session,
const char **strings,
size_t n_strings)
{
int ret = 0;
gnutls_compression_method_t *methods;
if (n_strings == 0) {
return 0;
}
methods = reallocarray(
((void *)0)
, n_strings, sizeof(*methods));
if (!methods) {
fprintf(
stderr
, "Could not set certificate compression methods: %s\n",
gnutls_strerror(ret));
return -25;
}
for (size_t i = 0; i < n_strings; ++i) {
methods[i] = gnutls_compression_get_id(strings[i]);
if (methods[i] == GNUTLS_COMP_UNKNOWN) {
fprintf(
stderr
, "Unknown compression method: %s\n",
strings[i]);
goto cleanup;
}
}
ret = gnutls_compress_certificate_set_methods(session, methods, n_strings);
if (ret < 0) {
fprintf(
stderr
, "Could not set certificate compression methods: %s\n",
gnutls_strerror(ret));
goto cleanup;
}
cleanup:
free(methods);
return ret;
}
|
long long compress_cert_set_methods(unsigned long long a0, void* a1, unsigned long a2) {
unsigned int v0;
void* v1;
void* v2;
unsigned long long v4;
v0 = 0;
if (!a2) {
v4 = 0;
return v4;
}
v2 = reallocarray(NULL, a2, 0x4);
if (!v2) {
fprintf(*(&stderr), "Could not set certificate compression methods: %s\n", gnutls_strerror(v0));
v4 = 4294967271;
return v4;
}
v1 = 0;
while (true) {
if (v1 >= a2) {
v0 = gnutls_compress_certificate_set_methods(a0, v2, a2, v2);
if (v0 < 0) {
fprintf(*(&stderr), "Could not set certificate compression methods: %s\n", gnutls_strerror(v0));
break;
}
} else {
*((0x4 * v1 + v2)) = gnutls_compression_get_id(*((a1 + 0x8 * v1)));
if (*((v2 + 0x4 * v1))) {
v1 += 1;
} else {
fprintf(*(&stderr), "Unknown compression method: %s\n", *((a1 + 0x8 * v1)));
break;
}
}
}
free(v2);
v4 = v0;
return v4;
}
|
static void can_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
{
if (!tb)
return;
if (tb[IFLA_CAN_CTRLMODE]) {
struct can_ctrlmode *cm = ((void*)(((char*)(tb[IFLA_CAN_CTRLMODE])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
print_ctrlmode(PRINT_ANY, cm->flags, "ctrlmode");
if (tb[IFLA_CAN_CTRLMODE_EXT])
can_print_ctrlmode_ext(f, tb[IFLA_CAN_CTRLMODE_EXT],
cm->flags);
}
if (tb[IFLA_CAN_STATE]) {
uint32_t state = rta_getattr_u32(tb[IFLA_CAN_STATE]);
print_string(PRINT_ANY, "state", "state %s ", state < CAN_STATE_MAX ?
can_state_names[state] : "UNKNOWN");
}
if (tb[IFLA_CAN_BERR_COUNTER]) {
struct can_berr_counter *bc =
((void*)(((char*)(tb[IFLA_CAN_BERR_COUNTER])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
open_json_object("berr_counter");
print_uint(PRINT_ANY, "tx", "(berr-counter tx %u", bc->txerr);
print_uint(PRINT_ANY, "rx", " rx %u) ", bc->rxerr);
close_json_object();
}
if (tb[IFLA_CAN_RESTART_MS]) {
__u32 *restart_ms = ((void*)(((char*)(tb[IFLA_CAN_RESTART_MS])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
print_uint(PRINT_ANY, "restart_ms", "restart-ms %u ",
*restart_ms);
}
if (tb[IFLA_CAN_BITTIMING] && !tb[IFLA_CAN_BITRATE_CONST]) {
struct can_bittiming *bt = ((void*)(((char*)(tb[IFLA_CAN_BITTIMING])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
char sp[6];
open_json_object("bittiming");
can_print_nl_indent();
print_uint(PRINT_ANY, "bitrate", " bitrate %u", bt->bitrate);
snprintf(sp, sizeof(sp), "%.3f", bt->sample_point / 1000.);
print_string(PRINT_ANY, "sample_point", " sample-point %s", sp);
can_print_nl_indent();
print_uint(PRINT_ANY, "tq", " tq %u", bt->tq);
print_uint(PRINT_ANY, "prop_seg", " prop-seg %u", bt->prop_seg);
print_uint(PRINT_ANY, "phase_seg1", " phase-seg1 %u",
bt->phase_seg1);
print_uint(PRINT_ANY, "phase_seg2", " phase-seg2 %u",
bt->phase_seg2);
print_uint(PRINT_ANY, "sjw", " sjw %u", bt->sjw);
print_uint(PRINT_ANY, "brp", " brp %u", bt->brp);
close_json_object();
}
if (tb[IFLA_CAN_BITTIMING_CONST] && !tb[IFLA_CAN_BITRATE_CONST]) {
struct can_bittiming_const *btc =
((void*)(((char*)(tb[IFLA_CAN_BITTIMING_CONST])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
open_json_object("bittiming_const");
can_print_nl_indent();
print_string(PRINT_ANY, "name", " %s:", btc->name);
can_print_timing_min_max("tseg1", " tseg1",
btc->tseg1_min, btc->tseg1_max);
can_print_timing_min_max("tseg2", " tseg2",
btc->tseg2_min, btc->tseg2_max);
can_print_timing_min_max("sjw", " sjw", 1, btc->sjw_max);
can_print_timing_min_max("brp", " brp",
btc->brp_min, btc->brp_max);
print_uint(PRINT_ANY, "brp_inc", " brp_inc %u", btc->brp_inc);
close_json_object();
}
if (tb[IFLA_CAN_BITRATE_CONST]) {
__u32 *bitrate_const = ((void*)(((char*)(tb[IFLA_CAN_BITRATE_CONST])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
int bitrate_cnt = ((int)((tb[IFLA_CAN_BITRATE_CONST])->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))) /
sizeof(*bitrate_const);
int i;
__u32 bitrate = 0;
if (tb[IFLA_CAN_BITTIMING]) {
struct can_bittiming *bt =
((void*)(((char*)(tb[IFLA_CAN_BITTIMING])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
bitrate = bt->bitrate;
}
can_print_nl_indent();
print_uint(PRINT_ANY, "bittiming_bitrate", " bitrate %u",
bitrate);
can_print_nl_indent();
open_json_array(PRINT_ANY, is_json_context() ?
"bitrate_const" : " [");
for (i = 0; i < bitrate_cnt; ++i) {
if (!(i % 6) && i) {
can_print_nl_indent();
print_string(PRINT_FP,
((void *)0)
, "%s", " ");
}
print_uint(PRINT_ANY,
((void *)0)
,
i < bitrate_cnt - 1 ? "%8u, " : "%8u",
bitrate_const[i]);
}
close_json_array(PRINT_JSON, " ]");
}
if (tb[IFLA_CAN_DATA_BITTIMING] && !tb[IFLA_CAN_DATA_BITRATE_CONST]) {
struct can_bittiming *dbt =
((void*)(((char*)(tb[IFLA_CAN_DATA_BITTIMING])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
char dsp[6];
open_json_object("data_bittiming");
can_print_nl_indent();
print_uint(PRINT_ANY, "bitrate", " dbitrate %u", dbt->bitrate);
snprintf(dsp, sizeof(dsp), "%.3f", dbt->sample_point / 1000.);
print_string(PRINT_ANY, "sample_point", " dsample-point %s",
dsp);
can_print_nl_indent();
print_uint(PRINT_ANY, "tq", " dtq %u", dbt->tq);
print_uint(PRINT_ANY, "prop_seg", " dprop-seg %u",
dbt->prop_seg);
print_uint(PRINT_ANY, "phase_seg1", " dphase-seg1 %u",
dbt->phase_seg1);
print_uint(PRINT_ANY, "phase_seg2", " dphase-seg2 %u",
dbt->phase_seg2);
print_uint(PRINT_ANY, "sjw", " dsjw %u", dbt->sjw);
print_uint(PRINT_ANY, "brp", " dbrp %u", dbt->brp);
if (tb[IFLA_CAN_TDC])
can_print_tdc_opt(f, tb[IFLA_CAN_TDC]);
close_json_object();
}
if (tb[IFLA_CAN_DATA_BITTIMING_CONST] &&
!tb[IFLA_CAN_DATA_BITRATE_CONST]) {
struct can_bittiming_const *dbtc =
((void*)(((char*)(tb[IFLA_CAN_DATA_BITTIMING_CONST])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
open_json_object("data_bittiming_const");
can_print_nl_indent();
print_string(PRINT_ANY, "name", " %s:", dbtc->name);
can_print_timing_min_max("tseg1", " dtseg1",
dbtc->tseg1_min, dbtc->tseg1_max);
can_print_timing_min_max("tseg2", " dtseg2",
dbtc->tseg2_min, dbtc->tseg2_max);
can_print_timing_min_max("sjw", " dsjw", 1, dbtc->sjw_max);
can_print_timing_min_max("brp", " dbrp",
dbtc->brp_min, dbtc->brp_max);
print_uint(PRINT_ANY, "brp_inc", " dbrp_inc %u", dbtc->brp_inc);
if (tb[IFLA_CAN_TDC])
can_print_tdc_const_opt(f, tb[IFLA_CAN_TDC]);
close_json_object();
}
if (tb[IFLA_CAN_DATA_BITRATE_CONST]) {
__u32 *dbitrate_const =
((void*)(((char*)(tb[IFLA_CAN_DATA_BITRATE_CONST])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
int dbitrate_cnt =
((int)((tb[IFLA_CAN_DATA_BITRATE_CONST])->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))) /
sizeof(*dbitrate_const);
int i;
__u32 dbitrate = 0;
if (tb[IFLA_CAN_DATA_BITTIMING]) {
struct can_bittiming *dbt =
((void*)(((char*)(tb[IFLA_CAN_DATA_BITTIMING])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
dbitrate = dbt->bitrate;
}
can_print_nl_indent();
print_uint(PRINT_ANY, "data_bittiming_bitrate", " dbitrate %u",
dbitrate);
can_print_nl_indent();
open_json_array(PRINT_ANY, is_json_context() ?
"data_bitrate_const" : " [");
for (i = 0; i < dbitrate_cnt; ++i) {
if (!(i % 6) && i) {
can_print_nl_indent();
print_string(PRINT_FP,
((void *)0)
, "%s", " ");
}
print_uint(PRINT_ANY,
((void *)0)
,
i < dbitrate_cnt - 1 ? "%8u, " : "%8u",
dbitrate_const[i]);
}
close_json_array(PRINT_JSON, " ]");
}
if (tb[IFLA_CAN_TERMINATION_CONST] && tb[IFLA_CAN_TERMINATION]) {
__u16 *trm = ((void*)(((char*)(tb[IFLA_CAN_TERMINATION])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
__u16 *trm_const = ((void*)(((char*)(tb[IFLA_CAN_TERMINATION_CONST])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
int trm_cnt = ((int)((tb[IFLA_CAN_TERMINATION_CONST])->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))) /
sizeof(*trm_const);
int i;
can_print_nl_indent();
print_hu(PRINT_ANY, "termination", " termination %hu [ ", *trm);
open_json_array(PRINT_JSON, "termination_const");
for (i = 0; i < trm_cnt; ++i)
print_hu(PRINT_ANY,
((void *)0)
,
i < trm_cnt - 1 ? "%hu, " : "%hu",
trm_const[i]);
close_json_array(PRINT_JSON, " ]");
}
if (tb[IFLA_CAN_CLOCK]) {
struct can_clock *clock = ((void*)(((char*)(tb[IFLA_CAN_CLOCK])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))));
can_print_nl_indent();
print_uint(PRINT_ANY, "clock", " clock %u ", clock->freq);
}
}
|
long long can_print_opt(unsigned long long a0, unsigned long a1, struct_0 *a2, unsigned long long a3, unsigned long a4, unsigned long long a5) {
unsigned long v0;
unsigned int v1;
unsigned int v2;
unsigned int v3;
unsigned int v4;
unsigned int v5;
unsigned int v6;
unsigned int v7;
unsigned int v8;
unsigned int v9;
struct_2 *v10;
unsigned short v11[2];
unsigned int *v12;
unsigned int v13[8];
unsigned int v14[12];
unsigned int *v15;
unsigned int *v16;
unsigned int v17[8];
unsigned int v18[12];
unsigned int *v19;
unsigned int *v20;
unsigned short *v21;
unsigned short *v22;
unsigned int *v23;
char v24;
unsigned long long v26;
unsigned long long v27;
unsigned long long v28;
unsigned long long v29;
unsigned long long v30;
unsigned long long v31;
v0 = a0;
if (a2) {
if (a2->field_28) {
v10 = a2->field_28 + 4;
print_ctrlmode(0x4, v10->field_4, "ctrlmode");
if (a2->field_88)
can_print_ctrlmode_ext(a1, a2->field_88, v10->field_4);
}
if (a2->field_20) {
v6 = rta_getattr_u32(a2->field_20);
if (v6 > 5)
v26 = "UNKNOWN";
else
v26 = (&can_state_names)[v6];
print_string(0x4, "state", "state %s ", v26);
}
if (a2->field_40) {
*(&v11) = a2->field_40 + 4;
open_json_object("berr_counter");
print_uint(0x4, "tx", "(berr-counter tx %u", v11[0]);
print_uint(0x4, "rx", " rx %u) ", v11[1]);
close_json_object(0x4, "rx", " rx %u) ", a3, a4, a5);
}
if (a2->field_30) {
v12 = a2->field_30 + 4;
print_uint(0x4, "restart_ms", "restart-ms %u ", *(v12));
}
if (a2->field_8 && !a2->field_68) {
*(&v13[0]) = a2->field_8 + 4;
open_json_object("bittiming");
can_print_nl_indent();
print_uint(0x4, "bitrate", " bitrate %u", v13[0]);
snprintf(&v24, 0x6, "%.3f", v13[0]);
print_string(0x4, "sample_point", " sample-point %s", &v24);
can_print_nl_indent();
print_uint(0x4, "tq", " tq %u", v13[2]);
print_uint(0x4, "prop_seg", " prop-seg %u", v13[3]);
print_uint(0x4, "phase_seg1", " phase-seg1 %u", v13[4]);
print_uint(0x4, "phase_seg2", " phase-seg2 %u", v13[5]);
print_uint(0x4, "sjw", " sjw %u", v13[6]);
print_uint(0x4, "brp", " brp %u", v13[7]);
close_json_object(0x4, "brp", " brp %u", a3, a4, a5);
}
if (a2->field_10 && !a2->field_68) {
*(&v14[0]) = a2->field_10 + 4;
open_json_object("bittiming_const");
can_print_nl_indent();
print_string(0x4, "name", " %s:", v14);
can_print_timing_min_max("tseg1", " tseg1", v14[4], v14[5], a4, a5);
can_print_timing_min_max("tseg2", " tseg2", v14[6], v14[7], a4, a5);
can_print_timing_min_max("sjw", " sjw", 0x1, v14[8], a4, a5);
can_print_timing_min_max("brp", " brp", v14[9], v14[10], a4, a5);
print_uint(0x4, "brp_inc", " brp_inc %u", v14[11]);
close_json_object(0x4, "brp_inc", " brp_inc %u", a3, a4, a5);
}
if (a2->field_68) {
v15 = &a2->field_68[2];
v7 = a2->field_68->field_0 - 4 >> 2;
v2 = 0;
if (a2->field_8) {
v16 = a2->field_8 + 4;
v2 = *(v16);
}
can_print_nl_indent();
print_uint(0x4, "bittiming_bitrate", " bitrate %u", v2);
can_print_nl_indent();
if (is_json_context())
v27 = "bitrate_const";
else
v27 = " [";
open_json_array(0x4, v27, " bitrate %u");
for (v1 = 0; v1 < v7; v1 += 1) {
if (!v1 - ((((v1 * 715827883 >> 32) - (v1 >> 31)) << 1) + ((v1 * 715827883 >> 32) - (v1 >> 31)) << 1) && v1) {
can_print_nl_indent();
print_string(0x1, 0x0, "%s", " ");
}
if (v1 >= v7 - 1)
v28 = "%8u";
else
v28 = "%8u, ";
print_uint(0x4, 0x0, v28, v15[v1]);
}
close_json_array(0x2, " ]");
}
if (a2->field_48 && !a2->field_70) {
*(&v17[0]) = a2->field_48 + 4;
open_json_object("data_bittiming");
can_print_nl_indent();
print_uint(0x4, "bitrate", " dbitrate %u", v17[0]);
snprintf(&v24, 0x6, "%.3f", v17[0]);
print_string(0x4, "sample_point", " dsample-point %s", &v24);
can_print_nl_indent();
print_uint(0x4, "tq", " dtq %u", v17[2]);
print_uint(0x4, "prop_seg", " dprop-seg %u", v17[3]);
print_uint(0x4, "phase_seg1", " dphase-seg1 %u", v17[4]);
print_uint(0x4, "phase_seg2", " dphase-seg2 %u", v17[5]);
print_uint(0x4, "sjw", " dsjw %u", v17[6]);
print_uint(0x4, "brp", " dbrp %u", v17[7]);
if (a2[128102389400760774].field_20)
can_print_tdc_opt(a1, a2[128102389400760774].field_20, a2[128102389400760774].field_20, a3, a4, a5);
close_json_object(a0, a1, v10->field_4, a3, a4, a5);
}
if (a2->field_50 && !a2->field_70) {
*(&v18[0]) = a2->field_50 + 4;
open_json_object("data_bittiming_const");
can_print_nl_indent();
print_string(0x4, "name", " %s:", v18);
can_print_timing_min_max("tseg1", " dtseg1", v18[4], v18[5], a4, a5);
can_print_timing_min_max("tseg2", " dtseg2", v18[6], v18[7], a4, a5);
can_print_timing_min_max("sjw", " dsjw", 0x1, v18[8], a4, a5);
can_print_timing_min_max("brp", " dbrp", v18[9], v18[10], a4, a5);
print_uint(0x4, "brp_inc", " dbrp_inc %u", v18[11]);
if (a2[128102389400760774].field_20)
can_print_tdc_const_opt(a1, a2[128102389400760774].field_20, a2[128102389400760774].field_20, a3, a4, a5);
close_json_object(a0, a1, v10->field_4, a3, a4, a5);
}
if (a2->field_70) {
v19 = &a2->field_70[2];
v8 = a2->field_70->field_0 - 4 >> 2;
v4 = 0;
if (a2->field_48) {
v20 = a2->field_48 + 4;
v4 = *(v20);
}
can_print_nl_indent();
print_uint(0x4, "data_bittiming_bitrate", " dbitrate %u", v4);
can_print_nl_indent();
if (is_json_context())
v29 = "data_bitrate_const";
else
v29 = " [";
open_json_array(0x4, v29, " dbitrate %u");
for (v3 = 0; v3 < v8; v3 += 1) {
if (!v3 - ((((v3 * 715827883 >> 32) - (v3 >> 31)) << 1) + ((v3 * 715827883 >> 32) - (v3 >> 31)) << 1) && v3) {
can_print_nl_indent();
print_string(0x1, 0x0, "%s", " ");
}
if (v3 < v8 - 1)
v30 = "%8u, ";
else
v30 = "%8u";
print_uint(0x4, 0x0, v30, v19[v3]);
}
close_json_array(0x2, " ]");
}
if (a2->field_60 && a2->field_58) {
v21 = a2->field_58 + 4;
v22 = &a2->field_60[2].field_0;
v9 = a2->field_60->field_0 - 4 >> 1;
can_print_nl_indent();
print_hu(0x4, "termination", " termination %hu [ ", *(v21));
open_json_array(0x2, "termination_const", " termination %hu [ ");
for (v5 = 0; v5 < v9; v5 += 1) {
if (v5 < v9 - 1)
v31 = "%hu, ";
else
v31 = "%hu";
print_hu(0x4, 0x0, v31, v22[v5]);
}
close_json_array(0x2, " ]");
}
if (a2->field_18) {
v23 = a2->field_18 + 4;
can_print_nl_indent();
print_uint(0x4, "clock", " clock %u ", *(v23));
}
}
return 0;
}
|
static void Decrypt(small *r,const Fq *c,const small *f,const small *ginv)
{
Fq cf[761];
Fq cf3[761];
small e[761];
small ev[761];
int mask;
int i;
Rq_mult_small(cf,c,f);
Rq_mult3(cf3,cf);
R3_fromRq(e,cf3);
R3_mult(ev,e,ginv);
mask = Weightw_mask(ev);
for (i = 0;i < 286;++i) r[i] = ((ev[i]^1)&~mask)^1;
for (i = 286;i < 761;++i) r[i] = ev[i]&~mask;
}
|
void Decrypt(char *a0, unsigned short *a1, unsigned long long a2, char *a3) {
unsigned int v0;
unsigned int v1;
char v2;
unsigned long long v3;
char v4;
char v5;
char v6;
char v7;
unsigned long long *v9;
unsigned long long v10;
v3 = *(&v3);
Rq_mult_small(&v2, a1, a2);
Rq_mult3(&v4, &v2);
R3_fromRq(&v5, &v4);
R3_mult(&v6, &v5, a3);
v1 = Weightw_mask(&v6);
for (v0 = 0; v0 <= 285; v0 = __addvsi3(v0, 0x1, ((&v6)[v0] ^ 1) & !(v1) ^ 1)) {
a0[v0] = ((&v6)[v0] ^ 1) & !(v1) ^ 1;
}
for (v0 = 286; v0 <= 760; v0 = __addvsi3(v0, 0x1, (&v6)[v0] & !(v1))) {
a0[v0] = (&v6)[v0] & !(v1);
}
v10 = *(&v7) ^ v9[5];
return;
}
|
int
rl_vi_column (int count, int key)
{
if (count > rl_end)
rl_end_of_line (1, key);
else
{
rl_point = 0;
rl_point = _rl_forward_char_internal (count - 1);
}
return (0);
}
|
long long rl_vi_column(unsigned long a0, unsigned long a1) {
if (a0 > rl_end) {
rl_end_of_line(0x1, a1);
} else {
rl_point = 0;
rl_point = _rl_forward_char_internal(a0 - 1);
}
return 0;
}
|
int main (int argc, char **argv)
{
Prog = Basename (argv[0]);
log_set_progname(Prog);
log_set_logfd(
stderr
);
(void) setlocale (
6
, "");
(void) bindtextdomain ("shadow", "/usr/share/locale");
(void) textdomain ("shadow");
process_root_flag ("-R", argc, argv);
prefix = process_prefix_flag ("-P", argc, argv);
openlog("usermod", (
0x01
),
(10<<3)
);
sys_ngroups = sysconf (
_SC_NGROUPS_MAX
);
user_groups = (char **) malloc (sizeof (char *) * (1 + sys_ngroups));
user_groups[0] = (char *) 0;
is_shadow_pwd = spw_file_present ();
is_shadow_grp = sgr_file_present ();
is_sub_uid = sub_uid_file_present ();
is_sub_gid = sub_gid_file_present ();
process_flags (argc, argv);
if ( (prefix[0] == '\0') && (uflg || lflg || dflg
|| Vflg || Wflg
)
&& (user_busy (user_name, user_id) != 0)) {
exit (8);
}
open_files ();
if ( cflg || dflg || eflg || fflg || gflg || Lflg || lflg || pflg
|| sflg || uflg || Uflg) {
usr_update ();
}
if (Gflg || lflg) {
grp_update ();
}
if (Vflg) {
struct ulong_range_list_entry *ptr;
for (ptr = del_sub_uids; ptr !=
((void *)0)
; ptr = ptr->next) {
unsigned long count = ptr->range.last - ptr->range.first + 1;
if (sub_uid_remove(user_name, ptr->range.first, count) == 0) {
fprintf (
stderr
,
gettext ("%s: failed to remove uid range %lu-%lu from '%s'\n"),
Prog, ptr->range.first, ptr->range.last,
sub_uid_dbname ());
fail_exit (16);
}
}
}
if (vflg) {
struct ulong_range_list_entry *ptr;
for (ptr = add_sub_uids; ptr !=
((void *)0)
; ptr = ptr->next) {
unsigned long count = ptr->range.last - ptr->range.first + 1;
if (sub_uid_add(user_name, ptr->range.first, count) == 0) {
fprintf (
stderr
,
gettext ("%s: failed to add uid range %lu-%lu to '%s'\n"),
Prog, ptr->range.first, ptr->range.last,
sub_uid_dbname ());
fail_exit (16);
}
}
}
if (Wflg) {
struct ulong_range_list_entry *ptr;
for (ptr = del_sub_gids; ptr !=
((void *)0)
; ptr = ptr->next) {
unsigned long count = ptr->range.last - ptr->range.first + 1;
if (sub_gid_remove(user_name, ptr->range.first, count) == 0) {
fprintf (
stderr
,
gettext ("%s: failed to remove gid range %lu-%lu from '%s'\n"),
Prog, ptr->range.first, ptr->range.last,
sub_gid_dbname ());
fail_exit (18);
}
}
}
if (wflg) {
struct ulong_range_list_entry *ptr;
for (ptr = add_sub_gids; ptr !=
((void *)0)
; ptr = ptr->next) {
unsigned long count = ptr->range.last - ptr->range.first + 1;
if (sub_gid_add(user_name, ptr->range.first, count) == 0) {
fprintf (
stderr
,
gettext ("%s: failed to add gid range %lu-%lu to '%s'\n"),
Prog, ptr->range.first, ptr->range.last,
sub_gid_dbname ());
fail_exit (18);
}
}
}
close_files ();
nscd_flush_cache ("passwd");
nscd_flush_cache ("group");
sssd_flush_cache (0x001 | 0x002);
if (mflg) {
move_home ();
}
if (lflg || uflg) {
move_mailbox ();
}
if (uflg) {
update_lastlog ();
update_faillog ();
}
if (!mflg && (uflg || gflg)) {
struct stat sb;
if (stat (dflg ? prefix_user_newhome : prefix_user_home, &sb) == 0 &&
((uflg && sb.st_uid == user_newid) || sb.st_uid == user_id)) {
if (chown_tree (dflg ? prefix_user_newhome : prefix_user_home,
user_id,
uflg ? user_newid : (uid_t)-1,
user_gid,
gflg ? user_newgid : (gid_t)-1) != 0) {
fprintf (
stderr
,
gettext ("%s: Failed to change ownership of the home directory"),
Prog);
fail_exit (12);
}
}
}
return 0;
}
|
undefined8 main(undefined4 param_1,undefined8 *param_2)
{
undefined8 uVar1;
undefined8 uVar2;
undefined8 uVar3;
int iVar4;
undefined8 uVar5;
char *pcVar6;
__uid_t _Var7;
undefined4 uVar8;
long in_FS_OFFSET;
undefined8 *local_108;
undefined8 *local_100;
undefined8 *local_f8;
undefined8 *local_f0;
stat local_c8;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
Prog = Basename(*param_2);
log_set_progname(Prog);
log_set_logfd(stderr);
setlocale(6,"");
bindtextdomain("shadow","/usr/share/locale");
textdomain("shadow");
process_root_flag(&DAT_00107749,param_1,param_2);
prefix = (undefined *)process_prefix_flag(&DAT_0010774c,param_1,param_2);
openlog("usermod",1,0x50);
sys_ngroups = sysconf(3);
user_groups = (undefined8 *)malloc((sys_ngroups + 1) * 8);
*user_groups = 0;
is_shadow_pwd = spw_file_present();
is_shadow_grp = sgr_file_present();
is_sub_uid = sub_uid_file_present();
is_sub_gid = sub_gid_file_present();
process_flags(param_1,param_2);
if (((*prefix == '\0') &&
((((uflg != '\0' || (lflg != '\0')) || (dflg != '\0')) || ((Vflg != '\0' || (Wflg != '\0')))))
) && (iVar4 = user_busy(user_name,user_id), iVar4 != 0)) {
exit(8);
}
open_files();
if (((((cflg != '\0') || (dflg != '\0')) ||
((eflg != '\0' || (((fflg != '\0' || (gflg != '\0')) || (Lflg != '\0')))))) ||
((lflg != '\0' || (pflg != '\0')))) || ((sflg != '\0' || ((uflg != '\0' || (Uflg != '\0'))))))
{
usr_update();
}
if ((Gflg != '\0') || (lflg != '\0')) {
grp_update();
}
if (Vflg != '\0') {
for (local_108 = del_sub_uids; local_108 != (undefined8 *)0x0;
local_108 = (undefined8 *)*local_108) {
iVar4 = sub_uid_remove(user_name,local_108[1] & 0xffffffff,(local_108[2] - local_108[1]) + 1);
if (iVar4 == 0) {
uVar5 = sub_uid_dbname();
uVar3 = Prog;
uVar1 = local_108[2];
uVar2 = local_108[1];
pcVar6 = (char *)gettext("%s: failed to remove uid range %lu-%lu from \'%s\'\n");
fprintf(stderr,pcVar6,uVar3,uVar2,uVar1,uVar5);
fail_exit(0x10);
}
}
}
if (vflg != '\0') {
for (local_100 = add_sub_uids; local_100 != (undefined8 *)0x0;
local_100 = (undefined8 *)*local_100) {
iVar4 = sub_uid_add(user_name,local_100[1] & 0xffffffff,(local_100[2] - local_100[1]) + 1);
if (iVar4 == 0) {
uVar5 = sub_uid_dbname();
uVar3 = Prog;
uVar1 = local_100[2];
uVar2 = local_100[1];
pcVar6 = (char *)gettext("%s: failed to add uid range %lu-%lu to \'%s\'\n");
fprintf(stderr,pcVar6,uVar3,uVar2,uVar1,uVar5);
fail_exit(0x10);
}
}
}
if (Wflg != '\0') {
for (local_f8 = del_sub_gids; local_f8 != (undefined8 *)0x0; local_f8 = (undefined8 *)*local_f8)
{
iVar4 = sub_gid_remove(user_name,local_f8[1] & 0xffffffff,(local_f8[2] - local_f8[1]) + 1);
if (iVar4 == 0) {
uVar5 = sub_gid_dbname();
uVar3 = Prog;
uVar1 = local_f8[2];
uVar2 = local_f8[1];
pcVar6 = (char *)gettext("%s: failed to remove gid range %lu-%lu from \'%s\'\n");
fprintf(stderr,pcVar6,uVar3,uVar2,uVar1,uVar5);
fail_exit(0x12);
}
}
}
if (wflg != '\0') {
for (local_f0 = add_sub_gids; local_f0 != (undefined8 *)0x0; local_f0 = (undefined8 *)*local_f0)
{
iVar4 = sub_gid_add(user_name,local_f0[1] & 0xffffffff,(local_f0[2] - local_f0[1]) + 1);
if (iVar4 == 0) {
uVar5 = sub_gid_dbname();
uVar3 = Prog;
uVar1 = local_f0[2];
uVar2 = local_f0[1];
pcVar6 = (char *)gettext("%s: failed to add gid range %lu-%lu to \'%s\'\n");
fprintf(stderr,pcVar6,uVar3,uVar2,uVar1,uVar5);
fail_exit(0x12);
}
}
}
close_files();
nscd_flush_cache("passwd");
nscd_flush_cache("group");
sssd_flush_cache(3);
if (mflg != '\0') {
move_home();
}
if ((lflg != '\0') || (uflg != '\0')) {
move_mailbox();
}
if (uflg != '\0') {
update_lastlog();
update_faillog();
}
if ((mflg != '\x01') && ((uflg != '\0' || (gflg != '\0')))) {
pcVar6 = prefix_user_home;
if (dflg != '\0') {
pcVar6 = prefix_user_newhome;
}
iVar4 = stat(pcVar6,&local_c8);
if ((iVar4 == 0) &&
(((uflg != '\0' && (local_c8.st_uid == user_newid)) || (local_c8.st_uid == user_id)))) {
uVar8 = user_newgid;
if (gflg == '\0') {
uVar8 = 0xffffffff;
}
_Var7 = user_newid;
if (uflg == '\0') {
_Var7 = 0xffffffff;
}
pcVar6 = prefix_user_home;
if (dflg != '\0') {
pcVar6 = prefix_user_newhome;
}
iVar4 = chown_tree(pcVar6,user_id,_Var7,user_gid,uVar8);
uVar1 = Prog;
if (iVar4 != 0) {
pcVar6 = (char *)gettext("%s: Failed to change ownership of the home directory");
fprintf(stderr,pcVar6,uVar1);
fail_exit(0xc);
}
}
}
if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
return 0;
}
__stack_chk_fail();
}
|
static int recurse_dir(char *base_path, char *name, const char *netns)
{
char path[
4096
];
struct dirent *de;
struct stat fstat;
int rc;
DIR *d;
d = opendir(base_path);
if (!d)
return -1;
while ((de = readdir(d)) !=
((void *)0)
) {
if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
continue;
if (!strcmp(de->d_name, "vrf")) {
const char *pdir = strrchr(base_path, '/');
if (*netns == '\0' ||
(pdir && !strcmp(pdir+1, netns)))
read_cgroup_pids(base_path, name);
continue;
}
if (snprintf(path, sizeof(path), "%s/%s",
base_path, de->d_name) >= sizeof(path))
continue;
if (lstat(path, &fstat) < 0)
continue;
if (
((((
fstat.st_mode
)) & 0170000) == (0040000))
) {
rc = recurse_dir(path, name, netns);
if (rc != 0)
goto out;
}
}
rc = 0;
out:
closedir(d);
return rc;
}
|
int recurse_dir(unsigned long a0, unsigned int a1, char *a2) {
unsigned int v0;
unsigned long long v1;
unsigned long v2;
unsigned long v3;
char v4;
char v5;
char v6;
unsigned long long v7;
unsigned int v9;
v7 = *(&v7);
v1 = opendir(a0);
if (!v1) {
v9 = -1;
return v9;
}
while (true) {
v2 = readdir64(v1);
if (!v2) {
v0 = 0;
break;
} else {
if (!(strcmp(v2 + 19, ".")) || !(strcmp(v2 + 19, "..")))
continue;
if (!strcmp(v2 + 19, "vrf")) {
v3 = strrchr(a0, 0x2f);
if (!*(a2) || v3 && !strcmp(v3 + 1, a2))
read_cgroup_pids(a0, a1);
} else if (snprintf(&v6, 0x1000, "%s/%s", a0, (v2 + 19)) <= 4095 && lstat64(&v6, &v4) >= 0 && (*(&v5) & 0xf000) == 0x4000 && (v0 = recurse_dir(&v6, a1, a2), v0)) {
break;
}
}
}
closedir(v1);
v9 = v0;
return v9;
}
|
static void dynaFileFreeCache(instanceData *__restrict__ const pData)
{
((void) (0))
;
dynaFileFreeCacheEntries(pData);
if(pData->dynCache !=
((void *)0)
)
free(pData->dynCache);
}
|
void dynaFileFreeCache(struct_0 *a0) {
unsigned long long v1;
unsigned long long v2;
dynaFileFreeCacheEntries(a0);
v1 = a0->field_150;
if (a0->field_150)
v2 = free(a0->field_150);
return;
}
|
static void
printVersion(void)
{
printf("rsyslogd " "8.2210.0" " (aka %4d.%2.2d) compiled with:\n",
2000 + 22, 10);
printf("\tPLATFORM:\t\t\t\t%s\n", "x86_64-pc-linux-gnu");
printf("\tPLATFORM (lsb_release -d):\t\t%s\n", "");
printf("\tFEATURE_REGEXP:\t\t\t\tYes\n");
printf("\tGSSAPI Kerberos 5 support:\t\tNo\n");
printf("\tFEATURE_DEBUG (debug build, slow code):\tNo\n");
printf("\t32bit Atomic operations supported:\tYes\n");
printf("\t64bit Atomic operations supported:\tYes\n");
printf("\tmemory allocator:\t\t\tsystem default\n");
printf("\tRuntime Instrumentation (slow code):\tNo\n");
printf("\tuuid support:\t\t\t\tYes\n");
printf("\tsystemd support:\t\t\tNo\n");
printf("\tConfig file:\t\t\t\t" "/etc/rsyslog.conf" "\n");
printf("\tPID file:\t\t\t\t" "/var/run/rsyslogd.pid" "%s\n", "/var/run/rsyslogd.pid"[0]!='/'?
"(relative to global workingdirectory)":"");
printf("\tNumber of Bits in RainerScript integers: 64\n");
printf("\nSee https:
}
|
void printVersion(void)
{
printf("rsyslogd 8.2210.0 (aka %4d.%2.2d) compiled with:\n",0x7e6,10);
printf("\tPLATFORM:\t\t\t\t%s\n","x86_64-pc-linux-gnu");
printf("\tPLATFORM (lsb_release -d):\t\t%s\n",&DAT_00104a79);
printf("\tFEATURE_REGEXP:\t\t\t\tYes\n");
printf("\tGSSAPI Kerberos 5 support:\t\tNo\n");
printf("\tFEATURE_DEBUG (debug build, slow code):\tNo\n");
printf("\t32bit Atomic operations supported:\tYes\n");
printf("\t64bit Atomic operations supported:\tYes\n");
printf("\tmemory allocator:\t\t\tsystem default\n");
printf("\tRuntime Instrumentation (slow code):\tNo\n");
printf("\tuuid support:\t\t\t\tYes\n");
printf("\tsystemd support:\t\t\tNo\n");
printf("\tConfig file:\t\t\t\t/etc/rsyslog.conf\n");
printf("\tPID file:\t\t\t\t/var/run/rsyslogd.pid%s\n",&DAT_00104a79);
printf("\tNumber of Bits in RainerScript integers: 64\n");
printf("\nSee https:
return;
}
|
void unlink_user(cron_db * db, user * u) {
if (u->prev ==
((void *)0)
)
db->head = u->next;
else
u->prev->next = u->next;
if (u->next ==
((void *)0)
)
db->tail = u->prev;
else
u->next->prev = u->prev;
}
|
void unlink_user(unsigned long long a0[2], struct_0 *a1) {
unsigned long long v1[2];
struct_1 *v2;
if (!a1->field_8)
a0[0] = a1->field_0;
else
a1->field_8->field_0 = a1->field_0;
if (!a1->field_0) {
v1 = a0;
a0[1] = a1->field_8;
return;
}
v2 = a1->field_0;
a1->field_0->field_8 = a1->field_8;
return;
}
|
static int gz_zero(state, len)
gz_statep state;
off64_t len;
{
int first;
unsigned n;
z_streamp strm = &(state->strm);
if (strm->avail_in && gz_comp(state, 0) == -1)
return -1;
first = 1;
while (len) {
n = (sizeof(int) == sizeof(off64_t) && (state->size) > 0x7fffffff) || (off64_t)state->size > len ?
(unsigned)len : state->size;
if (first) {
memset(state->in, 0, n);
first = 0;
}
strm->avail_in = n;
strm->next_in = state->in;
state->x.pos += n;
if (gz_comp(state, 0) == -1)
return -1;
len -= n;
}
return 0;
}
|
undefined8 gz_zero(long param_1,long param_2)
{
bool bVar1;
int iVar2;
uint uVar3;
long local_28;
if ((*(int *)(param_1 + 0x88) != 0) && (iVar2 = gz_comp(param_1,0), iVar2 == -1)) {
return 0xffffffff;
}
bVar1 = true;
local_28 = param_2;
while( true ) {
if (local_28 == 0) {
return 0;
}
if (local_28 < (long)(ulong)*(uint *)(param_1 + 0x28)) {
uVar3 = (uint)local_28;
}
else {
uVar3 = *(uint *)(param_1 + 0x28);
}
if (bVar1) {
memset(*(void **)(param_1 + 0x30),0,(ulong)uVar3);
bVar1 = false;
}
*(uint *)(param_1 + 0x88) = uVar3;
*(undefined8 *)(param_1 + 0x80) = *(undefined8 *)(param_1 + 0x30);
*(ulong *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + (ulong)uVar3;
iVar2 = gz_comp(param_1,0);
if (iVar2 == -1) break;
local_28 = local_28 - (ulong)uVar3;
}
return 0xffffffff;
}
|
static void
usage (void)
{
char const * const *p;
printf (gettext ("Usage: %s [OPTION]... FILES\n"), program_name);
printf ("%s\n\n", gettext ("Compare FILES line by line."));
fputs_unlocked (gettext ("Mandatory arguments to long options are mandatory for short options too.\n"),
stdout
)
;
for (p = option_help_msgid; *p; p++)
{
if (!**p)
putchar_unlocked ('\n');
else
{
char const *msg = gettext (*p);
char const *nl;
while ((nl = strchr (msg, '\n')))
{
int msglen = nl + 1 - msg;
((void) sizeof ((
msglen < 4096
) ? 1 : 0), __extension__ ({ if (
msglen < 4096
) ; else __assert_fail (
"msglen < 4096"
, "diff.c", 1016, __extension__ __PRETTY_FUNCTION__); }))
;
printf (" %.*s", msglen, msg);
msg = nl + 1;
}
printf (&" %s\n"[2 * (*msg != ' ' && *msg != '-')], msg);
}
}
emit_bug_reporting_address ();
}
|
void usage() {
unsigned int v0;
unsigned long long v1;
char *v2;
unsigned long v3;
unsigned long v5;
unsigned long long v6;
printf(gettext("Usage: %s [OPTION]... FILES\n"));
printf("%s\n\n", gettext("Compare FILES line by line."));
fputs_unlocked(gettext("Mandatory arguments to long options are mandatory for short options too.\n"), stdout);
for (v1 = &option_help_msgid; *(v1); v1 += 8) {
if (!*(*(v1))) {
putchar_unlocked(0xa);
} else {
v2 = gettext(*(v1));
while (true) {
v3 = strchr(v2, 0xa);
if (!v3)
break;
v0 = (1 + v3 + -0x1 * v2);
if (v0 > 4095)
__assert_fail();
printf(" %.*s", v0);
v2 = v3 + 1;
}
if (*(v2) != 32 && *(v2) != 45)
v5 = 1;
if (*(v2) == 45 || *(v2) == 32)
v5 = 0;
printf((4214094 + 2 * v5));
}
}
v6 = emit_bug_reporting_address();
return;
}
|
static
_Bool
is_module_filename(const char *name)
{
struct stat st;
if (stat(name, &st) == 0 &&
((((
st.st_mode
)) & 0170000) == (0100000))
&&
path_ends_with_kmod_ext(name, strlen(name)))
return
1
;
return
0
;
}
|
int is_module_filename(char *a0) {
char v0;
char v1;
unsigned int v3;
if (!stat(a0, &v0) && (*(&v1) & 0xf000) == 0x8000) {
v3 = strlen(a0);
if (path_ends_with_kmod_ext(a0, v3, v3)) {
v3 = 1;
goto LABEL_40148e;
}
}
v3 = 0;
LABEL_40148e:
return v3;
}
|
) {
sshlog("kex.c", __func__, 168, 0, SYSLOG_LEVEL_ERROR,
((void *)0)
, "Unsupported KEX algorithm \"%.100s\"", p);
free(s);
return 0;
}
|
(*(long *)(local_20 + 8 + ((ulong)*(uint *)(local_20 + 0x38) + 0x18) * 8) != 0)) {
uVar2 = (**(code **)(local_20 + 8 + ((ulong)*(uint *)(local_20 + 0x38) + 0x18) * 8))
(param_3);
}
|
static void
set_process_rdomain(struct ssh *ssh, const char *name)
{
sshfatal("sshd.c", __func__, 1483, 0, SYSLOG_LEVEL_FATAL,
((void *)0)
, "Unable to set routing domain: not supported in this platform");
}
|
long set_process_rdomain()
{
sshfatal(
"sshd.c",
"set_process_rdomain",
1483LL,
0LL,
1LL,
0LL,
"Unable to set routing domain: not supported in this platform");
return accumulate_host_timing_secret((long)"sshd.c", (long)"set_process_rdomain");
}
|
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 *param_1)
{
FILE *__stream;
int iVar1;
char *pcVar2;
char *pcVar3;
long in_FS_OFFSET;
char *local_b8;
char **local_b0;
char *local_98;
char *local_90;
char *local_88;
char *local_80;
char *local_78;
char *local_70;
char *local_68;
char *local_60;
char *local_58;
char *local_50;
char *local_48;
char *local_40;
undefined8 local_38;
undefined8 local_30;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_98 = "[";
local_90 = "test invocation";
local_88 = "coreutils";
local_80 = "Multi-call invocation";
local_78 = "sha224sum";
local_70 = "sha2 utilities";
local_68 = "sha256sum";
local_60 = "sha2 utilities";
local_58 = "sha384sum";
local_50 = "sha2 utilities";
local_48 = "sha512sum";
local_40 = "sha2 utilities";
local_38 = 0;
local_30 = 0;
local_b0 = &local_98;
while ((*local_b0 != (char *)0x0 && (iVar1 = strcmp(param_1,*local_b0), iVar1 != 0))) {
local_b0 = local_b0 + 2;
}
local_b8 = param_1;
if (local_b0[1] != (char *)0x0) {
local_b8 = local_b0[1];
}
pcVar2 = (char *)gettext("\n%s online help: <%s>\n");
printf(pcVar2,"GNU coreutils","https:
pcVar2 = setlocale(5,(char *)0x0);
if ((pcVar2 != (char *)0x0) && (iVar1 = strncmp(pcVar2,"en_",3), __stream = stdout, iVar1 != 0)) {
pcVar2 = (char *)gettext(
"Report any translation bugs to <https:
);
fputs_unlocked(pcVar2,__stream);
}
iVar1 = strcmp(param_1,"[");
pcVar2 = param_1;
if (iVar1 == 0) {
pcVar2 = "test";
}
pcVar3 = (char *)gettext("Full documentation <%s%s>\n");
printf(pcVar3,"https:
if (local_b8 == param_1) {
pcVar2 = " invocation";
}
else {
pcVar2 = "";
}
pcVar3 = (char *)gettext("or available locally via: info \'(coreutils) %s%s\'\n");
printf(pcVar3,local_b8,pcVar2);
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
return;
}
__stack_chk_fail();
}
|
char *remember_copied (char const *node, ino_t ino, dev_t dev)
__attribute__ ((__nonnull__ ));
char *src_to_dest_lookup (ino_t ino, dev_t dev);
typedef enum {
FADVISE_NORMAL =
0
,
FADVISE_SEQUENTIAL =
2
,
FADVISE_NOREUSE =
5
,
FADVISE_DONTNEED =
4
,
FADVISE_WILLNEED =
3
,
FADVISE_RANDOM =
1
} fadvice_t;
|
void remember_copied(void)
{
halt_baddata();
}
|
char *
tilde_expand_word (const char *filename)
{
char *dirname, *expansion, *username;
int user_len;
struct passwd *user_entry;
if (filename == 0)
return ((char *)
((void *)0)
);
if (*filename != '~')
return (strcpy ((char *)sh_xmalloc((1 + strlen (filename)), "tilde.c", 346), (filename)));
if (filename[1] == '\0' || filename[1] == '/')
{
expansion = sh_get_env_value ("HOME");
if (expansion == 0)
expansion = sh_get_home_dir ();
return (glue_prefix_and_suffix (expansion, filename, 1));
}
username = isolate_tilde_prefix (filename, &user_len);
if (tilde_expansion_preexpansion_hook)
{
expansion = (*tilde_expansion_preexpansion_hook) (username);
if (expansion)
{
dirname = glue_prefix_and_suffix (expansion, filename, user_len);
sh_xfree((username), "tilde.c", 376);
sh_xfree((expansion), "tilde.c", 377);
return (dirname);
}
}
dirname = (char *)
((void *)0)
;
user_entry = getpwnam (username);
if (user_entry == 0)
{
if (tilde_expansion_failure_hook)
{
expansion = (*tilde_expansion_failure_hook) (username);
if (expansion)
{
dirname = glue_prefix_and_suffix (expansion, filename, user_len);
sh_xfree((expansion), "tilde.c", 400);
}
}
if (dirname == 0)
dirname = strcpy ((char *)sh_xmalloc((1 + strlen (filename)), "tilde.c", 406), (filename));
}
else
dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
sh_xfree((username), "tilde.c", 413);
endpwent ();
return (dirname);
}
|
int tilde_expand_word(char a0[2]) {
char v0;
void* v1;
unsigned long long v2;
char *v3;
struct_0 *v4;
unsigned int v6;
if (!a0) {
v6 = 0;
return v6;
} else if (a0[0] == 126) {
switch (a0[1]) {
case 0: case 47:
v2 = sh_get_env_value("HOME");
if (!v2)
v2 = sh_get_home_dir();
v6 = glue_prefix_and_suffix(v2, a0, 0x1);
return v6;
default:
v3 = isolate_tilde_prefix(a0, &v0);
if (tilde_expansion_preexpansion_hook) {
v2 = *(4196424)(v3);
if (v2) {
v1 = glue_prefix_and_suffix(v2, a0, *(&v0));
sh_xfree(v3, "tilde.c", 0x178);
sh_xfree(v2, "tilde.c", 0x179);
v6 = v1;
return v6;
}
}
v1 = 0;
v4 = &getpwnam(v3)->pw_name;
if (!v4) {
if (tilde_expansion_failure_hook) {
v2 = *(4196432)(v3);
if (v2) {
v1 = glue_prefix_and_suffix(v2, a0, *(&v0));
sh_xfree(v2, "tilde.c", 0x190);
}
}
if (!v1) {
v1 = strcpy(sh_xmalloc(strlen(a0) + 1, "tilde.c", 0x196), a0);
break;
}
} else {
v1 = glue_prefix_and_suffix(v4->field_20, a0, *(&v0));
break;
}
sh_xfree(v3, "tilde.c", 0x19d);
endpwent();
v6 = v1;
return v6;
}
} else {
v6 = strcpy(sh_xmalloc(strlen(a0) + 1, "tilde.c", 0x15a), a0);
return v6;
}
}
|
SHELL_VAR **
map_over_funcs (function)
sh_var_map_func_t *function;
{
VARLIST *vlist;
SHELL_VAR **ret;
if (shell_functions == 0 || ((shell_functions) ? (shell_functions)->nentries : 0) == 0)
return ((SHELL_VAR **)
((void *)0)
);
vlist = vlist_alloc (((shell_functions) ? (shell_functions)->nentries : 0));
flatten (shell_functions, function, vlist, 0);
ret = vlist->list;
sh_xfree((vlist), "variables.c", 4260);
return ret;
}
|
int map_over_funcs(unsigned long long a0) {
unsigned long long *v0;
unsigned long v1;
unsigned int v3;
if (!shell_functions) {
v3 = 0;
return v3;
} else if (!shell_functions) {
v3 = 0;
return v3;
} else if (!*((shell_functions + 12))) {
v3 = 0;
return v3;
} else {
v3 = (!shell_functions ? *((shell_functions + 12)) : 0);
v0 = vlist_alloc(v3);
flatten(shell_functions, a0, v0, 0x0);
v1 = *(v0);
sh_xfree(v0, "variables.c", 0x10a4);
v3 = v1;
return v3;
}
}
|
static void
bash_directory_expansion (dirname)
char **dirname;
{
char *d, *nd;
d = (char *)strcpy (sh_xmalloc((1 + strlen (*dirname)), "bashline.c", 3263), (*dirname));
if ((rl_directory_rewrite_hook) && (*rl_directory_rewrite_hook) (&d))
{
sh_xfree((*dirname), "bashline.c", 3267);
*dirname = d;
}
else if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d))
{
sh_xfree((*dirname), "bashline.c", 3272);
*dirname = d;
}
else if (rl_completion_found_quote)
{
nd = bash_dequote_filename (d, rl_completion_quote_character);
sh_xfree((*dirname), "bashline.c", 3278);
sh_xfree((d), "bashline.c", 3279);
*dirname = nd;
}
else
sh_xfree((d), "bashline.c", 3283);
}
|
void bash_directory_expansion(unsigned long long *a0) {
char *v0;
unsigned long v1;
char v2;
unsigned long long *v4;
unsigned long long v5;
v0 = strcpy(sh_xmalloc(strlen(*(a0)) + 1, "bashline.c", 0xcbf), *(a0));
if (rl_directory_rewrite_hook && *(5244376)(&v0)) {
sh_xfree(*(a0), "bashline.c", 0xcc3);
*(a0) = v0;
goto LABEL_406c8f;
}
if (rl_directory_completion_hook && *(5244384)(&v0)) {
sh_xfree(*(a0), "bashline.c", 0xcc8);
*(a0) = v0;
goto LABEL_406c8f;
}
if (!rl_completion_found_quote) {
sh_xfree(v0, "bashline.c", 0xcd3);
} else {
v1 = bash_dequote_filename(v0, rl_completion_quote_character);
sh_xfree(*(a0), "bashline.c", 0xcce);
sh_xfree(v0, "bashline.c", 0xccf);
*(a0) = v1;
}
LABEL_406c8f:
v5 = *(&v2) ^ v4[5];
return;
}
|
char **
brace_expand (text)
char *text;
{
register int start;
size_t tlen;
char *preamble, *postamble, *amble;
size_t alen;
char **tack, **result;
int i, j, c, c1;
mbstate_t state; memset (&state, '\0', sizeof (mbstate_t));
tlen = strlen (text);
i = 0;
do
{
c = brace_gobbler (text, tlen, &i, '{');
c1 = c;
if (c)
{
start = j = i + 1;
c = brace_gobbler (text, tlen, &j, '}');
if (c == 0)
{
i++;
c = c1;
continue;
}
else
{
c = c1;
break;
}
}
else
break;
}
while (c);
preamble = (char *)sh_xmalloc((i + 1), "braces.c", 152);
if (i > 0)
strncpy (preamble, text, i);
preamble[i] = '\0';
result = (char **)sh_xmalloc((2 * sizeof (char *)), "braces.c", 157);
result[0] = preamble;
result[1] = (char *)
((void *)0)
;
if (c != '{')
return (result);
start = ++i;
c = brace_gobbler (text, tlen, &i, '}');
if (c == 0)
{
sh_xfree((preamble), "braces.c", 196);
result[0] = (char *)strcpy (sh_xmalloc((1 + strlen (text)), "braces.c", 197), (text));
return (result);
}
amble = substring (text, start, i);
alen = i - start;
memset (&state, '\0', sizeof (mbstate_t));
j = 0;
while (amble[j])
{
if (amble[j] == '\\')
{
j++;
do { if (locale_mb_cur_max > 1) { mbstate_t state_bak; size_t mblength; int _f; _f = is_basic ((amble)[j]); if (_f) mblength = 1; else if (locale_utf8locale && (((amble)[j] & 0x80) == 0)) mblength = (amble)[j] != 0; else { state_bak = state; mblength = mbrlen ((amble) + (j), (alen) - (j), &state); } if (mblength == (size_t)-2 || mblength == (size_t)-1) { state = state_bak; (j)++; } else if (mblength == 0) (j)++; else (j) += mblength; } else (j)++; } while (0);
continue;
}
if (amble[j] == brace_arg_separator)
break;
do { if (locale_mb_cur_max > 1) { mbstate_t state_bak; size_t mblength; int _f; _f = is_basic ((amble)[j]); if (_f) mblength = 1; else if (locale_utf8locale && (((amble)[j] & 0x80) == 0)) mblength = (amble)[j] != 0; else { state_bak = state; mblength = mbrlen ((amble) + (j), (alen) - (j), &state); } if (mblength == (size_t)-2 || mblength == (size_t)-1) { state = state_bak; (j)++; } else if (mblength == 0) (j)++; else (j) += mblength; } else (j)++; } while (0);
}
if (amble[j] == 0)
{
tack = expand_seqterm (amble, alen);
if (tack)
goto add_tack;
else if (text[i + 1])
{
tack = strvec_create (2);
tack[0] = (char *)strcpy (sh_xmalloc((1 + strlen (text+start-1)), "braces.c", 245), (text+start-1));
tack[0][i-start+2] = '\0';
tack[1] = (char *)0;
goto add_tack;
}
else
{
sh_xfree((amble), "braces.c", 252);
sh_xfree((preamble), "braces.c", 253);
result[0] = (char *)strcpy (sh_xmalloc((1 + strlen (text)), "braces.c", 254), (text));
return (result);
}
}
tack = expand_amble (amble, alen, 0);
add_tack:
result = array_concat (result, tack);
sh_xfree((amble), "braces.c", 263);
if (tack != result)
strvec_dispose (tack);
postamble = text + i + 1;
if (postamble && *postamble)
{
tack = brace_expand (postamble);
result = array_concat (result, tack);
if (tack != result)
strvec_dispose (tack);
}
return (result);
}
|
char ** brace_expand(char *param_1)
{
int iVar1;
int iVar2;
size_t sVar3;
char *pcVar4;
long in_FS_OFFSET;
int local_90;
int local_8c;
int local_88;
int local_84;
int local_80;
int local_7c;
char **local_78;
char **local_70;
ulong local_68;
ulong local_60;
size_t local_58;
char *local_50;
long local_48;
long local_40;
char *local_38;
mbstate_t local_30;
mbstate_t local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
memset(&local_30,0,8);
local_58 = strlen(param_1);
local_90 = 0;
do {
local_88 = brace_gobbler(param_1,local_58,&local_90,0x7b);
local_84 = local_88;
if (local_88 == 0) break;
local_8c = local_90 + 1;
iVar1 = brace_gobbler(param_1,local_58,&local_8c,0x7d);
if (iVar1 != 0) break;
local_90 = local_90 + 1;
local_88 = local_84;
} while (local_84 != 0);
local_88 = local_84;
local_50 = (char *)sh_xmalloc((long)(local_90 + 1),"braces.c",0x98);
if (0 < local_90) {
strncpy(local_50,param_1,(long)local_90);
}
local_50[local_90] = '\0';
local_70 = (char **)sh_xmalloc(0x10,"braces.c",0x9d);
*local_70 = local_50;
local_70[1] = (char *)0x0;
if (local_88 == 0x7b) {
iVar1 = local_90 + 1;
local_90 = iVar1;
local_88 = brace_gobbler(param_1,local_58,&local_90,0x7d);
if (local_88 == 0) {
sh_xfree(local_50,"braces.c",0xc4);
sVar3 = strlen(param_1);
pcVar4 = (char *)sh_xmalloc(sVar3 + 1,"braces.c",0xc5);
pcVar4 = strcpy(pcVar4,param_1);
*local_70 = pcVar4;
}
else {
local_48 = substring(param_1,iVar1,local_90);
local_40 = (long)(local_90 - iVar1);
memset(&local_30,0,8);
local_8c = 0;
while (*(char *)(local_48 + local_8c) != '\0') {
if (*(char *)(local_48 + local_8c) == '\\') {
iVar2 = local_8c + 1;
if (locale_mb_cur_max < 2) {
local_8c = local_8c + 2;
}
else {
local_8c = iVar2;
local_7c = is_basic((int)*(char *)(local_48 + iVar2));
if (local_7c == 0) {
if ((locale_utf8locale == 0) || (*(char *)(local_48 + local_8c) < '\0')) {
local_28 = local_30;
local_68 = mbrlen((char *)(local_8c + local_48),local_40 - local_8c,&local_30);
}
else {
local_68 = (ulong)(*(char *)(local_48 + local_8c) != '\0');
}
}
else {
local_68 = 1;
}
if ((local_68 == 0xfffffffffffffffe) || (local_68 == 0xffffffffffffffff)) {
local_30 = local_28;
local_8c = local_8c + 1;
}
else if (local_68 == 0) {
local_8c = local_8c + 1;
}
else {
local_8c = local_8c + (int)local_68;
}
}
}
else {
if (*(char *)(local_48 + local_8c) == ',') break;
if (locale_mb_cur_max < 2) {
local_8c = local_8c + 1;
}
else {
local_80 = is_basic((int)*(char *)(local_48 + local_8c));
if (local_80 == 0) {
if ((locale_utf8locale == 0) || (*(char *)(local_48 + local_8c) < '\0')) {
local_28 = local_30;
local_60 = mbrlen((char *)(local_8c + local_48),local_40 - local_8c,&local_30);
}
else {
local_60 = (ulong)(*(char *)(local_48 + local_8c) != '\0');
}
}
else {
local_60 = 1;
}
if ((local_60 == 0xfffffffffffffffe) || (local_60 == 0xffffffffffffffff)) {
local_30 = local_28;
local_8c = local_8c + 1;
}
else if (local_60 == 0) {
local_8c = local_8c + 1;
}
else {
local_8c = local_8c + (int)local_60;
}
}
}
}
if (*(char *)(local_48 + local_8c) == '\0') {
local_78 = (char **)expand_seqterm(local_48,local_40);
if (local_78 == (char **)0x0) {
if (param_1[(long)local_90 + 1] == '\0') {
sh_xfree(local_48,"braces.c",0xfc);
sh_xfree(local_50,"braces.c",0xfd);
sVar3 = strlen(param_1);
pcVar4 = (char *)sh_xmalloc(sVar3 + 1,"braces.c",0xfe);
pcVar4 = strcpy(pcVar4,param_1);
*local_70 = pcVar4;
goto LAB_001007bd;
}
local_78 = (char **)strvec_create(2);
sVar3 = strlen(param_1 + (long)iVar1 + -1);
pcVar4 = (char *)sh_xmalloc(sVar3 + 1,"braces.c",0xf5);
pcVar4 = strcpy(pcVar4,param_1 + (long)iVar1 + -1);
*local_78 = pcVar4;
(*local_78)[(long)(local_90 - iVar1) + 2] = '\0';
local_78[1] = (char *)0x0;
}
}
else {
local_78 = (char **)expand_amble(local_48,local_40,0);
}
local_70 = (char **)array_concat(local_70,local_78);
sh_xfree(local_48,"braces.c",0x107);
if (local_78 != local_70) {
strvec_dispose(local_78);
}
local_38 = param_1 + (long)local_90 + 1;
if ((local_38 != (char *)0x0) && (*local_38 != '\0')) {
local_78 = (char **)brace_expand(local_38);
local_70 = (char **)array_concat(local_70,local_78);
if (local_78 != local_70) {
strvec_dispose(local_78);
}
}
}
}
LAB_001007bd:
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
return local_70;
}
__stack_chk_fail();
}
|
void
log_verbose_reset(void)
{
size_t i;
for (i = 0; i < nlog_verbose; i++)
free(log_verbose[i]);
free(log_verbose);
log_verbose =
((void *)0)
;
nlog_verbose = 0;
}
|
long long log_verbose_reset() {
void* v0;
for (v0 = 0; v0 < nlog_verbose; v0 += 1) {
free(*((log_verbose + 0x8 * v0)));
}
log_verbose = 0;
nlog_verbose = 0;
return free(log_verbose);
}
|
int inflateBackInit_(strm, windowBits, window, version, stream_size)
z_streamp strm;
int windowBits;
unsigned char *window;
const char *version;
int stream_size;
{
struct inflate_state *state;
if (version == 0 || version[0] != "1.2.13"[0] ||
stream_size != (int)(sizeof(z_stream)))
return (-6);
if (strm == 0 || window == 0 ||
windowBits < 8 || windowBits > 15)
return (-2);
strm->msg = 0;
if (strm->zalloc == (alloc_func)0) {
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
}
if (strm->zfree == (free_func)0)
strm->zfree = zcfree;
state = (struct inflate_state *)(*((strm)->zalloc))((strm)->opaque, (1), (sizeof(struct inflate_state)))
;
if (state == 0) return (-4);
;
strm->state = (struct internal_state *)state;
state->dmax = 32768U;
state->wbits = (uInt)windowBits;
state->wsize = 1U << windowBits;
state->window = window;
state->wnext = 0;
state->whave = 0;
state->sane = 1;
return 0;
}
|
undefined8 inflateBackInit_(long param_1,int param_2,long param_3,char *param_4,int param_5)
{
undefined8 uVar1;
long lVar2;
if (((param_4 == (char *)0x0) || (*param_4 != '1')) || (param_5 != 0x70)) {
uVar1 = 0xfffffffa;
}
else if (((param_1 == 0) || (param_3 == 0)) || ((param_2 < 8 || (0xf < param_2)))) {
uVar1 = 0xfffffffe;
}
else {
*(undefined8 *)(param_1 + 0x30) = 0;
if (*(long *)(param_1 + 0x40) == 0) {
*(undefined **)(param_1 + 0x40) = &zcalloc;
*(undefined8 *)(param_1 + 0x50) = 0;
}
if (*(long *)(param_1 + 0x48) == 0) {
*(undefined **)(param_1 + 0x48) = &zcfree;
}
lVar2 = (**(code **)(param_1 + 0x40))(*(undefined8 *)(param_1 + 0x50),1,0x1bf8);
if (lVar2 == 0) {
uVar1 = 0xfffffffc;
}
else {
*(long *)(param_1 + 0x38) = lVar2;
*(undefined4 *)(lVar2 + 0x1c) = 0x8000;
*(int *)(lVar2 + 0x38) = param_2;
*(int *)(lVar2 + 0x3c) = 1 << ((byte)param_2 & 0x1f);
*(long *)(lVar2 + 0x48) = param_3;
*(undefined4 *)(lVar2 + 0x44) = 0;
*(undefined4 *)(lVar2 + 0x40) = 0;
*(undefined4 *)(lVar2 + 0x1be8) = 1;
uVar1 = 0;
}
}
return uVar1;
}
|
void
setinteractive(int on)
{
static int is_interactive;
if (++on == is_interactive)
return;
is_interactive = on;
setsignal(
2
);
setsignal(
3
);
setsignal(
15
);
}
|
unsigned long setinteractive(int a1)
{
unsigned long result;
result = (unsigned int)is_interactive_4149;
if ( a1 + 1 != is_interactive_4149 )
{
is_interactive_4149 = a1 + 1;
setsignal(2);
setsignal(3);
return setsignal(15);
}
return result;
}
|
static int
is_cert_revoked(const struct sshkey *key, struct revoked_certs *rc)
{
struct revoked_serial rs, *ers;
struct revoked_key_id rki, *erki;
memset(&rki, 0, sizeof(rki));
rki.key_id = key->cert->key_id;
erki = revoked_key_id_tree_RB_FIND(&rc->revoked_key_ids, &rki);
if (erki !=
((void *)0)
) {
;
return -51;
}
if (key->cert->serial == 0)
return 0;
memset(&rs, 0, sizeof(rs));
rs.lo = rs.hi = key->cert->serial;
ers = revoked_serial_tree_RB_FIND(&rc->revoked_serials, &rs);
if (ers !=
((void *)0)
) {
;
return -51;
}
return 0;
}
|
long is_cert_revoked(long a1, long a2)
{
const char *s[6];
long v4[8];
v4[7] = __readfsqword(0x28u);
memset(s, 0, 0x28uLL);
s[0] = *(const char **)(*(_QWORD *)(a1 + 128) + 24LL);
if ( revoked_key_id_tree_RB_FIND((long *)(a2 + 16), s) )
return 4294967245LL;
if ( !*(_QWORD *)(*(_QWORD *)(a1 + 128) + 16LL) )
return 0LL;
memset(v4, 0, 0x30uLL);
v4[1] = *(_QWORD *)(*(_QWORD *)(a1 + 128) + 16LL);
v4[0] = v4[1];
if ( revoked_serial_tree_RB_FIND((long *)(a2 + 8), v4) )
return 4294967245LL;
else
return 0LL;
}
|
void
channel_set_x11_refuse_time(struct ssh *ssh, u_int refuse_time)
{
ssh->chanctxt->x11_refuse_time = refuse_time;
}
|
void channel_set_x11_refuse_time(long param_1,undefined4 param_2)
{
*(undefined4 *)(*(long *)(param_1 + 0x868) + 0x8c) = param_2;
return;
}
|
static void get_hram(unsigned char *hram, const unsigned char *sm, const unsigned char *pk, unsigned char *playground, unsigned long long smlen)
{
unsigned long long i;
for (i = 0;i < 32;++i) playground[i] = sm[i];
for (i = 32;i < 64;++i) playground[i] = pk[i-32];
for (i = 64;i < smlen;++i) playground[i] = sm[i];
crypto_hash_sha512(hram,playground,smlen);
}
|
void get_hram(unsigned long long a0, unsigned long long a1, char *a2, unsigned long long a3, unsigned long long a4) {
unsigned long long v0;
unsigned long long v2;
for (v0 = 0; v0 <= 31; v0 += 1) {
*((v0 + a3)) = *((v0 + a1));
}
for (v0 = 32; v0 <= 63; v0 += 1) {
*((v0 + a3)) = a2[32 + v0];
}
for (v0 = 64; v0 < a4; v0 += 1) {
*((v0 + a3)) = *((v0 + a1));
}
v2 = crypto_hash_sha512(a0, a3, a4, a3);
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.