input
stringlengths
28
169k
output
stringlengths
20
317k
static int xfrm_state_extra_flag_parse(__u32 *extra_flags, int *argcp, char ***argvp) { int argc = *argcp; char **argv = *argvp; int len = strlen(*argv); if (len > 2 && strncmp(*argv, "0x", 2) == 0) { __u32 val = 0; if (get_u32(&val, *argv, 16)) invarg("\"EXTRA-FLAG\" is invalid", *argv); *extra_flags = val; } else { while (1) { if (strcmp(*argv, "dont-encap-dscp") == 0) *extra_flags |= 1; else if (strcmp(*argv, "oseq-may-wrap") == 0) *extra_flags |= 2; else { do { argv--; argc++; } while(0); break; } if (!(argc - 1 > 0)) break; do { argv++; if (--argc <= 0) incomplete_command(); } while(0); } } *argcp = argc; *argvp = argv; return 0; }
void xfrm_state_extra_flag_parse(unsigned int *a0, unsigned int *a1, unsigned long long *a2) { unsigned int v0; unsigned int v1; unsigned int v2; unsigned long long *v3; void* v5; v1 = *(a1); v3 = *(a2); v2 = strlen(*(v3)); if (v2 > 2 && !strncmp(*(v3), "0x", 0x2)) { v0 = 0; if (get_u32(&v0, *(v3), 0x10, *(v3))) invarg("\"EXTRA-FLAG\" is invalid", *(v3)); *(a0) = v0; *(a1) = v1; *(a2) = v3; v5 = 0; return; } while (true) { if (!strcmp(*(v3), "dont-encap-dscp")) { *(a0) = *(a0) | 1; } else if (!strcmp(*(v3), "oseq-may-wrap")) { *(a0) = *(a0) | 2; } else { v3 += 1; v1 += 1; *(a1) = v1; *(a2) = v3; v5 = 0; return; } if (v1 <= 1) { *(a1) = v1; *(a2) = v3; v5 = 0; return; } v3 += 1; v1 -= 1; if (v1 <= 0) { incomplete_command(); *(a1) = v1; *(a2) = v3; v5 = 0; return; } } }
int deflateResetKeep(strm) z_streamp strm; { deflate_state *s; if (deflateStateCheck(strm)) { return (-2); } strm->total_in = strm->total_out = 0; strm->msg = 0; strm->data_type = 2; s = (deflate_state *)strm->state; s->pending = 0; s->pending_out = s->pending_buf; if (s->wrap < 0) { s->wrap = -s->wrap; } s->status = s->wrap == 2 ? 57 : 42; strm->adler = s->wrap == 2 ? crc32(0L, 0, 0) : adler32(0L, 0, 0); s->last_flush = -2; _tr_init(s); return 0; }
int deflateResetKeep(struct_0 *a0, unsigned long a1, unsigned int a2, unsigned long long a3) { struct_1 *v0; unsigned int v2; v2 = deflateStateCheck(a0); if (v2) { v2 = -2; } else { a0->field_28 = 0; a0->field_10 = a0->field_28; a0->field_30 = 0; a0->field_58 = 2; v0 = a0->field_38; v0->field_28 = 0; v0->field_20 = v0->field_10; if (v0->field_30 < 0) v0->field_30 = -(v0->field_30); if (v0->field_30 == 2) a2 = 57; else a2 = 42; v0->field_8 = a2; if (v0->field_30 == 2) v2 = crc32(0x0, 0x0, 0x0); else v2 = adler32(0x0, 0x0, 0x0, a3); *(&a0->field_60) = v2; v0->field_4c = -2; _tr_init(v0); v2 = 0; } return v2; }
static struct sshkey * load_sign_key(const char *keypath, const struct sshkey *pubkey) { size_t i, slen, plen = strlen(keypath); char *privpath = xstrdup(keypath); static const char * const suffixes[] = { "-cert.pub", ".pub", ((void *)0) }; struct sshkey *ret = ((void *)0) , *privkey = ((void *)0) ; int r, waspub = 0; struct stat st; for (i = 0; suffixes[i]; i++) { slen = strlen(suffixes[i]); if (plen <= slen || strcmp(privpath + plen - slen, suffixes[i]) != 0) continue; privpath[plen - slen] = '\0'; sshlog("ssh-keygen.c", __func__, 2510, 1, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "%s looks like a public key, using private key " "path %s instead", keypath, privpath) ; waspub = 1; } if (waspub && stat(privpath, &st) != 0 && (*__errno_location ()) == 2 ) sshfatal("ssh-keygen.c", __func__, 2515, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "No private key found for public key \"%s\"", keypath); if ((r = sshkey_load_private(privpath, "", &privkey, ((void *)0) )) != 0 && (r != -43)) { sshlog("ssh-keygen.c", __func__, 2518, 1, SYSLOG_LEVEL_DEBUG1, ssh_err(r), "load private key \"%s\"", privpath); sshfatal("ssh-keygen.c", __func__, 2519, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "No private key found for \"%s\"", privpath); } else if (privkey == ((void *)0) ) privkey = load_identity(privpath, ((void *)0) ); if (!sshkey_equal_public(pubkey, privkey)) { sshlog("ssh-keygen.c", __func__, 2524, 0, SYSLOG_LEVEL_ERROR, ((void *)0) , "Public key %s doesn't match private %s", keypath, privpath) ; goto done; } if (sshkey_is_cert(pubkey) && !sshkey_is_cert(privkey)) { if ((r = sshkey_to_certified(privkey)) != 0) { sshlog("ssh-keygen.c", __func__, 2534, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), "sshkey_to_certified"); goto done; } if ((r = sshkey_cert_copy(pubkey, privkey)) != 0) { sshlog("ssh-keygen.c", __func__, 2538, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), "sshkey_cert_copy"); goto done; } } ret = privkey; privkey = ((void *)0) ; done: sshkey_free(privkey); free(privpath); return ret; }
int load_sign_key(char *a0, unsigned long long a1) { unsigned long v0; unsigned int v1; unsigned int v2; void* v3; void* v4; void* v5; unsigned long v6; char *v7; unsigned long v8; char v9; unsigned long long v10; unsigned long v11; unsigned long long v12; char *v13; unsigned long long v14; char *v15; unsigned long long v17; unsigned long long v19; unsigned long long v20; v6 = strlen(a0); v7 = xstrdup(a0); v5 = 0; v3 = 0; v1 = 0; for (v4 = 0; *((0x8 * v4 + &suffixes.27115[0])); v4 += 1) { v8 = strlen(*((0x8 * v4 + &suffixes.27115[0]))); if (v6 > v8 && !strcmp(&v7[v6 + -1 * v8], *((0x8 * v4 + &suffixes.27115[0])))) { v7[v6 + -1 * v8] = 0; sshlog("ssh-keygen.c", "load_sign_key", 0x9ce, 0x1, 0x5, 0x0, "%s looks like a public key, using private key path %s instead", a0); v1 = 1; } } if (v1) { v17 = stat(v7, &v9); if (v17) { *(&v17) = *(__errno_location()); if (v17 == 2) { v0 = a0; sshfatal("ssh-keygen.c", "load_sign_key", 0x9d3, 0x0, 0x1, 0x0, "No private key found for public key \"%s\""); } } } v2 = sshkey_load_private(v7, &g_410d75, &v3, 0x0); if (v2 && v2 != -43) { v13 = v7; v12 = "load private key \"%s\""; sshlog("ssh-keygen.c", "load_sign_key", 0x9d6, 0x1, 0x5, ssh_err(v2), *(&v14), v15); v15 = v7; v14 = "No private key found for \"%s\""; sshfatal("ssh-keygen.c", "load_sign_key", 0x9d7, 0x0, 0x1, 0x0, "No private key found for \"%s\""); } if (!v3) v3 = load_identity(v7, NULL); if (!sshkey_equal_public(a1, v3, v3)) { v12 = v7; v11 = a0; v10 = "Public key %s doesn't match private %s"; sshlog("ssh-keygen.c", "load_sign_key", 0x9dc, 0x0, 0x2, 0x0, "No private key found for \"%s\"", v7); } else { v19 = sshkey_is_cert(a1); if (v19) { v20 = sshkey_is_cert(v3); if (!v20) { v2 = sshkey_to_certified(v3); if (v2) { v12 = "sshkey_to_certified"; sshlog("ssh-keygen.c", "load_sign_key", 0x9e6, 0x1, 0x2, ssh_err(v2), "No private key found for \"%s\"", v7); } else { v2 = sshkey_cert_copy(a1, v3, v3); if (v2) { v12 = "sshkey_cert_copy"; sshlog("ssh-keygen.c", "load_sign_key", 0x9ea, 0x1, 0x2, ssh_err(v2), "No private key found for \"%s\"", v7); } } } } if (!v19 || v20 || !v2 && !v2) { v5 = v3; v3 = 0; } } sshkey_free(v3); free(v7); return v5; }
static void getuidtty(char **userp, char **ttyp) { struct passwd *pwd; uid_t uid; char *tty; static char uidbuf[32]; static char ttynm[ 32 + 4]; static int init = 0; if (!init) { uid = getuid(); if ((pwd = getpwuid(uid)) != ((void *)0) ) { uidbuf[0] = 0; strncat(uidbuf, pwd->pw_name, sizeof(uidbuf) - 1); } else { if (uid) sprintf(uidbuf, "uid %d", (int) uid); else sprintf(uidbuf, "root"); } if ((tty = ttyname(0)) != ((void *)0) ) { const size_t plen = strlen( "/dev/" ); if (strncmp(tty, "/dev/" , plen) == 0) { tty += plen; if (tty[0] == '/') tty++; } snprintf(ttynm, sizeof(ttynm), "(%.*s) ", 32 , tty); } else ttynm[0] = 0; init++; } *userp = uidbuf; *ttyp = ttynm; }
void getuidtty(undefined8 *param_1,undefined8 *param_2) { __uid_t __uid; int iVar1; passwd *ppVar2; size_t __n; char *local_20; if (init_4542 == 0) { __uid = getuid(); ppVar2 = getpwuid(__uid); if (ppVar2 == (passwd *)0x0) { if (__uid == 0) { sprintf(uidbuf_4540,"root"); } else { sprintf(uidbuf_4540,"uid %d",(ulong)__uid); } } else { uidbuf_4540[0] = 0; strncat(uidbuf_4540,ppVar2->pw_name,0x1f); } local_20 = ttyname(0); if (local_20 == (char *)0x0) { ttynm_4541[0] = 0; } else { __n = strlen("/dev/"); iVar1 = strncmp(local_20,"/dev/",__n); if ((iVar1 == 0) && (local_20 = local_20 + __n, *local_20 == '/')) { local_20 = local_20 + 1; } snprintf(ttynm_4541,0x24,"(%.*s) ",0x20,local_20); } init_4542 = init_4542 + 1; } *param_1 = uidbuf_4540; *param_2 = ttynm_4541; return; }
static void integer_overflow (void) { ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"integer overflow\")), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, gettext ("integer overflow")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, gettext ("integer overflow")), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); }
long integer_overflow() { char *v0; v0 = gettext("integer overflow"); error(1, 0, v0); return cols_ready_to_print(); }
static void print_tunnel(const void *t) { const struct ip6_tnl_parm2 *p = t; char b1[64]; open_json_object( ((void *)0) ); print_color_string(PRINT_ANY, COLOR_IFNAME, "ifname", "%s: ", p->name); snprintf(b1, sizeof(b1), "%s/ipv6", tnl_strproto(p->proto)); print_string(PRINT_ANY, "mode", "%s ", b1); print_string(PRINT_FP, ((void *)0) , "%s", "remote "); print_color_string(PRINT_ANY, COLOR_INET6, "remote", "%s ", format_host_r( 10 , 16, &p->raddr, b1, sizeof(b1))); print_string(PRINT_FP, ((void *)0) , "%s", "local "); print_color_string(PRINT_ANY, COLOR_INET6, "local", "%s", rt_addr_n2a_r( 10 , 16, &p->laddr, b1, sizeof(b1))); if (p->link) { const char *n = ll_index_to_name(p->link); if (n) print_string(PRINT_ANY, "link", " dev %s", n); } if (p->flags & 0x1) print_null(PRINT_ANY, "ip6_tnl_f_ign_encap_limit", " encaplimit none", ((void *)0) ); else print_uint(PRINT_ANY, "encap_limit", " encaplimit %u", p->encap_limit); if (p->hop_limit) print_uint(PRINT_ANY, "hoplimit", " hoplimit %u", p->hop_limit); else print_string(PRINT_FP, "hoplimit", " hoplimit %s", "inherit"); if (p->flags & 0x2) { print_null(PRINT_ANY, "ip6_tnl_f_use_orig_tclass", " tclass inherit", ((void *)0) ); } else { __u32 val = ntohl(p->flowinfo & htonl(0x0FF00000)); snprintf(b1, sizeof(b1), "0x%02x", (__u8)(val >> 20)); print_string(PRINT_ANY, "tclass", " tclass %s", b1); } if (p->flags & 0x4) { print_null(PRINT_ANY, "ip6_tnl_f_use_orig_flowlabel", " flowlabel inherit", ((void *)0) ); } else { __u32 val = ntohl(p->flowinfo & htonl(0x000FFFFF)); snprintf(b1, sizeof(b1), "0x%05x", val); print_string(PRINT_ANY, "flowlabel", " flowlabel %s", b1); } snprintf(b1, sizeof(b1), "0x%08x", ntohl(p->flowinfo)); print_string(PRINT_ANY, "flowinfo", " (flowinfo %s)", b1); if (p->flags & 0x10) print_null(PRINT_ANY, "ip6_tnl_f_rcv_dscp_copy", " dscp inherit", ((void *)0) ); if (p->flags & 0x40) print_null(PRINT_ANY, "ip6_tnl_f_allow_local_remote", " allow-localremote", ((void *)0) ); tnl_print_gre_flags(p->proto, p->i_flags, p->o_flags, p->i_key, p->o_key); close_json_object(); }
void print_tunnel(long param_1) { uint uVar1; uint32_t uVar2; undefined8 uVar3; long lVar4; long in_FS_OFFSET; char local_68 [72]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); open_json_object(0); print_color_string(4,0,"ifname",&DAT_00101fab,param_1); uVar3 = tnl_strproto(*(undefined *)(param_1 + 0x14)); snprintf(local_68,0x40,"%s/ipv6",uVar3); print_string(4,&DAT_00101fc3,&DAT_00101fbf,local_68); print_string(1,0,&DAT_00101fd0,"remote "); uVar3 = format_host_r(10,0x10,param_1 + 0x30,local_68,0x40); print_color_string(4,3,"remote",&DAT_00101fbf,uVar3); print_string(1,0,&DAT_00101fd0,"local "); uVar3 = rt_addr_n2a_r(10,0x10,param_1 + 0x20,local_68,0x40); print_color_string(4,3,"local",&DAT_00101fd0,uVar3); if (*(int *)(param_1 + 0x10) != 0) { lVar4 = ll_index_to_name(*(undefined4 *)(param_1 + 0x10)); if (lVar4 != 0) { print_string(4,&DAT_00101fef," dev %s",lVar4); } } if ((*(uint *)(param_1 + 0x1c) & 1) == 0) { print_uint(4,"encap_limit"," encaplimit %u",*(undefined *)(param_1 + 0x15)); } else { print_null(4,"ip6_tnl_f_ign_encap_limit"," encaplimit none",0); } if (*(char *)(param_1 + 0x16) == '\0') { print_string(1,"hoplimit"," hoplimit %s","inherit"); } else { print_uint(4,"hoplimit"," hoplimit %u",*(undefined *)(param_1 + 0x16)); } if ((*(uint *)(param_1 + 0x1c) & 2) == 0) { uVar1 = *(uint *)(param_1 + 0x18); uVar2 = htonl(0xff00000); uVar2 = ntohl(uVar2 & uVar1); snprintf(local_68,0x40,"0x%02x",(ulong)(uVar2 >> 0x14 & 0xff)); print_string(4,"tclass"," tclass %s",local_68); } else { print_null(4,"ip6_tnl_f_use_orig_tclass"," tclass inherit",0); } if ((*(uint *)(param_1 + 0x1c) & 4) == 0) { uVar1 = *(uint *)(param_1 + 0x18); uVar2 = htonl(0xfffff); uVar2 = ntohl(uVar2 & uVar1); snprintf(local_68,0x40,"0x%05x",(ulong)uVar2); print_string(4,"flowlabel"," flowlabel %s",local_68); } else { print_null(4,"ip6_tnl_f_use_orig_flowlabel"," flowlabel inherit",0); } uVar2 = ntohl(*(uint32_t *)(param_1 + 0x18)); snprintf(local_68,0x40,"0x%08x",(ulong)uVar2); print_string(4,"flowinfo"," (flowinfo %s)",local_68); if ((*(uint *)(param_1 + 0x1c) & 0x10) != 0) { print_null(4,"ip6_tnl_f_rcv_dscp_copy"," dscp inherit",0); } if ((*(uint *)(param_1 + 0x1c) & 0x40) != 0) { print_null(4,"ip6_tnl_f_allow_local_remote"," allow-localremote",0); } tnl_print_gre_flags(*(undefined *)(param_1 + 0x14),*(undefined2 *)(param_1 + 0x40), *(undefined2 *)(param_1 + 0x42),*(undefined4 *)(param_1 + 0x44), *(undefined4 *)(param_1 + 0x48)); close_json_object(); if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return; }
static _Bool read_num (FILE *fp, char const *fieldname, intmax_t min_val, uintmax_t max_val, intmax_t *pval) { int i; char buf[((((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + 1)]; char offbuf[((((((sizeof (off_t) * 8) - (! ((__typeof__ (off_t)) 0 < (__typeof__ (off_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (off_t)) 0 < (__typeof__ (off_t)) -1))) + 1)]; char minbuf[((((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + 1)]; char maxbuf[((((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + 1)]; int conversion_errno; int c = getc_unlocked (fp); _Bool negative = c == '-'; for (i = 0; (i == 0 && negative) || ((unsigned) (c) - '0' <= 9); i++) { buf[i] = c; if (i == sizeof buf - 1) do { if (error_hook) error_hook (); error (0, 0, gettext ("%s: byte %s: %s %.*s... too long"), quotearg_colon (listed_incremental_option), offtostr (ftello (fp), offbuf), fieldname, i + 1, buf); fatal_exit (); } while (0) ; c = getc_unlocked (fp); } buf[i] = 0; if (c < 0) { if (ferror_unlocked (fp)) read_fatal (listed_incremental_option); if (i != 0) do { if (error_hook) error_hook (); error (0, 0, "%s: %s", quotearg_colon (listed_incremental_option), gettext ("Unexpected EOF in snapshot file")); fatal_exit (); } while (0) ; return 0 ; } if (c) { unsigned uc = c; do { if (error_hook) error_hook (); error (0, 0, gettext ("%s: byte %s: %s %s followed by invalid byte 0x%02x"), quotearg_colon (listed_incremental_option), offtostr (ftello (fp), offbuf), fieldname, buf, uc); fatal_exit (); } while (0) ; } *pval = strtosysint (buf, ((void *)0) , min_val, max_val); conversion_errno = (*__errno_location ()) ; switch (conversion_errno) { case 34 : do { if (error_hook) error_hook (); error (0, conversion_errno, gettext ("%s: byte %s: (valid range %s..%s)\n\t%s %s"), quotearg_colon (listed_incremental_option), offtostr (ftello (fp), offbuf), imaxtostr (min_val, minbuf), umaxtostr (max_val, maxbuf), fieldname, buf); fatal_exit (); } while (0) ; default: do { if (error_hook) error_hook (); error (0, conversion_errno, gettext ("%s: byte %s: %s %s"), quotearg_colon (listed_incremental_option), offtostr (ftello (fp), offbuf), fieldname, buf); fatal_exit (); } while (0) ; case 0: break; } return 1 ; }
long read_num(FILE *a1, long a2, long a3, long a4, _QWORD *a5) { __off_t v5; long v6; long v7; char *v8; char *v9; const char *v10; __off_t v12; long v13; long v14; char *v15; long v16; long v17; __off_t v18; long v19; long v20; char *v21; __off_t v22; long v23; long v24; char *v25; bool v29; int i; int v31; int errnum; char v33[32]; char v34[32]; char v35[32]; char v36[24]; unsigned long v37; v37 = __readfsqword(0x28u); v31 = getc_unlocked(a1); v29 = v31 == 45; for ( i = 0; !i && v29 || (unsigned int)(v31 - 48) <= 9; ++i ) { v33[i] = v31; if ( i == 20 ) { if ( error_hook ) error_hook(); v5 = ftello(a1); v6 = offtostr(v5, v34); v7 = quotearg_colon(listed_incremental_option); v8 = gettext("%s: byte %s: %s %.*s... too long"); error(0, 0, v8, v7, v6, a2, 21LL, v33); fatal_exit(); } v31 = getc_unlocked(a1); } v33[i] = 0; if ( v31 >= 0 ) { if ( v31 ) { if ( error_hook ) error_hook(); v12 = ftello(a1); v13 = offtostr(v12, v34); v14 = quotearg_colon(listed_incremental_option); v15 = gettext("%s: byte %s: %s %s followed by invalid byte 0x%02x"); error(0, 0, v15, v14, v13, a2, v33, (unsigned int)v31); fatal_exit(); } *a5 = strtosysint(v33, 0LL, a3, a4); errnum = *_errno_location(); if ( errnum ) { if ( errnum == 34 ) { if ( error_hook ) error_hook(); v16 = umaxtostr(a4, v36); v17 = imaxtostr(a3, v35); v18 = ftello(a1); v19 = offtostr(v18, v34); v20 = quotearg_colon(listed_incremental_option); v21 = gettext("%s: byte %s: (valid range %s..%s)\n\t%s %s"); error(0, 34, v21, v20, v19, v17, v16, a2, v33); fatal_exit(); } if ( error_hook ) error_hook(); v22 = ftello(a1); v23 = offtostr(v22, v34); v24 = quotearg_colon(listed_incremental_option); v25 = gettext("%s: byte %s: %s %s"); error(0, errnum, v25, v24, v23, a2, v33); fatal_exit(); } return 1LL; } else { if ( ferror_unlocked(a1) ) read_fatal(listed_incremental_option); if ( i ) { if ( error_hook ) error_hook(); v9 = gettext("Unexpected EOF in snapshot file"); v10 = (const char *)quotearg_colon(listed_incremental_option); error(0, 0, "%s: %s", v10, v9); fatal_exit(); } return 0LL; } }
void strvec_sort (array, posix) char **array; int posix; { if (posix) qsort (array, strvec_len (array), sizeof (char *), (QSFUNC *)strvec_posixcmp); else qsort (array, strvec_len (array), sizeof (char *), (QSFUNC *)strvec_strcmp); }
long long strvec_sort(unsigned long long *a0, unsigned long a1) { unsigned long long v1; if (a1) v1 = qsort(a0, strvec_len(a0), 0x8, strvec_posixcmp); else v1 = qsort(a0, strvec_len(a0), 0x8, strvec_strcmp); return v1; }
u_char * sshbuf_mutable_ptr(const struct sshbuf *buf) { if (sshbuf_check_sanity(buf) != 0 || buf->readonly || buf->refcount > 1) return ((void *)0) ; return buf->d + buf->off; }
long sshbuf_mutable_ptr(long a1) { if ( (unsigned int)sshbuf_check_sanity(a1) || *(_DWORD *)(a1 + 48) || *(_DWORD *)(a1 + 56) > 1u ) return 0LL; else return *(_QWORD *)a1 + *(_QWORD *)(a1 + 16); }
static void vrf_print_help(struct link_util *lu, int argc, char **argv, FILE *f) { vrf_explain(f); }
long long vrf_print_help(unsigned long a0, unsigned long a1, unsigned long a2, void* a3) { unsigned long v0; unsigned int v1; unsigned long v2; v2 = a0; v1 = a1; v0 = a2; return vrf_explain(a3); }
static long getwidth (FILE *fp) { char const *columns; struct winsize ws; if (ioctl (fileno (fp), 0x5413 , &ws) == 0 && 0 < ws.ws_col) return ws.ws_col; columns = getenv ("COLUMNS"); if (columns) { long int col = strtol (columns, ((void *)0) , 10); if (0 < col) return col; } return 80; }
int getwidth(void* a0) { char *v0; unsigned long v1; char v2; unsigned int v4; v4 = ioctl(fileno(a0), 0x5413); if (!v4 && *(&v2)) v4 = *(&v2); if (!*(&v2) || v4) { v0 = getenv("COLUMNS"); if (v0) { v1 = strtol(v0, NULL, 0xa); if (v1 > 0) v4 = v1; } if (v1 <= 0 || !v0) v4 = 80; } return v4; }
void channel_cancel_cleanup(struct ssh *ssh, int id) { Channel *c = channel_by_id(ssh, id); if (c == ((void *)0) ) { sshlog("channels.c", __func__, 1053, 1, SYSLOG_LEVEL_INFO, ((void *)0) , "%d: bad id", id); return; } c->detach_user = ((void *)0) ; c->detach_close = 0; }
long long channel_cancel_cleanup(void* a0, unsigned long a1) { unsigned long v0; struct_0 *v1; struct_0 *v3; v1 = channel_by_id(a0, a1); if (v1) { v1->field_e0 = 0; v3 = v1; v1->field_e8 = 0; } else { v0 = a1; v3 = sshlog("channels.c", "channel_cancel_cleanup", 0x41d, 0x1, 0x3, 0x0, "%d: bad id"); } return v3; }
const char * fmtcheck(const char *f1, const char *f2) { const char *f1p, *f2p; EFT f1t, f2t; if (!f1) return f2; f1p = f1; f1t = FMTCHECK_START; f2p = f2; f2t = FMTCHECK_START; while ((f1t = get_next_format(&f1p, f1t)) != FMTCHECK_DONE) { if (f1t == FMTCHECK_UNKNOWN) return f2; f2t = get_next_format(&f2p, f2t); if (f1t != f2t) return f2; } return f1; }
long fmtcheck(long param_1,long param_2) { long lVar1; long in_FS_OFFSET; int local_28; int local_24; long local_20; long local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = param_2; if (param_1 != 0) { local_28 = 0; local_24 = 0; local_20 = param_1; local_18 = param_2; do { local_28 = get_next_format(&local_20,local_28); lVar1 = param_1; if ((local_28 == 0x18) || (lVar1 = param_2, local_28 == 0x19)) break; local_24 = get_next_format(&local_18,local_24); } while (local_28 == local_24); } if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) { return lVar1; } __stack_chk_fail(); }
int sshbuf_get_bignum2(struct sshbuf *buf, BIGNUM **valp) { BIGNUM *v; const u_char *d; size_t len; int r; if (valp != ((void *)0) ) *valp = ((void *)0) ; if ((r = sshbuf_get_bignum2_bytes_direct(buf, &d, &len)) != 0) return r; if (valp != ((void *)0) ) { if ((v = BN_new()) == ((void *)0) || BN_bin2bn(d, len, v) == ((void *)0) ) { BN_clear_free(v); return -2; } *valp = v; } return 0; }
long long sshbuf_get_bignum2(unsigned long long a0, unsigned long long *a1) { unsigned int v0; char v1; char v2; unsigned long long v3; unsigned long long v5; if (a1) *(a1) = 0; v0 = sshbuf_get_bignum2_bytes_direct(a0, &v1, &v2, &v1); if (v0) { v5 = v0; } else if (!a1) { LABEL_4000ac: v5 = 0; } else { v3 = BN_new(); if (v3 && BN_bin2bn(*(&v1), *(&v2), v3, *(&v2))) { *(a1) = v3; goto LABEL_4000ac; } BN_clear_free(v3); v5 = 4294967294; } return v5; }
static inline __s32 rta_getattr_s32(const struct rtattr *rta) { return *(__s32 *)((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); }
int rta_getattr_s32(struct_0 *a0) { return a0->field_4; }
int kex_derive_keys(struct ssh *ssh, u_char *hash, u_int hashlen, const struct sshbuf *shared_secret) { struct kex *kex = ssh->kex; u_char *keys[6]; u_int i, j, mode, ctos; int r; if ((kex->flags & 0x0002) != 0) { if (sshbuf_len(kex->session_id) != 0) { sshlog("kex.c", __func__, 1114, 1, SYSLOG_LEVEL_ERROR, ((void *)0) , "already have session ID at kex"); return -1; } if ((r = sshbuf_put(kex->session_id, hash, hashlen)) != 0) return r; } else if (sshbuf_len(kex->session_id) == 0) { sshlog("kex.c", __func__, 1120, 1, SYSLOG_LEVEL_ERROR, ((void *)0) , "no session ID in rekex"); return -1; } for (i = 0; i < 6; i++) { if ((r = derive_key(ssh, 'A'+i, kex->we_need, hash, hashlen, shared_secret, &keys[i])) != 0) { for (j = 0; j < i; j++) free(keys[j]); return r; } } for (mode = 0; mode < MODE_MAX; mode++) { ctos = (!kex->server && mode == MODE_OUT) || (kex->server && mode == MODE_IN); kex->newkeys[mode]->enc.iv = keys[ctos ? 0 : 1]; kex->newkeys[mode]->enc.key = keys[ctos ? 2 : 3]; kex->newkeys[mode]->mac.key = keys[ctos ? 4 : 5]; } return 0; }
int kex_derive_keys(long param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4) { long lVar1; bool bVar2; int iVar3; long lVar4; long in_FS_OFFSET; undefined8 uVar5; uint local_64; uint local_60; uint local_5c; void *local_48 [7]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *(long *)(param_1 + 8); if ((*(uint *)(lVar1 + 0x8c) & 2) == 0) { uVar5 = 0x1032f9; lVar4 = sshbuf_len(*(undefined8 *)(lVar1 + 0x70)); if (lVar4 == 0) { sshlog("kex.c","kex_derive_keys",0x460,1,2,0,"no session ID in rekex",uVar5); iVar3 = -1; goto LAB_001034a1; } } else { uVar5 = 0x103271; lVar4 = sshbuf_len(*(undefined8 *)(lVar1 + 0x70)); if (lVar4 != 0) { sshlog("kex.c","kex_derive_keys",0x45a,1,2,0,"already have session ID at kex",uVar5); iVar3 = -1; goto LAB_001034a1; } uVar5 = 0x1032d8; iVar3 = sshbuf_put(*(undefined8 *)(lVar1 + 0x70),param_2,param_3); if (iVar3 != 0) goto LAB_001034a1; } for (local_64 = 0; local_64 < 6; local_64 = local_64 + 1) { iVar3 = derive_key(param_1,local_64 + 0x41,*(undefined4 *)(lVar1 + 0x10),param_2,param_3,param_4 ,local_48 + local_64,uVar5); if (iVar3 != 0) { for (local_60 = 0; local_60 < local_64; local_60 = local_60 + 1) { free(local_48[local_60]); } goto LAB_001034a1; } } for (local_5c = 0; local_5c < 2; local_5c = local_5c + 1) { if (((*(int *)(lVar1 + 0x18) == 0) && (local_5c == 1)) || ((*(int *)(lVar1 + 0x18) != 0 && (local_5c == 0)))) { bVar2 = true; } else { bVar2 = false; } *(void **)(*(long *)(lVar1 + (ulong)local_5c * 8) + 0x28) = local_48[(int)(uint)!bVar2]; if (bVar2) { iVar3 = 2; } else { iVar3 = 3; } *(void **)(*(long *)(lVar1 + (ulong)local_5c * 8) + 0x20) = local_48[iVar3]; if (bVar2) { iVar3 = 4; } else { iVar3 = 5; } *(void **)(*(long *)(lVar1 + (ulong)local_5c * 8) + 0x40) = local_48[iVar3]; } iVar3 = 0; LAB_001034a1: if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) { return iVar3; } __stack_chk_fail(); }
int rl_vi_char_search (int count, int key) { int c; static char *target; static int tlen; if (key == ';' || key == ',') { if (_rl_cs_orig_dir == 0) return 1; if (_rl_vi_last_search_mblen == 0) return 1; _rl_cs_dir = (key == ';') ? _rl_cs_orig_dir : -_rl_cs_orig_dir; } else { switch (key) { case 't': _rl_cs_orig_dir = _rl_cs_dir = 1; break; case 'T': _rl_cs_orig_dir = _rl_cs_dir = -1; break; case 'f': _rl_cs_orig_dir = _rl_cs_dir = 2; break; case 'F': _rl_cs_orig_dir = _rl_cs_dir = -2; break; } if (_rl_vi_redoing) { } else if ((rl_readline_state & (0x0080000))) { _rl_callback_data = _rl_callback_data_alloc (count); _rl_callback_data->i1 = _rl_cs_dir; _rl_callback_data->i2 = key; _rl_callback_func = _rl_vi_callback_char_search; (rl_readline_state |= (0x0800000)); return (0); } else { c = _rl_read_mbchar (_rl_vi_last_search_mbchar, 16 ); if (c <= 0) return -1; _rl_vi_last_search_mblen = c; } } target = _rl_vi_last_search_mbchar; tlen = _rl_vi_last_search_mblen; return (_rl_char_search_internal (count, _rl_cs_dir, target, tlen)); }
long long rl_vi_char_search(unsigned long a0, unsigned long a1) { unsigned int v0; unsigned long long v2; unsigned int v3; if (a1 == 59) { LABEL_403a02: if (!_rl_cs_orig_dir) { v2 = 1; goto LABEL_403ba7; } if (!_rl_vi_last_search_mblen) { v2 = 1; } else { if (a1 == 59) v3 = _rl_cs_orig_dir; else v3 = -(_rl_cs_orig_dir); _rl_cs_dir = v3; goto LABEL_403b70; } } else { if (a1 == 44) goto LABEL_403a02; if (a1 == 116) { _rl_cs_dir = 1; _rl_cs_orig_dir = _rl_cs_dir; } else if (a1 <= 116) { if (a1 == 102) { _rl_cs_dir = 2; _rl_cs_orig_dir = _rl_cs_dir; } else if (a1 <= 102) { if (a1 == 70) { _rl_cs_dir = -2; _rl_cs_orig_dir = _rl_cs_dir; } else if (a1 == 84) { _rl_cs_dir = -1; _rl_cs_orig_dir = _rl_cs_dir; } } } if (false) { if ((rl_readline_state & 0x80000)) { _rl_callback_data = _rl_callback_data_alloc(a0); *((_rl_callback_data + 4)) = _rl_cs_dir; *((_rl_callback_data + 8)) = a1; _rl_callback_func = _rl_vi_callback_char_search; *(&rl_readline_state[0]) = rl_readline_state | &g_800000; v2 = 0; goto LABEL_403ba7; } v0 = _rl_read_mbchar(&_rl_vi_last_search_mbchar, 0x10); if (v0 <= 0) { v2 = 4294967295; goto LABEL_403ba7; } else { _rl_vi_last_search_mblen = v0; } } LABEL_403b70: target.6558 = &_rl_vi_last_search_mbchar; tlen.6559 = _rl_vi_last_search_mblen; v2 = _rl_char_search_internal(a0, _rl_cs_dir, target.6558, tlen.6559); } LABEL_403ba7: return v2; }
static int xvasprintf(char **sp, size_t size, const char *f, va_list ap) { char *s; int len; va_list ap2; __builtin_va_copy( ap2 , ap ) ; len = xvsnprintf(*sp, size, f, ap2); __builtin_va_end( ap2 ) ; if (len < 0) sh_error("xvsnprintf failed"); if (len < size) return len; s = stalloc((len >= stacknleft ? len : stacknleft) + 1); *sp = s; len = xvsnprintf(s, len + 1, f, ap); return len; }
int xvasprintf(unsigned long long *a0, unsigned long a1, char *a2, unsigned long long a3[3]) { unsigned int v0; char *v1; unsigned long v2; unsigned long v3; unsigned long v4; unsigned long long v6; unsigned long v7; v2 = a3[0]; v3 = a3[1]; v4 = a3[2]; v0 = xvsnprintf(*(a0), a1, a2, &v2); if (v0 < 0) sh_error("xvsnprintf failed"); if (a1 > v0) { v7 = v0; } else { v6 = stacknleft; if (stacknleft <= v0) v6 = v0; v7 = v6 + 1; v1 = stalloc(v7); *(a0) = v1; v0 = xvsnprintf(v1, v0 + 1, a2, a3); *(&v7) = v0; } return v7; }
void array_add (element, array) char *element; ARRAY *array; { if (array->sindex + 2 > array->size) array->array = (char **)xrealloc (array->array, (array->size += array->growth_rate) * array->width); array->array[array->sindex++] = element; array->array[array->sindex] = (char *) ((void *)0) ; }
void array_add(undefined8 param_1,int *param_2) { int iVar1; undefined8 uVar2; if (*param_2 <= param_2[1] + 1) { *param_2 = *param_2 + param_2[3]; uVar2 = xrealloc(*(undefined8 *)(param_2 + 4),*param_2 * param_2[2]); *(undefined8 *)(param_2 + 4) = uVar2; } iVar1 = param_2[1]; param_2[1] = iVar1 + 1; *(undefined8 *)(*(long *)(param_2 + 4) + (long)iVar1 * 8) = param_1; *(undefined8 *)((long)param_2[1] * 8 + *(long *)(param_2 + 4)) = 0; return; }
static int _rl_vi_callback_getchar (char *mb, int mlen) { return (_rl_bracketed_read_mbstring (mb, mlen)); }
long long _rl_vi_callback_getchar(unsigned long long a0, unsigned long a1) { return _rl_bracketed_read_mbstring(a0, a1, a1); }
static inline __be16 rta_getattr_be16(const struct rtattr *rta) { return ntohs(rta_getattr_u16(rta)); }
int rta_getattr_be16(void* a0) { return ntohs(rta_getattr_u16(a0)); }
int mm_sshkey_sign(struct sshkey *key, u_char **sigp, u_int *lenp, const u_char *data, u_int datalen, const char *alg, const char *sk_provider, const char *sk_pin, u_int compat) { return (-1); }
undefined8 mm_sshkey_sign(void) { return 0xffffffff; }
static void rm_option_init (struct rm_options *x) { x->ignore_missing_files = 0 ; x->remove_empty_directories = 1 ; x->recursive = 1 ; x->one_file_system = 0 ; x->interactive = RMI_NEVER; x->stdin_tty = 0 ; x->verbose = 0 ; x->require_restore_cwd = 1 ; { static struct dev_ino dev_ino_buf; x->root_dev_ino = get_root_dev_ino (&dev_ino_buf); if (x->root_dev_ino == ((void *)0) ) ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), gettext (\"failed to get attributes of %s\"), quotearg_style (shell_escape_always_quoting_style, \"/\")), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , gettext ("failed to get attributes of %s"), quotearg_style (shell_escape_always_quoting_style, "/")), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , gettext ("failed to get attributes of %s"), quotearg_style (shell_escape_always_quoting_style, "/")), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; } x->preserve_all_root = 0 ; }
long rm_option_init(long a1) { long v1; char *v2; int *v3; long result; *(_BYTE *)a1 = 0; *(_BYTE *)(a1 + 10) = 1; *(_BYTE *)(a1 + 9) = 1; *(_BYTE *)(a1 + 8) = 0; *(_DWORD *)(a1 + 4) = 5; *(_BYTE *)(a1 + 25) = 0; *(_BYTE *)(a1 + 26) = 0; *(_BYTE *)(a1 + 27) = 1; *(_QWORD *)(a1 + 16) = get_root_dev_ino(&dev_ino_buf_6554); if ( !*(_QWORD *)(a1 + 16) ) { v1 = quotearg_style(4LL, "/"); v2 = gettext("failed to get attributes of %s"); v3 = _errno_location(); error(1, *v3, v2, v1); } result = a1; *(_BYTE *)(a1 + 24) = 0; return result; }
void coproc_fdrestore (cp) struct coproc *cp; { cp->c_rfd = cp->c_rsave; cp->c_wfd = cp->c_wsave; }
long long coproc_fdrestore(unsigned int a0[7]) { a0[3] = a0[5]; a0[4] = a0[6]; return a0; }
gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt) { size_t count = list->count; if (!(start_index <= end_index && end_index <= count)) abort (); { gl_listelement_equals_fn equals = list->base.equals_fn; gl_list_node_t node = list->root.next; end_index -= start_index; for (; start_index > 0; start_index--) node = node->next; if (equals != ((void *)0) ) { for (; end_index > 0; node = node->next, end_index--) if (equals (elt, node->value)) return node; } else { for (; end_index > 0; node = node->next, end_index--) if (elt == node->value) return node; } return ((void *)0) ; } }
_QWORD * gl_linked_search_from_to(_QWORD *a1, unsigned long a2, unsigned long a3, long a4) { long v6; unsigned long v7; _QWORD *v8; unsigned char ( *v9)(long, _QWORD); v7 = a2; if ( a2 > a3 || a3 > a1[8] ) abort(); v9 = (unsigned char ( *)(long, _QWORD))a1[1]; v8 = (_QWORD *)a1[5]; v6 = a3 - a2; while ( v7 ) { v8 = (_QWORD *)*v8; --v7; } if ( v9 ) { while ( v6 ) { if ( v9(a4, v8[2]) ) return v8; v8 = (_QWORD *)*v8; --v6; } } else { while ( v6 ) { if ( a4 == v8[2] ) return v8; v8 = (_QWORD *)*v8; --v6; } } return 0LL; }
1 , 0, gettext ("the options for verbose and stty-readable output styles are\n" "mutually exclusive")), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; if (!noargs && (verbose_output || recoverable_output)) ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"when specifying an output style, modes may not be set\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (
void gettext(void) { halt_baddata(); }
const char * session_get_remote_name_or_ip(struct ssh *ssh, u_int utmp_size, int use_dns) { const char *remote = ""; if (utmp_size > 0) remote = auth_get_canonical_hostname(ssh, use_dns); if (utmp_size == 0 || strlen(remote) > utmp_size) remote = ssh_remote_ipaddr(ssh); return remote; }
int session_get_remote_name_or_ip(unsigned long long a0, unsigned long a1, unsigned long a2) { unsigned long long v0; v0 = &g_407897; if (a1) v0 = auth_get_canonical_hostname(a0, a2, a2); if (a1 && strlen(v0) <= a1) goto LABEL_407196; v0 = ssh_remote_ipaddr(a0); LABEL_407196: return v0; }
int where_history(void) { return history_offset; }
long long where_history() { return *(got.history_offset); }
char ** get_hostname_list () { if (hostname_list_initialized == 0) initialize_hostname_list (); return (hostname_list); }
long get_hostname_list() { if ( !hostname_list_initialized ) initialize_hostname_list(); return hostname_list; }
static void ssh_confirm_remote_forward(struct ssh *ssh, int type, u_int32_t seq, void *ctxt) { struct Forward *rfwd = (struct Forward *)ctxt; u_int port; int r; sshlog("ssh.c", __func__, 1790, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "remote forward %s for: listen %s%s%d, connect %s:%d", type == 81 ? "success" : "failure", rfwd->listen_path ? rfwd->listen_path : rfwd->listen_host ? rfwd->listen_host : "", (rfwd->listen_path || rfwd->listen_host) ? ":" : "", rfwd->listen_port, rfwd->connect_path ? rfwd->connect_path : rfwd->connect_host, rfwd->connect_port) ; if (rfwd->listen_path == ((void *)0) && rfwd->listen_port == 0) { if (type == 81) { if ((r = sshpkt_get_u32(ssh, &port)) != 0) sshfatal("ssh.c", __func__, 1800, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse packet"); if (port > 65535) { sshlog("ssh.c", __func__, 1802, 0, SYSLOG_LEVEL_ERROR, ((void *)0) , "Invalid allocated port %u for remote " "forward to %s:%d", port, rfwd->connect_host, rfwd->connect_port) ; type = 82; channel_update_permission(ssh, rfwd->handle, -1); } else { rfwd->allocated_port = (int)port; sshlog("ssh.c", __func__, 1811, 0, SYSLOG_LEVEL_INFO, ((void *)0) , "Allocated port %u for remote " "forward to %s:%d", rfwd->allocated_port, rfwd->connect_path ? rfwd->connect_path : rfwd->connect_host, rfwd->connect_port) ; channel_update_permission(ssh, rfwd->handle, rfwd->allocated_port); } } else { channel_update_permission(ssh, rfwd->handle, -1); } } if (type == 82) { if (options.exit_on_forward_failure) { if (rfwd->listen_path != ((void *)0) ) sshfatal("ssh.c", __func__, 1827, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Error: remote port forwarding failed " "for listen path %s", rfwd->listen_path) ; else sshfatal("ssh.c", __func__, 1830, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Error: remote port forwarding failed " "for listen port %d", rfwd->listen_port) ; } else { if (rfwd->listen_path != ((void *)0) ) sshlog("ssh.c", __func__, 1834, 0, SYSLOG_LEVEL_INFO, ((void *)0) , "Warning: remote port forwarding failed " "for listen path %s", rfwd->listen_path) ; else sshlog("ssh.c", __func__, 1837, 0, SYSLOG_LEVEL_INFO, ((void *)0) , "Warning: remote port forwarding failed " "for listen port %d", rfwd->listen_port) ; } } forwarding_success(); }
unsigned long ssh_confirm_remote_forward(long a1, int a2, long a3, long a4) { long v4; const char *v5; const char *v6; const char *v7; const char *v8; long v9; const char *v10; unsigned int v13; unsigned int u32; long v15; unsigned long v16; v16 = __readfsqword(0x28u); v15 = a4; v4 = *(unsigned int *)(a4 + 32); if ( *(_QWORD *)(a4 + 40) ) v5 = *(const char **)(v15 + 40); else v5 = *(const char **)(v15 + 24); if ( *(_QWORD *)(v15 + 16) || *(_QWORD *)v15 ) v6 = ":"; else v6 = (const char *)&unk_90E6; if ( *(_QWORD *)(v15 + 16) ) { v7 = *(const char **)(v15 + 16); } else if ( *(_QWORD *)v15 ) { v7 = *(const char **)v15; } else { v7 = (const char *)&unk_90E6; } if ( a2 == 81 ) v8 = "success"; else v8 = "failure"; sshlog( "ssh.c", "ssh_confirm_remote_forward", 1790LL, 0LL, 5LL, 0LL, "remote forward %s for: listen %s%s%d, connect %s:%d", v8, v7, v6, *(unsigned int *)(v15 + 8), v5, v4); if ( !*(_QWORD *)(v15 + 16) && !*(_DWORD *)(v15 + 8) ) { if ( a2 == 81 ) { u32 = sshpkt_get_u32(a1, &v13); if ( u32 ) { v9 = ssh_err(u32); sshfatal("ssh.c", "ssh_confirm_remote_forward", 1800LL, 1LL, 1LL, v9, "parse packet"); } if ( v13 <= 0xFFFF ) { *(_DWORD *)(v15 + 48) = v13; if ( *(_QWORD *)(v15 + 40) ) v10 = *(const char **)(v15 + 40); else v10 = *(const char **)(v15 + 24); sshlog( "ssh.c", "ssh_confirm_remote_forward", 1811LL, 0LL, 3LL, 0LL, "Allocated port %u for remote forward to %s:%d", *(unsigned int *)(v15 + 48), v10, *(unsigned int *)(v15 + 32)); channel_update_permission(a1, *(unsigned int *)(v15 + 52), *(unsigned int *)(v15 + 48)); } else { sshlog( "ssh.c", "ssh_confirm_remote_forward", 1802LL, 0LL, 2LL, 0LL, "Invalid allocated port %u for remote forward to %s:%d", v13, *(const char **)(v15 + 24), *(unsigned int *)(v15 + 32)); a2 = 82; channel_update_permission(a1, *(unsigned int *)(v15 + 52), 0xFFFFFFFFLL); } } else { channel_update_permission(a1, *(unsigned int *)(v15 + 52), 0xFFFFFFFFLL); } } if ( a2 == 82 ) { if ( options[7] ) { if ( *(_QWORD *)(v15 + 16) ) sshfatal( "ssh.c", "ssh_confirm_remote_forward", 1827LL, 0LL, 1LL, 0LL, "Error: remote port forwarding failed for listen path %s"); sshfatal( "ssh.c", "ssh_confirm_remote_forward", 1830LL, 0LL, 1LL, 0LL, "Error: remote port forwarding failed for listen port %d"); } if ( *(_QWORD *)(v15 + 16) ) sshlog( "ssh.c", "ssh_confirm_remote_forward", 1834LL, 0LL, 3LL, 0LL, "Warning: remote port forwarding failed for listen path %s", *(const char **)(v15 + 16)); else sshlog( "ssh.c", "ssh_confirm_remote_forward", 1837LL, 0LL, 3LL, 0LL, "Warning: remote port forwarding failed for listen port %d", *(unsigned int *)(v15 + 8)); } forwarding_success(); return __readfsqword(0x28u) ^ v16; }
static void print_secy_stats(const char *prefix, struct rtattr *attr) { struct rtattr *stats[MACSEC_SECY_STATS_ATTR_MAX + 1]; if (!attr || show_stats == 0) return; (parse_rtattr_flags((stats), (MACSEC_SECY_STATS_ATTR_MAX), ((void*)(((char*)(attr)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((attr)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), (1 << 15))); print_stats(prefix, secy_stats_names, NUM_MACSEC_SECY_STATS_ATTR, stats); }
void print_secy_stats(unsigned int a0, unsigned short *a1, unsigned long a2, unsigned long a3, unsigned long a4, unsigned long long a5) { char v0; char v1; unsigned long long *v3; unsigned long long v4; if (!(!a1 || !show_stats)) { parse_rtattr_flags(&v0, 0x9, a1 + 2, *(a1) - 4, 0x8000); print_stats(a0, &secy_stats_names, 0xa, &v0, 0x8000, a5); } v4 = *(&v1) ^ v3[5]; return; }
void sv_terminal (name) char *name; { if (interactive_shell && no_line_editing == 0) rl_reset_terminal (get_string_value ("TERM")); }
long long sv_terminal(unsigned long a0) { unsigned long v0; unsigned long long v2; v0 = a0; v2 = interactive_shell; if (interactive_shell) { v2 = no_line_editing; if (!no_line_editing) v2 = rl_reset_terminal(get_string_value("TERM")); } return v2; }
void rl_restore_prompt(void) { if (!rl_prompt_saved) return; rl_prompt = rl_prompt_saved; rl_prompt_saved = ((void *)0) ; }
long long rl_restore_prompt() { unsigned long long *v1; v1 = *(got.rl_prompt_saved); if (*(got.rl_prompt_saved)) { *(got.rl_prompt) = *(got.rl_prompt_saved); v1 = got.rl_prompt_saved; *(got.rl_prompt_saved) = 0; } return v1; }
static int glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, Char *pattern, Char *pattern_last, _ssh_compat_glob_t *pglob, struct glob_lim *limitp) { struct stat sb; Char *p, *q; int anymeta; for (anymeta = 0;;) { if (*pattern == '\0') { *pathend = '\0'; if ((pglob->gl_flags & 0x2000) && limitp->glim_stat++ >= 2048) { (*__errno_location ()) = 0; *pathend++ = '/'; *pathend = '\0'; return((-1)); } if (g_lstat(pathbuf, &sb, pglob)) return(0); if (((pglob->gl_flags & 0x0008) && pathend[-1] != '/') && ( (((( sb.st_mode )) & 0170000) == (0040000)) || ( (((( sb.st_mode )) & 0170000) == (0120000)) && (g_stat(pathbuf, &sb, pglob) == 0) && (((( sb.st_mode )) & 0170000) == (0040000)) ))) { if (pathend+1 > pathend_last) return (1); *pathend++ = '/'; *pathend = '\0'; } ++pglob->gl_matchc; return(globextend(pathbuf, pglob, limitp, &sb)); } q = pathend; p = pattern; while (*p != '\0' && *p != '/') { if ((((*p)&0x8000) != 0)) anymeta = 1; if (q+1 > pathend_last) return (1); *q++ = *p++; } if (!anymeta) { pathend = q; pattern = p; while (*pattern == '/') { if (pathend+1 > pathend_last) return (1); *pathend++ = *pattern++; } } else return(glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, p, pattern_last, pglob, limitp)); } }
int glob2(unsigned long long a0, unsigned long long a1, unsigned long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5, unsigned long v9, unsigned long long *a6) { struct_1 *v0; int tmp_10; int tmp_9; int tmp_8; struct_0 *v1; unsigned short *v2; unsigned long v3; unsigned int v4; unsigned short *v5; unsigned long v6; char v7; char v8; unsigned long v10; v3 = a2; v2 = a4; v1 = v9; v0 = &a6; v4 = 0; while (*(v2)) { v6 = v3; for (v5 = v2; *(v5) && *(v5) != 47; *(v10) = a2) { if (*(v5) < 0) v4 = 1; if (a3 < v6 + 2) { *(&v10) = 1; return v10; } tmp_10 = v5; v5 += 1; v10 = v6; v6 += 2; a2 = *(tmp_10); } if (v4) { v10 = glob3(a0, a1, v3, a3, v2, v5, a5, v1, v0); return v10; } v3 = v6; for (v2 = v5; *(v2) == 47; *(v10) = a2) { if (a3 >= v3 + 2) { tmp_10 = v2; v2 += 1; v10 = v3; v3 += 2; *(&a2) = *(tmp_10); } else { *(&v10) = 1; return v10; } } } *(v3) = 0; if ((v1->field_18 & 0x2000)) { v10 = v0->field_8; v0->field_8 = v0->field_8 + 1; if (v10 > 2047) { *(__errno_location()) = 0; tmp_9 = v3; v3 += 2; *(tmp_9) = 47; *(v3) = 0; *(&v10) = -1; return v10; } } if (g_lstat(a0, &v7, v1)) { *(&v10) = 0; return v10; } if (!(v1->field_18 & 8)) { v1->field_8 = v1->field_8 + 1; v10 = globextend(a0, v1, v0, &v7); return v10; } if (*((v3 - 2)) == 47) { v1->field_8 = v1->field_8 + 1; v10 = globextend(a0, v1, v0, &v7); return v10; } switch (*(&v8) & 0xf000) { case 16384: LABEL_401677: if (a3 < v3 + 2) { *(&v10) = 1; return v10; } tmp_8 = v3; v3 += 2; *(tmp_8) = 47; *(v3) = 0; break; case 40960: if (!g_stat(a0, &v7, v1) && (*(&v8) & 0xf000) == 0x4000) goto LABEL_401677; else goto LABEL_4016b8; default: LABEL_4016b8: v1->field_8 = v1->field_8 + 1; v10 = globextend(a0, v1, v0, &v7); return v10; } }
int lookup_marker_in_hostkeys(struct hostkeys *hostkeys, int want_marker) { u_int i; for (i = 0; i < hostkeys->num_entries; i++) { if (hostkeys->entries[i].marker == (HostkeyMarker)want_marker) return 1; } return 0; }
long long lookup_marker_in_hostkeys(struct_1 *a0, unsigned long a1) { unsigned int v0; unsigned long long v2; v0 = 0; while (true) { if (v0 >= a0->field_8) { v2 = 0; return v2; } else if (*((((v0 << 2) + v0 << 3) + a0->field_0 + 32)) != a1) { v0 += 1; } else { v2 = 1; return v2; } } }
int rl_bind_key(int c, rl_command_func_t *func) { int retval = -1; if (h == ((void *)0) || e == ((void *)0) ) rl_initialize(); if (func == rl_insert) { e->el_map.key[c] = 9; retval = 0; } return retval; }
long rl_bind_key(int a1, long ( *a2)(int a1, char a2)) { unsigned int v3; v3 = -1; if ( !h || !e ) rl_initialize(); if ( a2 == rl_insert ) { *(_BYTE *)(*(_QWORD *)(e + 1016) + a1) = 9; return 0; } return v3; }
static int match_principals_option(const char *principal_list, struct sshkey_cert *cert) { char *result; u_int i; for (i = 0; i < cert->nprincipals; i++) { if ((result = match_list(cert->principals[i], principal_list, ((void *)0) )) != ((void *)0) ) { sshlog("auth2-pubkeyfile.c", __func__, 158, 0, SYSLOG_LEVEL_DEBUG3, ((void *)0) , "matched principal from key options \"%.100s\"", result) ; free(result); return 1; } } return 0; }
int match_principals_option(unsigned long long a0, struct_0 *a1) { unsigned int v0; void* v1; unsigned int v3; v0 = 0; while (true) { if (v0 >= a1->field_20) { v3 = 0; break; } else { v1 = match_list(*((a1->field_28 + v0 * 8)), a0, 0x0, a0); if (!v1) { v0 += 1; } else { sshlog("auth2-pubkeyfile.c", "match_principals_option", 0x9e, 0x0, 0x7, 0x0, "matched principal from key options \"%.100s\"", v1); free(v1); v3 = 1; break; } } } return v3; }
const struct sshbuf * sshbuf_parent(const struct sshbuf *buf) { return buf->parent; }
long sshbuf_parent(long a1) { return *(_QWORD *)(a1 + 64); }
static int ipstats_show_64(struct ipstats_stat_show_attrs *attrs, unsigned int group, unsigned int subgroup) { struct rtnl_link_stats64 stats; const struct rtattr *at; int err; at = ipstats_stat_show_get_attr(attrs, group, subgroup, &err); if (at == ((void *)0) ) return err; do { const struct rtattr *__at = (at); size_t __at_sz = __at->rta_len - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)); size_t __var_sz = sizeof(stats); typeof(stats) *__dest = &stats; memset(__dest, 0, __var_sz); memcpy(__dest, ((void*)(((char*)(__at)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((( __at_sz )<( __var_sz ))?( __at_sz ):( __var_sz )) ); } while (0); open_json_object("stats64"); print_stats64( stdout , &stats, ((void *)0) , ((void *)0) ); close_json_object(); return 0; }
void ipstats_show_64(void* a0, unsigned long a1, unsigned long a2, unsigned long a3, unsigned long long a4, unsigned long long a5) { char v0; unsigned long v1; unsigned short *v2; unsigned long v3; unsigned long long v4; void* v5; char v6; unsigned long long v8; unsigned long long v9; void* v10; v1 = ipstats_stat_show_get_attr(a0, a1, a2, &v0); if (!v1) { v8 = *(&v0); return; } v2 = v1; v3 = *(v2) - 4; v4 = 200; v5 = &v6; memset(v5, 0x0, v4); v9 = v3; if (v4 <= v3) v9 = v4; memcpy(v9, v9 + 4, v9); open_json_object("stats64"); print_stats64(stdout, &v6, 0x0, 0x0); close_json_object(a0, &v6, 0x0, 0x0, a4, a5); v10 = 0; return; }
static int do_show(int argc, char **argv) { struct { struct nlmsghdr n; struct genlmsghdr g; char buf[( ((0)+4U -1) & ~(4U -1) ) + (4096)]; } req = { .n = { .nlmsg_type = (genl_family), .nlmsg_flags = (0x01 | (0x100|0x200)), .nlmsg_len = ((( ((sizeof(struct genlmsghdr))+4U -1) & ~(4U -1) ) + (0)) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))), }, .g = { .cmd = (FOU_CMD_GET), .version = (0x1), }, }; if (argc > 0) { fprintf( stderr , "\"ip fou show\" does not take any arguments.\n"); return -1; } if (rtnl_send(&genl_rth, &req.n, req.n.nlmsg_len) < 0) { perror("Cannot send show request"); exit(1); } new_json_obj(json); if (rtnl_dump_filter_nc(&genl_rth, print_fou_mapping, stdout , 0) < 0) { fprintf( stderr , "Dump terminated\n"); return 1; } delete_json_obj(); fflush( stdout ); return 0; }
undefined8 do_show(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5, undefined8 param_6) { int iVar1; undefined8 uVar2; long lVar3; undefined8 *puVar4; long in_FS_OFFSET; undefined8 local_1028; undefined local_1018; undefined local_1017; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); puVar4 = &local_1028; for (lVar3 = 0x202; lVar3 != 0; lVar3 = lVar3 + -1) { *puVar4 = 0; puVar4 = puVar4 + 1; } *(undefined4 *)puVar4 = 0; local_1028._0_4_ = 0x14; local_1028._4_2_ = (undefined2)genl_family; local_1028._6_2_ = 0x301; local_1018 = 3; local_1017 = 1; if (param_1 < 1) { iVar1 = rtnl_send(genl_rth,&local_1028,0x14); if (iVar1 < 0) { perror("Cannot send show request"); exit(1); } new_json_obj(json); iVar1 = rtnl_dump_filter_nc(genl_rth,print_fou_mapping,stdout,0,param_5,param_6,param_2); if (iVar1 < 0) { fprintf(stderr,"Dump terminated\n"); uVar2 = 1; } else { delete_json_obj(); fflush(stdout); uVar2 = 0; } } else { fprintf(stderr,"\"ip fou show\" does not take any arguments.\n"); uVar2 = 0xffffffff; } if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return uVar2; }
sh_builtin_func_t * builtin_address (name) char *name; { current_builtin = builtin_address_internal (name, 1); return (current_builtin ? current_builtin->function : (sh_builtin_func_t *) ((void *)0) ); }
undefined8 builtin_address(undefined8 param_1) { undefined8 uVar1; current_builtin = builtin_address_internal(param_1,1); if (current_builtin == 0) { uVar1 = 0; } else { uVar1 = *(undefined8 *)(current_builtin + 8); } return uVar1; }
int zwrite (fd, buf, nb) int fd; char *buf; size_t nb; { int n, i, nt; for (n = nb, nt = 0;;) { i = write (fd, buf, n); if (i > 0) { n -= i; if (n <= 0) return nb; buf += i; } else if (i == 0) { if (++nt > 3) return (nb - n); } else if ( (*__errno_location ()) != 4 ) return -1; } }
long long zwrite(unsigned long a0, void* a1, unsigned long long a2) { void* v0; unsigned int v1; unsigned int v2; unsigned int v3; unsigned long long v6; v0 = a1; v1 = a2; v2 = 0; while (true) { v3 = write(a0, v0, v1); if (v3 > 0) { v1 -= v3; if (v1 <= 0) { v6 = a2; return v6; } v0 += v3; } else if (!v3) { v2 += 1; if (v2 > 3) { v6 = a2 - v1; return v6; } } else if (*(__errno_location()) != 4) { v6 = 4294967295; return v6; } } }
static void tun_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) { if (!tb) return; if (tb[IFLA_TUN_TYPE]) print_type(f, rta_getattr_u8(tb[IFLA_TUN_TYPE])); if (tb[IFLA_TUN_PI]) print_on_off(PRINT_ANY, "pi", "pi %s ", rta_getattr_u8(tb[IFLA_TUN_PI])); if (tb[IFLA_TUN_VNET_HDR]) { print_on_off(PRINT_ANY, "vnet_hdr", "vnet_hdr %s ", rta_getattr_u8(tb[IFLA_TUN_VNET_HDR])); } print_mq(f, tb); if (tb[IFLA_TUN_PERSIST]) print_on_off(PRINT_ANY, "persist", "persist %s ", rta_getattr_u8(tb[IFLA_TUN_PERSIST])); if (tb[IFLA_TUN_OWNER]) print_owner(f, rta_getattr_u32(tb[IFLA_TUN_OWNER])); if (tb[IFLA_TUN_GROUP]) print_group(f, rta_getattr_u32(tb[IFLA_TUN_GROUP])); }
void tun_print_opt(long a1, long a2, long *a3) { unsigned char v3; char v4; char v5; char v6; __uid_t v7; __gid_t v8; if ( a3 ) { if ( a3[3] ) { v3 = rta_getattr_u8(a3[3]); print_type(a2, v3); } if ( a3[4] ) { v4 = rta_getattr_u8(a3[4]); print_on_off(4u, (long)"pi", (long)"pi %s ", v4 != 0); } if ( a3[5] ) { v5 = rta_getattr_u8(a3[5]); print_on_off(4u, (long)"vnet_hdr", (long)"vnet_hdr %s ", v5 != 0); } print_mq(a2, a3); if ( a3[6] ) { v6 = rta_getattr_u8(a3[6]); print_on_off(4u, (long)"persist", (long)"persist %s ", v6 != 0); } if ( a3[1] ) { v7 = rta_getattr_u32(a3[1]); print_owner(a2, v7); } if ( a3[2] ) { v8 = rta_getattr_u32(a3[2]); print_group(a2, v8); } } }
static int dup_strings(char ***dstp, size_t *ndstp, char **src, size_t nsrc) { char **dst; size_t i, j; *dstp = ((void *)0) ; *ndstp = 0; if (nsrc == 0) return 0; if ((dst = calloc(nsrc, sizeof(*src))) == ((void *)0) ) return -1; for (i = 0; i < nsrc; i++) { if ((dst[i] = strdup(src[i])) == ((void *)0) ) { for (j = 0; j < i; j++) free(dst[j]); free(dst); return -1; } } *dstp = dst; *ndstp = nsrc; return 0; }
int dup_strings(unsigned long long *a0, unsigned long long *a1, void* a2, unsigned int a3) { void* v0; void* v1; void* v2; unsigned int v4; unsigned long long *v5; *(a0) = 0; *(a1) = 0; if (!a3) { v4 = 0; return v4; } v2 = calloc(a3, 0x8); if (!v2) { v4 = -1; return v4; } v0 = 0; while (true) { if (v0 < a3) { v5 = v0 * 8 + v2; *(v5) = strdup(*((a2 + 0x8 * v0))); if (*(v5)) { v0 += 1; } else { for (v1 = 0; v1 < v0; v1 += 1) { free(*((v2 + 0x8 * v1))); } free(v2); v4 = -1; return v4; } } else { *(a0) = v2; *(a1) = a3; v4 = 0; return v4; } } }
static void coproc_free (cp) struct coproc *cp; { sh_xfree((cp), "execute_cmd.c", 2062); }
void coproc_free(undefined8 param_1) { sh_xfree(param_1,"execute_cmd.c",0x80e); return; }
static void cmd_parser(int argc, char **argv) { process_options(argc,argv); gnutls_global_set_log_function(tls_log_func); if (systemkey_tool_options.present.debug) { gnutls_global_set_log_level(systemkey_tool_options.value.debug); printf("Setting log level to %d\n", (int) systemkey_tool_options.value.debug); } if (systemkey_tool_options.present.outder) { outcert_format = GNUTLS_X509_FMT_DER; outkey_format = GNUTLS_X509_FMT_DER; } else { outcert_format = GNUTLS_X509_FMT_PEM; outkey_format = GNUTLS_X509_FMT_PEM; } if (systemkey_tool_options.present.outfile) { outfile = safe_open_rw(systemkey_tool_options.arg.outfile, 0); if (outfile == ((void *)0) ) { fprintf( stderr , "%s", systemkey_tool_options.arg.outfile); app_exit(1); } outfile_name = systemkey_tool_options.arg.outfile; } else outfile = stdout ; if (systemkey_tool_options.present.delete) { systemkey_delete(systemkey_tool_options.arg.delete, outfile); } else if (systemkey_tool_options.present.list) { systemkey_list(outfile); } else { usage ( stdout , (1)); } fclose(outfile); gnutls_global_deinit(); }
void cmd_parser(unsigned long long a0, unsigned long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5) { unsigned long long v1; process_options(a0, a1, a1); gnutls_global_set_log_function(tls_log_func); if (systemkey_tool_options) { gnutls_global_set_log_level(usage); a1 = usage; printf("Setting log level to %d\n", usage); } if (g_500034) { outcert_format = 0; outkey_format = 0; } else { outcert_format = 1; outkey_format = 1; } if (!g_500031) { outfile = stdout; } else { outfile = safe_open_rw(printf, 0x0); if (!outfile) { fprintf(stderr, "%s", printf); app_exit(0x1); } outfile_name = printf; } if (g_500033) { systemkey_delete(safe_open_rw, outfile); } else if (!g_500032) { usage(stdout, 0x1); } else { systemkey_list(outfile); } fclose(outfile); v1 = gnutls_global_deinit(a0, a1, a2, a3, a4, a5); return; }
static void * tar_pool_alloc(size_t size) { if (!tar_pool_init) { _obstack_begin (( &tar_pool ), 0, 0, (void *(*)(long)) m_malloc , (void (*)(void *)) free ) ; tar_pool_init = 1 ; } return __extension__ ({ struct obstack *__h = ( &tar_pool ); __extension__ ({ struct obstack *__o = (__h); int __len = (( size )); if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); ((__o)->next_free += (__len)); (void) 0; }); __extension__ ({ struct obstack *__o1 = (__h); void *__value = (void *) __o1->object_base; if (__o1->next_free == __value) __o1->maybe_empty_object = 1; __o1->next_free = ((sizeof (long int) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (((__o1->next_free) - (sizeof (long int) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (__o1->alignment_mask)) & ~(__o1->alignment_mask))); if (__o1->next_free - (char *) __o1->chunk > __o1->chunk_limit - (char *) __o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; __value; }); }) ; }
int tar_pool_alloc(unsigned long long a0) { unsigned long long v0; unsigned long long v1; unsigned long long v2; unsigned long v3; if ((tar_pool_init ^ 1)) { _obstack_begin(&tar_pool, 0x0, 0x0, got.m_malloc, got.free); tar_pool_init = 1; } v0 = &tar_pool; v1 = v0; if (*((v1 + 32)) - *((v1 + 24)) < a0) _obstack_newchunk(v1, a0, a0); *((v1 + 24)) = *((v1 + 24)) + a0; v2 = v0; v3 = *((v2 + 16)); if (v3 == *((v2 + 24))) *((v2 + 80)) = *((v2 + 80)) | 2; *((v2 + 24)) = !(*((v2 + 48))) & *((v2 + 24)) + *((v2 + 48)); if (*((v2 + 24)) > *((v2 + 32))) *((v2 + 24)) = *((v2 + 32)); *((v2 + 16)) = *((v2 + 24)); return v3; }
void rl_free_line_state (void) { register HIST_ENTRY *entry; rl_free_undo_list (); entry = current_history (); if (entry) entry->data = (char *) ((void *)0) ; _rl_kill_kbd_macro (); rl_clear_message (); _rl_reset_argument (); }
void rl_free_line_state(unsigned long long a0, unsigned long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5) { char v0; unsigned long long v1; struct_0 *v2; unsigned long long v3; rl_free_undo_list(); v2 = current_history(a0, a1, a2, a3, a4, a5, *(&v0), v1); if (v2) v2->field_10 = 0; _rl_kill_kbd_macro(); rl_clear_message(a0, a1, a2, a3, a4, a5); v3 = _rl_reset_argument(a0, a1, a2, a3, a4, a5); return; }
int maintscript_fallback(struct pkginfo *pkg, const char *scriptname, const char *desc, const char *cidir, char *cidirrest, const char *ifok, const char *iffallback) { struct command cmd; const char *oldscriptpath; struct stat stab; char *buf; oldscriptpath = pkg_infodb_get_file(pkg, &pkg->installed, scriptname); m_asprintf(&buf, gettext("old %s package %s script"), pkg_name(pkg, pnaw_nonambig), desc); command_init(&cmd, oldscriptpath, buf); command_add_args(&cmd, scriptname, ifok, versiondescribe(&pkg->available.version, vdew_nonambig), ((void *)0) ); if (stat(oldscriptpath, &stab)) { if ( (*__errno_location ()) == 2 ) { debug(dbg_scripts, "maintscript_fallback nonexistent %s '%s'", scriptname, oldscriptpath); command_destroy(&cmd); free(buf); return 0; } warning(gettext("unable to stat %s '%.250s': %s"), cmd.name, oldscriptpath, strerror( (*__errno_location ()) )); } else { if (!maintscript_exec(pkg, &pkg->installed, &cmd, &stab, SUBPROC_WARN)) { command_destroy(&cmd); free(buf); post_script_tasks(); return 1; } } notice(gettext("trying script from the new package instead ...")); strcpy(cidirrest, scriptname); m_asprintf(&buf, gettext("new %s package %s script"), pkg_name(pkg, pnaw_nonambig), desc); command_destroy(&cmd); command_init(&cmd, cidir, buf); command_add_args(&cmd, scriptname, iffallback, versiondescribe(&pkg->installed.version, vdew_nonambig), versiondescribe(&pkg->available.version, vdew_nonambig), ((void *)0) ); if (stat(cidir, &stab)) { command_destroy(&cmd); if ( (*__errno_location ()) == 2 ) ohshit(gettext("there is no script in the new version of the package - giving up")); else ohshite(gettext("unable to stat %s '%.250s'"), buf, cidir); } maintscript_exec(pkg, &pkg->available, &cmd, &stab, 0); notice(gettext("... it looks like that went OK")); command_destroy(&cmd); free(buf); post_script_tasks(); return 1; }
undefined8 maintscript_fallback (long param_1,char *param_2,undefined8 param_3,char *param_4,char *param_5, undefined8 param_6,undefined8 param_7) { void *pvVar1; int iVar2; undefined8 uVar3; undefined8 uVar4; int *piVar5; char *pcVar6; long in_FS_OFFSET; void *local_e8; char *local_e0; undefined8 local_d8 [4]; stat local_b8; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_e0 = (char *)pkg_infodb_get_file(param_1,param_1 + 0x48,param_2); uVar3 = pkg_name(param_1,1); uVar4 = gettext("old %s package %s script"); m_asprintf(&local_e8,uVar4,uVar3,param_3); command_init(local_d8,local_e0,local_e8); uVar3 = versiondescribe(param_1 + 0x110,1); command_add_args(local_d8,param_2,param_6,uVar3,0); iVar2 = stat(local_e0,&local_b8); if (iVar2 == 0) { iVar2 = maintscript_exec(param_1,param_1 + 0x48,local_d8,&local_b8,1); if (iVar2 == 0) { command_destroy(local_d8); free(local_e8); post_script_tasks(); uVar3 = 1; goto LAB_001011ba; } } else { piVar5 = __errno_location(); if (*piVar5 == 2) { debug(2,"maintscript_fallback nonexistent %s \'%s\'",param_2,local_e0); command_destroy(local_d8); free(local_e8); uVar3 = 0; goto LAB_001011ba; } piVar5 = __errno_location(); pcVar6 = strerror(*piVar5); uVar3 = gettext("unable to stat %s \'%.250s\': %s"); warning(uVar3,local_d8[0],local_e0,pcVar6); } uVar3 = gettext("trying script from the new package instead ..."); notice(uVar3); strcpy(param_5,param_2); uVar3 = pkg_name(param_1,1); uVar4 = gettext("new %s package %s script"); m_asprintf(&local_e8,uVar4,uVar3,param_3); command_destroy(local_d8); command_init(local_d8,param_4,local_e8); uVar3 = versiondescribe(param_1 + 0x110,1); uVar4 = versiondescribe(param_1 + 0x98,1); command_add_args(local_d8,param_2,param_7,uVar4,uVar3,0); iVar2 = stat(param_4,&local_b8); if (iVar2 != 0) { command_destroy(local_d8); piVar5 = __errno_location(); if (*piVar5 == 2) { uVar3 = gettext("there is no script in the new version of the package - giving up"); ohshit(uVar3); } pvVar1 = local_e8; uVar3 = gettext("unable to stat %s \'%.250s\'"); ohshite(uVar3,pvVar1,param_4); } maintscript_exec(param_1,param_1 + 0xc0,local_d8,&local_b8,0); uVar3 = gettext("... it looks like that went OK"); notice(uVar3); command_destroy(local_d8); free(local_e8); post_script_tasks(); uVar3 = 1; LAB_001011ba: if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return uVar3; }
static void output_one_tex_line (void) { BLOCK key; BLOCK after; char *cursor; printf ("\\%s ", macro_name); putchar_unlocked ('{'); print_field (tail); fputs_unlocked ("}{", stdout ); print_field (before); fputs_unlocked ("}{", stdout ); key.start = keyafter.start; after.end = keyafter.end; cursor = keyafter.start; if (word_regex.string) { regoff_t count; count = re_match (&word_regex.pattern, cursor, keyafter.end - cursor, 0, ((void *)0) ); if (count == -2) matcher_error (); cursor += count == -1 ? 1 : count; } else if (word_fastmap[to_uchar (*cursor)]) while (cursor < keyafter.end && word_fastmap[to_uchar (*cursor)]) cursor++; else cursor++; key.end = cursor; after.start = cursor; print_field (key); fputs_unlocked ("}{", stdout ); print_field (after); fputs_unlocked ("}{", stdout ); print_field (head); putchar_unlocked ('}'); if (auto_reference || input_reference) { putchar_unlocked ('{'); print_field (reference); putchar_unlocked ('}'); } putchar_unlocked ('\n'); }
void output_one_tex_line(void) { char *pcVar1; char *pcVar2; byte bVar3; int iVar4; long lVar5; char *local_30; printf("\\%s ",macro_name); putchar_unlocked(0x7b); print_field(tail._0_8_,tail._8_8_); fputs_unlocked("}{",stdout);
int get_email_protection_status(void) { if (batch) { return cfg.email_protection_key; } else { return read_yesno ("Will the certificate be used for email protection? (y/N): ", 0); } }
long long get_email_protection_status() { unsigned long long v1; if (*(got.batch)) v1 = *((got.cfg + 596)); else v1 = read_yesno("Will the certificate be used for email protection? (y/N): ", 0x0); return v1; }
int setselections(const char *const *argv) { enum modstatdb_rw msdbflags; const struct namevalue *nv; struct pkginfo *pkg; int c, lno; struct varbuf namevb = { 0, 0, ((void *)0) }; struct varbuf selvb = { 0, 0, ((void *)0) }; _Bool db_possibly_outdated = 0 ; if (*argv) badusage(gettext("--%s takes no arguments"), cipaction->olong); msdbflags = msdbrw_available_readonly; if (f_noact) msdbflags |= msdbrw_readonly; else msdbflags |= msdbrw_write; modstatdb_open(msdbflags); pkg_infodb_upgrade(); lno= 1; for (;;) { struct dpkg_error err; do { c = getchar(); if (c == '\n') lno++; } while (c != (-1) && c_isspace(c)); if (c == (-1) ) break; if (c == '#') { do { c= getchar(); if (c == '\n') lno++; } while (c != (-1) && c != '\n'); continue; } varbuf_reset(&namevb); while (!c_isspace(c)) { varbuf_add_char(&namevb, c); c= getchar(); if (c == (-1) ) ohshit(gettext("unexpected end of file in package name at line %d"), lno); if (c == '\n') ohshit(gettext("unexpected end of line in package name at line %d"),lno); } varbuf_end_str(&namevb); while (c != (-1) && c_isspace(c)) { c= getchar(); if (c == (-1) ) ohshit(gettext("unexpected end of file after package name at line %d"), lno); if (c == '\n') ohshit(gettext("unexpected end of line after package name at line %d"),lno); } varbuf_reset(&selvb); while (c != (-1) && !c_isspace(c)) { varbuf_add_char(&selvb, c); c= getchar(); } varbuf_end_str(&selvb); while (c != (-1) && c != '\n') { c= getchar(); if (!c_isspace(c)) ohshit(gettext("unexpected data after package and selection at line %d"),lno); } pkg = pkg_spec_parse_pkg(namevb.buf, &err); if (pkg == ((void *)0) ) ohshit(gettext("illegal package name at line %d: %.250s"), lno, err.str); if (!pkg_is_informative(pkg, &pkg->installed) && !pkg_is_informative(pkg, &pkg->available)) { db_possibly_outdated = 1 ; warning(gettext("package not in status nor available database at line %d: %.250s"), lno, namevb.buf); lno++; continue; } nv = namevalue_find_by_name(wantinfos, selvb.buf); if (nv == ((void *)0) ) ohshit(gettext("unknown wanted status at line %d: %.250s"), lno, selvb.buf); pkg_set_want(pkg, nv->value); if (c == (-1) ) break; lno++; } if (ferror( stdin )) ohshite(gettext("read error on standard input")); modstatdb_shutdown(); varbuf_destroy(&namevb); varbuf_destroy(&selvb); if (db_possibly_outdated) warning(gettext("found unknown packages; this might mean the available database\n" "is outdated, and needs to be updated through a frontend method;\n" "please see the FAQ <https: ); return 0; }
long long setselections(unsigned long long a0, unsigned long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5) { unsigned long long *v0; char v1; unsigned int v2; unsigned int v3; unsigned int v4; unsigned long long v5; struct_0 *v6; char v7; char v8; void* v9; void* v10; void* v11; void* v12; void* v13; void* v14; unsigned long long v16; unsigned long long v17; unsigned long long v18; unsigned long long v20; v0 = a0; v9 = 0; v10 = 0; v11 = 0; v12 = 0; v13 = 0; v14 = 0; v1 = 0; if (*(v0)) badusage(gettext("--%s takes no arguments"), *(cipaction)); v2 = 0x100; if (!f_noact) v2 |= 3; modstatdb_open(v2); pkg_infodb_upgrade(a0, *(cipaction), a2, a3, a4, a5); v4 = 1; while (true) { v3 = getchar(); if (v3 == 10) v4 += 1; if (v3 != -1 && !(!c_isspace(v3))) continue; if (v3 == -1) break; if (v3 == 35) { while (true) { v3 = getchar(); if (v3 == 10) v4 += 1; if (v3 == -1) break; if (v3 == 10) break; } goto LABEL_40068c; } else { varbuf_reset(&v9); while (true) { v16 = c_isspace(v3) ^ 1; if (!v16) break; varbuf_add_char(&v9, v3, v3); v3 = getchar(); if (v3 == -1) { v17 = gettext("unexpected end of file in package name at line %d"); ohshit(v17, v4, v17); } if (v3 == 10) { v18 = gettext("unexpected end of line in package name at line %d"); ohshit(v18, v4, v18); } } varbuf_end_str(&v9); while (true) { if (v3 == -1) break; a0 = v3; if (!c_isspace(v3)) break; v3 = getchar(); if (v3 == -1) { v16 = gettext("unexpected end of file after package name at line %d"); ohshit(v16, v4, v16); } if (!(v3 == 10)) continue; v16 = gettext("unexpected end of line after package name at line %d"); ohshit(v16, v4, v16); } varbuf_reset(&v12); while (true) { if (v3 == -1) break; a0 = v3; *(&v16) = c_isspace(v3) ^ 1; if (!v16) break; varbuf_add_char(&v12, v3, v3); v3 = getchar(); } varbuf_end_str(&v12); while (true) { if (v3 == -1) break; if (v3 == 10) break; v3 = getchar(); a0 = v3; *(&v16) = c_isspace(v3) ^ 1; if (!v16) continue; v16 = gettext("unexpected data after package and selection at line %d"); ohshit(v16, v4, v16); } v5 = pkg_spec_parse_pkg(v11, &v7, &v7); if (!v5) ohshit(gettext("illegal package name at line %d: %.250s"), v4, *(&v8)); *(&v16) = pkg_is_informative(v5, v5 + 72, v5 + 72) ^ 1; if (v16) { *(&v16) = pkg_is_informative(v5, v5 + 192, v5 + 192) ^ 1; if (v16) { v1 = 1; v20 = gettext("package not in status nor available database at line %d: %.250s"); warning(v20, v4, v11, v20); v4 += 1; LABEL_40068c: continue; } } v6 = namevalue_find_by_name(0x500110, v14); if (!v6) ohshit(gettext("unknown wanted status at line %d: %.250s"), v4, v14); pkg_set_want(v5, v6->field_8, v6->field_8); if (v3 == -1) break; v4 += 1; } } if (ferror(stdin)) ohshite(gettext("read error on standard input")); modstatdb_shutdown(a0, a1, a2, a3, a4, a5); varbuf_destroy(&v9); varbuf_destroy(&v12); if (v1) warning(gettext("found unknown packages; this might mean the available database\nis outdated, and needs to be updated through a frontend method;\nplease see the FAQ <https: return 0; }
int sshbuf_get_u16(struct sshbuf *buf, u_int16_t *valp) { const u_char *p = sshbuf_ptr(buf); int r; if ((r = sshbuf_consume(buf, 2)) < 0) return r; if (valp != ((void *)0) ) *valp = (((u_int16_t)(((const u_char *)(p))[0]) << 8) | (u_int16_t)(((const u_char *)(p))[1])); return 0; }
long long sshbuf_get_u16(unsigned long long a0, unsigned short *a1, unsigned long long a2) { unsigned int v0; char v1[2]; void* v3; *(&v1) = sshbuf_ptr(a0); v0 = sshbuf_consume(a0, 0x2, a2); if (v0 < 0) { v3 = v0; } else { if (a1) *(a1) = v1[1] | (v1[0] * 0x100); v3 = 0; } return v3; }
void popstackmark(struct stackmark *mark) { struct stack_block *sp; ({ suppressint++; ({ __asm__ __volatile__ ("": : :"memory"); }); 0; }); while (stackp != mark->stackp) { sp = stackp; stackp = sp->prev; free((pointer)(sp)); } stacknxt = mark->stacknxt; stacknleft = mark->stacknleft; sstrend = mark->stacknxt + mark->stacknleft; ({ ({ __asm__ __volatile__ ("": : :"memory"); }); if (--suppressint == 0 && intpending) onint(); 0; }); }
long long popstackmark(unsigned long long a0[3]) { unsigned long long *v0; unsigned long long v2; suppressint = suppressint + 1; while (a0[0] != stackp) { v0 = stackp; stackp = *(v0); free(v0); } stacknxt = a0[1]; stacknleft = a0[2]; sstrend = a0[2] + a0[1]; suppressint = suppressint - 1; v2 = suppressint; if (!suppressint) { v2 = intpending; if (intpending) v2 = onint(); } return v2; }
static void print_x509_info(gnutls_session_t session, FILE *out, int flag, int print_cert, int print_crt_status) { gnutls_x509_crt_t crt; const gnutls_datum_t *cert_list; unsigned int cert_list_size = 0, j; int ret; cert_list = gnutls_certificate_get_peers(session, &cert_list_size); if (cert_list_size == 0) { if (print_crt_status) fprintf( stderr , "No certificates found!\n"); return; } log_msg(out, "- Certificate type: X.509\n"); log_msg(out, "- Got a certificate list of %d certificates.\n", cert_list_size); for (j = 0; j < cert_list_size; j++) { gnutls_datum_t cinfo; ret = gnutls_x509_crt_init(&crt); if (ret < 0) { fprintf( stderr , "Memory error\n"); return; } ret = gnutls_x509_crt_import(crt, &cert_list[j], GNUTLS_X509_FMT_DER); if (ret < 0) { fprintf( stderr , "Decoding error: %s\n", gnutls_strerror(ret)); return; } log_msg(out, "- Certificate[%d] info:\n - ", j); if (flag == GNUTLS_CRT_PRINT_COMPACT && j > 0) flag = GNUTLS_CRT_PRINT_ONELINE; ret = gnutls_x509_crt_print(crt, flag, &cinfo); if (ret == 0) { log_msg(out, "%s\n", cinfo.data); gnutls_free((void *) (cinfo.data)), cinfo.data= ((void *)0) ; } if (print_cert) { gnutls_datum_t pem; ret = gnutls_x509_crt_export2(crt, GNUTLS_X509_FMT_PEM, &pem); if (ret < 0) { fprintf( stderr , "Encoding error: %s\n", gnutls_strerror(ret)); return; } log_msg(out, "\n%s\n", (char*)pem.data); gnutls_free((void *) (pem.data)), pem.data= ((void *)0) ; } gnutls_x509_crt_deinit(crt); } }
void print_x509_info(undefined8 param_1,undefined8 param_2,int param_3,int param_4,int param_5) { undefined8 uVar1; long in_FS_OFFSET; int local_6c; uint local_54; uint local_50; int local_4c; undefined8 local_48; long local_40; undefined8 local_38 [2]; undefined8 local_28 [3]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_54 = 0; local_40 = gnutls_certificate_get_peers(param_1,&local_54); if (local_54 == 0) { if (param_5 != 0) { fprintf(stderr,"No certificates found!\n"); } } else { log_msg(param_2,"- Certificate type: X.509\n"); log_msg(param_2,"- Got a certificate list of %d certificates.\n",local_54); local_6c = param_3; for (local_50 = 0; local_50 < local_54; local_50 = local_50 + 1) { local_4c = gnutls_x509_crt_init(&local_48); if (local_4c < 0) { fprintf(stderr,"Memory error\n"); break; } local_4c = gnutls_x509_crt_import(local_48,(ulong)local_50 * 0x10 + local_40,0); if (local_4c < 0) { uVar1 = gnutls_strerror(local_4c); fprintf(stderr,"Decoding error: %s\n",uVar1); break; } log_msg(param_2,"- Certificate[%d] info:\n - ",local_50); if ((local_6c == 3) && (local_50 != 0)) { local_6c = 1; } local_4c = gnutls_x509_crt_print(local_48,local_6c,local_38); if (local_4c == 0) { log_msg(param_2,&DAT_00104734,local_38[0]); (*gnutls_free)(local_38[0]); local_38[0] = 0; } if (param_4 != 0) { local_4c = gnutls_x509_crt_export2(local_48,1,local_28); if (local_4c < 0) { uVar1 = gnutls_strerror(local_4c); fprintf(stderr,"Encoding error: %s\n",uVar1); break; } log_msg(param_2,&DAT_0010474c,local_28[0]); (*gnutls_free)(local_28[0]); local_28[0] = 0; } gnutls_x509_crt_deinit(local_48); } } if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) { return; } __stack_chk_fail(); }
static gl_list_t gl_linked_nx_create_empty (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, _Bool allow_duplicates) { struct gl_list_impl *list = (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl)); if (list == ((void *)0) ) return ((void *)0) ; list->base.vtable = implementation; list->base.equals_fn = equals_fn; list->base.hashcode_fn = hashcode_fn; list->base.dispose_fn = dispose_fn; list->base.allow_duplicates = allow_duplicates; list->root.next = &list->root; list->root.prev = &list->root; list->count = 0; return list; }
long long gl_linked_nx_create_empty(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3, unsigned long a4) { struct_0 *v0; void* v2; v0 = malloc(0x48); if (!v0) { v2 = 0; } else { v0->field_0 = a0; v0->field_8 = a1; v0->field_10 = a2; v0->field_18 = a3; v0->field_20 = a4; v0->field_28 = &v0->field_28; v0->field_30 = &v0->field_28; v0->field_40 = 0; v2 = v0; } return v2; }
int gzdirect(file) gzFile file; { gz_statep state; if (file == ((void *)0) ) return 0; state = (gz_statep)file; if (state->mode == 7247 && state->how == 0 && state->x.have == 0) (void)gz_look(state); return state->direct; }
long long gzdirect(unsigned int a0[18]) { void* v1; if (!a0) { v1 = 0; } else { if (a0[6] == 7247 && !a0[17] && !a0[0]) gz_look(a0); v1 = a0[16]; } return v1; }
struct ssh_hmac_ctx * ssh_hmac_start(int alg) { struct ssh_hmac_ctx *ret; if ((ret = calloc(1, sizeof(*ret))) == ((void *)0) ) return ((void *)0) ; ret->alg = alg; if ((ret->ictx = ssh_digest_start(alg)) == ((void *)0) || (ret->octx = ssh_digest_start(alg)) == ((void *)0) || (ret->digest = ssh_digest_start(alg)) == ((void *)0) ) goto fail; ret->buf_len = ssh_digest_blocksize(ret->ictx); if ((ret->buf = calloc(1, ret->buf_len)) == ((void *)0) ) goto fail; return ret; fail: ssh_hmac_free(ret); return ((void *)0) ; }
long long ssh_hmac_start(unsigned long a0) { void* v0; void* v2; v0 = calloc(0x1, 0x30); if (!v0) { v2 = 0; } else { *(v0) = a0; *(&v0[8]) = ssh_digest_start(a0); if (v0[8]) { *(&v0[16]) = ssh_digest_start(a0); if (v0[16]) { *(&v0[24]) = ssh_digest_start(a0); if (v0[24]) { *(&v0[40]) = ssh_digest_blocksize(v0[8]); *(&v0[32]) = calloc(0x1, v0[40]); if (v0[32]) { v2 = v0; goto LABEL_400118; } } } } ssh_hmac_free(v0); v2 = 0; } LABEL_400118: return v2; }
static void process_realpath(u_int32_t id) { char resolvedname[ 4096 ]; char *path; int r; if ((r = sshbuf_get_cstring(iqueue, &path, ((void *)0) )) != 0) sshfatal("sftp-server.c", __func__, 1248, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "parse"); if (path[0] == '\0') { free(path); path = xstrdup("."); } sshlog("sftp-server.c", __func__, 1254, 0, SYSLOG_LEVEL_DEBUG3, ((void *)0) , "request %u: realpath", id); sshlog("sftp-server.c", __func__, 1255, 0, SYSLOG_LEVEL_VERBOSE, ((void *)0) , "realpath \"%s\"", path); if (sftp_realpath(path, resolvedname) == ((void *)0) ) { send_status(id, errno_to_portable( (*__errno_location ()) )); } else { Stat s; attrib_clear(&s.attrib); s.name = s.long_name = resolvedname; send_names(id, 1, &s); } free(path); }
void process_realpath(uint param_1) { int iVar1; undefined4 uVar2; undefined8 uVar3; long lVar4; int *piVar5; char **ppcVar6; long in_FS_OFFSET; char *pcStack4232; undefined8 uStack4224; undefined auStack4216 [12]; uint local_106c; int local_1064; char *local_1060; undefined *local_1058; undefined *local_1050; undefined auStack4168 [48]; undefined local_1018 [4104]; long local_10; ppcVar6 = (char **)auStack4216; local_10 = *(long *)(in_FS_OFFSET + 0x28); uStack4224 = 0x1040c9; local_106c = param_1; local_1064 = sshbuf_get_cstring(iqueue,&local_1060,0); if (local_1064 != 0) { uStack4224 = 0x1040e5; uVar3 = ssh_err(local_1064); ppcVar6 = &pcStack4232; pcStack4232 = "parse"; sshfatal("sftp-server.c","process_realpath",0x4e0,1,1,uVar3); } if (*local_1060 == '\0') { *(undefined8 *)((long)ppcVar6 + -8) = 0x104139; free(local_1060); *(undefined8 *)((long)ppcVar6 + -8) = 0x104145; local_1060 = (char *)xstrdup(&DAT_00108617); } *(ulong *)((long)ppcVar6 + -8) = (ulong)local_106c; *(char **)((long)ppcVar6 + -0x10) = "request %u: realpath"; *(undefined8 *)((long)ppcVar6 + -0x18) = 0x104189; sshlog("sftp-server.c","process_realpath",0x4e6,0,7,0); *(char **)((long)ppcVar6 + -8) = local_1060; *(char **)((long)ppcVar6 + -0x10) = "realpath \"%s\""; *(undefined8 *)((long)ppcVar6 + -0x18) = 0x1041cb; sshlog("sftp-server.c","process_realpath",0x4e7,0,4,0); *(undefined8 *)((long)ppcVar6 + -8) = 0x1041e8; lVar4 = sftp_realpath(local_1060,local_1018); if (lVar4 == 0) { *(undefined8 *)((long)ppcVar6 + -8) = 0x1041f2; piVar5 = __errno_location(); iVar1 = *piVar5; *(undefined8 *)((long)ppcVar6 + -8) = 0x1041fb; uVar2 = errno_to_portable(iVar1); *(undefined8 *)((long)ppcVar6 + -8) = 0x10420c; send_status(local_106c,uVar2); } else { *(undefined8 *)((long)ppcVar6 + -8) = 0x104221; attrib_clear(auStack4168); local_1058 = local_1018; *(undefined8 *)((long)ppcVar6 + -8) = 0x104256; local_1050 = local_1058; send_names(local_106c,1,&local_1058); } *(undefined8 *)((long)ppcVar6 + -8) = 0x104265; free(local_1060); if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { *(undefined8 *)((long)ppcVar6 + -8) = 0x10427a; __stack_chk_fail(); } return; }
static char * read_comsub (fd, quoted, flags, rflag) int fd, quoted, flags; int *rflag; { char *istring, buf[4096], *bufp; int c, tflag, skip_ctlesc, skip_ctlnul; int mb_cur_max; size_t istring_index; size_t istring_size; ssize_t bufn; int nullbyte; mbstate_t ps; wchar_t wc; size_t mblen; int i; istring = (char *) ((void *)0) ; istring_index = istring_size = bufn = tflag = 0; skip_ctlesc = ifs_cmap['\001']; skip_ctlnul = ifs_cmap['\177']; mb_cur_max = (__ctype_get_mb_cur_max ()) ; nullbyte = 0; while (1) { if (fd < 0) break; if (--bufn <= 0) { bufn = zread (fd, buf, sizeof (buf)); if (bufn <= 0) break; bufp = buf; } c = *bufp++; if (c == 0) { if (nullbyte == 0) { internal_warning ("%s", gettext("command substitution: ignored null byte in input")); nullbyte = 1; } continue; } do { if ((istring_index) + (mb_cur_max+1) >= istring_size) { while ((istring_index) + (mb_cur_max+1) >= istring_size) istring_size += (512); istring = sh_xrealloc((istring), (istring_size), "subst.c", 6826); } } while (0); if ((quoted & (0x002|0x001)) ) istring[istring_index++] = '\001'; else if ((flags & 0x08) && skip_ctlesc && c == '\001') istring[istring_index++] = '\001'; else if (skip_ctlesc == 0 && c == '\001') istring[istring_index++] = '\001'; else if ((skip_ctlnul == 0 && c == '\177') || (c == ' ' && (ifs_value && *ifs_value == 0))) istring[istring_index++] = '\001'; if ((locale_utf8locale && (c & 0x80)) || (locale_utf8locale == 0 && mb_cur_max > 1 && (unsigned char)c > 127)) { memset (&ps, '\0', sizeof (mbstate_t)); mblen = mbrtowc (&wc, bufp-1, bufn, &ps); if (((mblen) == (size_t)-1 || (mblen) == (size_t)-2) || mblen == 0 || mblen == 1) istring[istring_index++] = c; else { istring[istring_index++] = c; for (i = 0; i < mblen-1; i++) istring[istring_index++] = *bufp++; bufn -= mblen - 1; } continue; } istring[istring_index++] = c; } if (istring) istring[istring_index] = '\0'; if (istring_index == 0) { do { if (istring) sh_xfree((istring), "subst.c", 6872); } while (0); if (rflag) *rflag = tflag; return (char *) ((void *)0) ; } if (quoted & (0x002|0x001)) { while (istring_index > 0) { if (istring[istring_index - 1] == '\n') { --istring_index; if (istring[istring_index - 1] == '\001') --istring_index; } else break; } istring[istring_index] = '\0'; } else strip_trailing (istring, istring_index - 1, 1); if (rflag) *rflag = tflag; return istring; }
long read_comsub(unsigned int a1, char a2, char a3, _DWORD *a4) { char *v4; char *v5; long v6; long v7; long v8; long v9; long v10; long v11; char *v12; long v13; long v14; wchar_t pwc; int v19; int i; int v21; int v22; int v23; int mb_cur_max; int v25; long v26; char *v27; long v28; unsigned long v29; size_t n; size_t v31; mbstate_t s; char v33[16]; unsigned long v34; v34 = __readfsqword(0x28u); v26 = 0LL; v21 = 0; n = 0LL; v29 = 0LL; v28 = 0LL; v22 = (unsigned char)ifs_cmap[1]; v23 = (unsigned char)ifs_cmap[127]; mb_cur_max = _ctype_get_mb_cur_max(); v19 = 0; while ( (a1 & 0x80000000) == 0 ) { if ( (long)--n <= 0 ) { n = zread(a1, v33, 4096LL); if ( (long)n <= 0 ) break; v27 = v33; } v4 = v27++; v25 = *v4; if ( v25 ) { if ( v29 <= mb_cur_max + 1 + v28 ) { while ( v29 <= mb_cur_max + 1 + v28 ) v29 += 512LL; v26 = sh_xrealloc(v26, v29, "subst.c", 6826LL); } if ( (a2 & 3) != 0 ) { v6 = v28++; *(_BYTE *)(v26 + v6) = 1; } else if ( (a3 & 8) != 0 && v22 && v25 == 1 ) { v7 = v28++; *(_BYTE *)(v26 + v7) = 1; } else if ( v22 || v25 != 1 ) { if ( !v23 && v25 == 127 || v25 == 32 && ifs_value && !*ifs_value ) { v9 = v28++; *(_BYTE *)(v26 + v9) = 1; } } else { v8 = v28++; *(_BYTE *)(v26 + v8) = 1; } if ( locale_utf8locale && (v25 & 0x80) != 0 || !locale_utf8locale && mb_cur_max > 1 && (v25 & 0x80u) != 0 ) { memset(&s, 0, sizeof(s)); v31 = mbrtowc(&pwc, v27 - 1, n, &s); if ( v31 == -1LL || v31 == -2LL || v31 <= 1 ) { v10 = v28++; *(_BYTE *)(v26 + v10) = v25; } else { v11 = v28++; *(_BYTE *)(v26 + v11) = v25; for ( i = 0; i < v31 - 1; ++i ) { v12 = v27++; v13 = v28++; *(_BYTE *)(v26 + v13) = *v12; } n = n - v31 + 1; } } else { v14 = v28++; *(_BYTE *)(v26 + v14) = v25; } } else if ( !v19 ) { v5 = gettext("command substitution: ignored null byte in input"); internal_warning("%s", v5); v19 = 1; } } if ( v26 ) *(_BYTE *)(v26 + v28) = 0; if ( v28 ) { if ( (a2 & 3) != 0 ) { while ( v28 && *(_BYTE *)(v28 - 1 + v26) == 10 ) { if ( *(_BYTE *)(--v28 - 1 + v26) == 1 ) --v28; } *(_BYTE *)(v26 + v28) = 0; } else { strip_trailing(v26, (unsigned int)(v28 - 1), 1LL); } if ( a4 ) *a4 = v21; return v26; } else { if ( v26 ) sh_xfree(v26, "subst.c", 6872LL); if ( a4 ) *a4 = v21; return 0LL; } }
static void local_do_shell(const char *args) { int status; char *shell; pid_t pid; if (!*args) args = ((void *)0) ; if ((shell = getenv("SHELL")) == ((void *)0) || *shell == '\0') shell = "/bin/sh" ; if ((pid = fork()) == -1) sshfatal("sftp.c", __func__, 339, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Couldn't fork: %s", strerror( (*__errno_location ()) )); if (pid == 0) { if (args) { sshlog("sftp.c", __func__, 344, 0, SYSLOG_LEVEL_DEBUG3, ((void *)0) , "Executing %s -c \"%s\"", shell, args); execl(shell, shell, "-c", args, (char *) ((void *)0) ); } else { sshlog("sftp.c", __func__, 347, 0, SYSLOG_LEVEL_DEBUG3, ((void *)0) , "Executing %s", shell); execl(shell, shell, (char *) ((void *)0) ); } fprintf( stderr , "Couldn't execute \"%s\": %s\n", shell, strerror( (*__errno_location ()) )); _exit(1); } while (waitpid(pid, &status, 0) == -1) if ( (*__errno_location ()) != 4 ) sshfatal("sftp.c", __func__, 356, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Couldn't wait for child: %s", strerror( (*__errno_location ()) )); if (! ((( status ) & 0x7f) == 0) ) sshlog("sftp.c", __func__, 358, 0, SYSLOG_LEVEL_ERROR, ((void *)0) , "Shell exited abnormally"); else if ( ((( status ) & 0xff00) >> 8) ) sshlog("sftp.c", __func__, 360, 0, SYSLOG_LEVEL_ERROR, ((void *)0) , "Shell exited with status %d", ((( status ) & 0xff00) >> 8) ); }
void local_do_shell(unsigned long a0) { unsigned long v0; void* v1; unsigned long long v2; unsigned int v3; unsigned long long v4; unsigned long long v5; unsigned long long v6; char v7; unsigned long long v8; unsigned long long *v10; unsigned long long v11; v1 = a0; if (!*(v1)) v1 = 0; v4 = getenv("SHELL"); if (v4 && !(!*(v4))) goto LABEL_40029d; v4 = "/bin/sh"; LABEL_40029d: v3 = fork(); if (v3 == -1) { v0 = strerror(*(__errno_location())); sshfatal("sftp.c", "local_do_shell", 0x153, 0x0, 0x1, 0x0, "Couldn't fork: %s"); } if (!v3) { if (!v1) { v6 = v4; v5 = "Executing %s"; sshlog("sftp.c", "local_do_shell", 0x15b, 0x0, 0x7, 0x0, *(&v7), v8); execl(v4, v4); } else { v5 = v1; v4 = v4; v2 = "Executing %s -c \"%s\""; sshlog("sftp.c", "local_do_shell", 0x158, 0x0, 0x7, 0x0, *(&v7), v8); execl(v4, v4); } fprintf(stderr, "Couldn\'t execute \"%s\": %s\n", v4, strerror(*(__errno_location()))); _exit(0x1); } else { while (true) { if (waitpid(v3, &v2, 0x0) != -1) break; if (*(__errno_location()) == 4) continue; v6 = strerror(*(__errno_location())); v5 = "Couldn't wait for child: %s"; sshfatal("sftp.c", "local_do_shell", 0x164, 0x0, 0x1, 0x0, *(&v7)); } if ((v2 & 127)) { v5 = "Shell exited abnormally"; sshlog("sftp.c", "local_do_shell", 0x166, 0x0, 0x2, 0x0, *(&v7), v8); } else if ((v2 >> 8)) { v6 = v2 >> 8; v5 = "Shell exited with status %d"; sshlog("sftp.c", "local_do_shell", 0x168, 0x0, 0x2, 0x0, *(&v7), v8); } v11 = v5 ^ v10[5]; return; } }
static inline __u8 rta_getattr_u8(const struct rtattr *rta) { return *(__u8 *)((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); }
long rta_getattr_u8(long a1) { return *(unsigned char *)(a1 + 4); }
static void xfrm_ae_flags_print(__u32 flags, void *arg) { FILE *fp = (FILE *)arg; fprintf(fp, " (0x%x) ", flags); if (!flags) return; if (flags & XFRM_AE_CR) fprintf(fp, " replay update "); if (flags & XFRM_AE_CE) fprintf(fp, " timer expired "); if (flags & XFRM_AE_CU) fprintf(fp, " policy updated "); }
void xfrm_ae_flags_print(unsigned long a0, void* a1) { char v0; unsigned long long v2; unsigned long long v3; unsigned long long v4; v2 = fprintf(a1, " (0x%x) ", a0); if (*(&v0)) { if ((*(&v0) & 16)) fprintf(a1, " replay update "); if ((*(&v0) & 32)) fprintf(a1, " timer expired "); v3 = *(&v0) & 64; if ((*(&v0) & 64)) v4 = fprintf(a1, " policy updated "); } return; }
int get_data_encipherment_status(void) { if (batch) { return cfg.data_encipherment; } else { return read_yesno("Will the certificate be used for data encryption? (y/N): ", 0); } }
long long get_data_encipherment_status() { unsigned long long v1; if (*(got.batch)) { v1 = *((got.cfg + 576)); return v1; } v1 = read_yesno("Will the certificate be used for data encryption? (y/N): ", 0x0); return v1; }
static VARLIST * vlist_alloc (nentries) int nentries; { VARLIST *vlist; vlist = (VARLIST *)sh_xmalloc((sizeof (VARLIST)), "variables.c", 4171); vlist->list = (SHELL_VAR **)sh_xmalloc(((nentries + 1) * sizeof (SHELL_VAR *)), "variables.c", 4172); vlist->list_size = nentries; vlist->list_len = 0; vlist->list[0] = (SHELL_VAR *) ((void *)0) ; return vlist; }
undefined8 * vlist_alloc(int param_1) { undefined8 *puVar1; undefined8 uVar2; puVar1 = (undefined8 *)sh_xmalloc(0x10,"variables.c",0x104b); uVar2 = sh_xmalloc((long)(param_1 + 1) << 3,"variables.c",0x104c); *puVar1 = uVar2; *(int *)(puVar1 + 1) = param_1; *(undefined4 *)((long)puVar1 + 0xc) = 0; *(undefined8 *)*puVar1 = 0; return puVar1; }
void zsyncfd (fd) int fd; { off_t off, r; off = lused - lind; r = 0; if (off > 0) r = lseek (fd, -off, 1 ); if (r != -1) lused = lind = 0; }
long long zsyncfd(unsigned long a0) { void* v0; unsigned int v1; unsigned long long v3; v3 = lused - lind; *(&v1) = lused - lind; v0 = 0; if (*(&v1) > 0) { v3 = lseek(a0, -(*(&v1)), 0x1); v0 = v3; } if (v0 != -1) { lind = 0; v3 = lind; lused = lind; } return v3; }
static void listener_free(const void *elt) { listener_item *j = (listener_item *)elt; free(j->http_request); free(j->http_response); if (j->fd >= 0) { if (j->close_ok) gnutls_bye(j->tls_session, GNUTLS_SHUT_WR); shutdown(j->fd, 2); close(j->fd); gnutls_deinit(j->tls_session); } }
long long listener_free(struct_0 *a0) { unsigned long long v1; free(a0->field_0); free(a0->field_8); v1 = a0->field_24; if (a0->field_24 >= 0) { if (a0->field_34) gnutls_bye(a0->field_28, 0x1); shutdown(a0->field_24, 0x2); close(a0->field_24); v1 = gnutls_deinit(a0->field_28); } return v1; }
SHELL_VAR * bind_array_element (entry, ind, value, flags) SHELL_VAR *entry; arrayind_t ind; char *value; int flags; { return (bind_array_var_internal (entry, ind, 0, value, flags)); }
void bind_array_element(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined4 param_4) { bind_array_var_internal(param_1,param_2,0,param_3,param_4); return; }
int login_logout(struct logininfo *li) { li->type = 8; return (login_write(li)); }
long long login_logout(struct_0 *a0) { a0->field_44 = 8; return login_write(a0); }
static void abformat_init (void) { char const *pb[2]; for (int recent = 0; recent < 2; recent++) pb[recent] = first_percent_b (long_time_format[recent]); if (! (pb[0] || pb[1])) return; char abmon[12][ABFORMAT_SIZE]; if (! abmon_init (abmon)) return; for (int recent = 0; recent < 2; recent++) { char const *fmt = long_time_format[recent]; for (int i = 0; i < 12; i++) { char *nfmt = abformat[recent][i]; int nbytes; if (! pb[recent]) nbytes = snprintf (nfmt, ABFORMAT_SIZE, "%s", fmt); else { if (! (pb[recent] - fmt <= ((( ABFORMAT_SIZE )<(0x7fffffff))?( ABFORMAT_SIZE ):(0x7fffffff)) )) return; int prefix_len = pb[recent] - fmt; nbytes = snprintf (nfmt, ABFORMAT_SIZE, "%.*s%s%s", prefix_len, fmt, abmon[i], pb[recent] + 2); } if (! (0 <= nbytes && nbytes < ABFORMAT_SIZE)) return; } } use_abformat = 1 ; }
void abformat_init(void) { char cVar1; long lVar2; long in_FS_OFFSET; undefined8 uVar3; int local_64c; int local_648; int local_644; int local_640; long local_628 [2]; undefined local_618 [1544]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); for (local_64c = 0; local_64c < 2; local_64c = local_64c + 1) { lVar2 = first_percent_b(*(undefined8 *)(long_time_format + (long)local_64c * 8)); local_628[local_64c] = lVar2; } if ((local_628[0] != 0) || (local_628[1] != 0)) { uVar3 = 0x1010f5; cVar1 = abmon_init(local_618); if (cVar1 == '\x01') { for (local_648 = 0; local_648 < 2; local_648 = local_648 + 1) { lVar2 = *(long *)(long_time_format + (long)local_648 * 8); for (local_644 = 0; local_644 < 0xc; local_644 = local_644 + 1) { if (local_628[local_648] == 0) { uVar3 = 0x1011b9; local_640 = snprintf(abformat + ((long)local_648 * 0xc + (long)local_644) * 0x80,0x80, "%s",lVar2); } else { if (0x80 < local_628[local_648] - lVar2) goto LAB_001012c1; local_640 = snprintf(abformat + ((long)local_648 * 0xc + (long)local_644) * 0x80,0x80, "%.*s%s%s",(ulong)(uint)((int)local_628[local_648] - (int)lVar2), lVar2,local_618 + (long)local_644 * 0x80,local_628[local_648] + 2, uVar3); } if ((local_640 < 0) || (0x7f < local_640)) goto LAB_001012c1; } } use_abformat = 1; } } LAB_001012c1: if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) { return; } __stack_chk_fail(); }
int forgetold(const char *const *argv) { if (*argv) badusage(gettext("--%s takes no arguments"), cipaction->olong); warning(gettext("obsolete '--%s' option; unavailable packages are automatically cleaned up"), cipaction->olong); return 0; }
undefined8 forgetold(long *param_1) { undefined8 uVar1; undefined8 uVar2; if (*param_1 != 0) { uVar1 = *cipaction; uVar2 = gettext("--%s takes no arguments"); badusage(uVar2,uVar1); } uVar1 = *cipaction; uVar2 = gettext("obsolete \'--%s\' option; unavailable packages are automatically cleaned up"); warning(uVar2,uVar1); return 0; }
static small F3_freeze(crypto_int16 x) { return int32_mod_uint14(x+1,3)-1; }
int F3_freeze(unsigned long a0, unsigned long a1, unsigned long long a2) { return int32_mod_uint14(__addvsi3(a0, 0x1, a2), 0x3) - 1; }
static _Bool one_argument (void) { return argv[pos++][0] != '\0'; }
bool one_argument() { int v0; v0 = pos++; return **(_BYTE **)(argv + 8LL * v0) != 0; }
static _Bool decode_time (struct timespec *ts, char const *arg, char const *keyword) { char *arg_lim; struct timespec t = decode_timespec (arg, &arg_lim, 1 ); if (! valid_timespec (t)) { if (arg < arg_lim && !*arg_lim) out_of_range_header (keyword, arg, ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)))), ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1)))); else do { if (error_hook) error_hook (); error (0, 0, gettext ("Malformed extended header: invalid %s=%s"), keyword, arg); exit_status = 2; } while (0) ; return 0 ; } *ts = t; return 1 ; }
int decode_time(unsigned long long a0[2], unsigned long a1, unsigned int a2) { char v0; unsigned long long v1; unsigned long long v2; unsigned int v5; v1 = decode_timespec(a1, &v0, 0x1, &v0); v2 = 1; if (!(valid_timespec(v1, v2, v1) ^ 1)) { a0[0] = v1; a0[1] = v2; v5 = 1; } else { if (a1 < *(&v0) && !*(*(&v0))) { out_of_range_header(a2, a1, 0x8000000000000000, 0x7fffffffffffffff); goto LABEL_402a4a; } if (error_hook) *(5242936)(); error(0x0, 0x0, gettext("Malformed extended header: invalid %s=%s")); exit_status = 2; LABEL_402a4a: v5 = 0; } return v5; }
static _Bool tar_sparse_dump_region (struct tar_sparse_file *file, size_t i) { if (file->optab->dump_region) return file->optab->dump_region (file, i); return 0 ; }
int tar_sparse_dump_region(struct_0 *a0, unsigned long long a1) { unsigned int v1; if (!a0->field_20->field_38) v1 = 0; else v1 = a0->field_20->field_38(a0, a1, a1, a0->field_20->field_38); return v1; }
static inline char * string_extract_single_quoted (string, sindex, allowesc) char *string; int *sindex; int allowesc; { register int i; size_t slen; char *t; int pass_next; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); slen = ( (__ctype_get_mb_cur_max ()) > 1) ? strlen (string + *sindex) + *sindex : 0; i = *sindex; pass_next = 0; while (string[i]) { if (pass_next) { pass_next = 0; do { if (locale_mb_cur_max > 1) { mbstate_t state_bak; size_t mblength; int _f; _f = is_basic ((string)[i]); if (_f) mblength = 1; else if (locale_utf8locale && (((string)[i] & 0x80) == 0)) mblength = (string)[i] != 0; else { state_bak = state; mblength = mbrlen ((string) + (i), (slen) - (i), &state); } if (mblength == (size_t)-2 || mblength == (size_t)-1) { state = state_bak; (i)++; } else if (mblength == 0) (i)++; else (i) += mblength; } else (i)++; } while (0); continue; } if (allowesc && string[i] == '\\') pass_next++; else if (string[i] == '\'') break; do { if (locale_mb_cur_max > 1) { mbstate_t state_bak; size_t mblength; int _f; _f = is_basic ((string)[i]); if (_f) mblength = 1; else if (locale_utf8locale && (((string)[i] & 0x80) == 0)) mblength = (string)[i] != 0; else { state_bak = state; mblength = mbrlen ((string) + (i), (slen) - (i), &state); } if (mblength == (size_t)-2 || mblength == (size_t)-1) { state = state_bak; (i)++; } else if (mblength == 0) (i)++; else (i) += mblength; } else (i)++; } while (0); } t = substring (string, *sindex, i); if (string[i]) i++; *sindex = i; return (t); }
long string_extract_single_quoted(long a1, signed int *a2, int a3) { size_t v3; signed int v4; int v7; size_t v8; size_t v9; size_t v10; long v11; long s; long v13; unsigned long v14; v14 = __readfsqword(0x28u); memset(&s, 0, sizeof(s)); if ( _ctype_get_mb_cur_max() <= 1 ) v3 = 0LL; else v3 = *a2 + strlen((const char *)(*a2 + a1)); v10 = v3; v4 = *a2; v7 = 0; while ( *(_BYTE *)(v4 + a1) ) { if ( v7 ) { v7 = 0; if ( locale_mb_cur_max <= 1 ) { ++v4; } else { if ( (unsigned int)is_basic(*(_BYTE *)(v4 + a1)) ) { v8 = 1LL; } else if ( locale_utf8locale && *(char *)(v4 + a1) >= 0 ) { v8 = *(_BYTE *)(v4 + a1) != 0; } else { v13 = s; v8 = mbrlen((const char *)(v4 + a1), v10 - v4, (mbstate_t *)&s); } if ( v8 < 0xFFFFFFFFFFFFFFFELL ) { if ( v8 ) v4 += v8; else ++v4; } else { s = v13; ++v4; } } } else { if ( a3 && *(_BYTE *)(v4 + a1) == 92 ) { v7 = 1; } else if ( *(_BYTE *)(v4 + a1) == 39 ) { break; } if ( locale_mb_cur_max <= 1 ) { ++v4; } else { if ( (unsigned int)is_basic(*(_BYTE *)(v4 + a1)) ) { v9 = 1LL; } else if ( locale_utf8locale && *(char *)(v4 + a1) >= 0 ) { v9 = *(_BYTE *)(v4 + a1) != 0; } else { v13 = s; v9 = mbrlen((const char *)(v4 + a1), v10 - v4, (mbstate_t *)&s); } if ( v9 < 0xFFFFFFFFFFFFFFFELL ) { if ( v9 ) v4 += v9; else ++v4; } else { s = v13; ++v4; } } } } v11 = substring(a1, (unsigned int)*a2, (unsigned int)v4); if ( *(_BYTE *)(v4 + a1) ) ++v4; *a2 = v4; return v11; }
static int glob1(Char *pattern, Char *pattern_last, _ssh_compat_glob_t *pglob, struct glob_lim *limitp) { Char pathbuf[ 4096 ]; if (*pattern == '\0') return(0); return(glob2(pathbuf, pathbuf+ 4096 -1, pathbuf, pathbuf+ 4096 -1, pattern, pattern_last, pglob, limitp)); }
long glob1(unsigned short *a1, long a2, long a3, _QWORD *a4) { unsigned short v5[8]; _BYTE v6[18]; *(_QWORD *)&v6[10] = __readfsqword(0x28u); if ( *a1 ) return glob2((short *)v5, (int)v6, v5, (unsigned long)v6, a1, a2, a3, a4); else return 0LL; }
int assoc_insert (hash, key, value) HASH_TABLE *hash; char *key; char *value; { BUCKET_CONTENTS *b; b = hash_search (key, hash, 0x02); if (b == 0) return -1; if (b->key != key) sh_xfree((key), "assoc.c", 84); do { if (b->data) sh_xfree((b->data), "assoc.c", 85); } while (0); b->data = value ? (char *)strcpy (sh_xmalloc((1 + strlen (value)), "assoc.c", 86), (value)) : (char *)0; return (0); }
long long assoc_insert(unsigned long long a0, unsigned long long a1, char *a2) { unsigned long long v0[3]; unsigned long long v2; void* v3; v0[0] = hash_search(a1, a0, 0x2, a0); if (!v0) { v2 = 4294967295; } else { if (a1 != v0[1]) sh_xfree(a1, "assoc.c", 0x54); if (v0[2]) sh_xfree(v0[2], "assoc.c", 0x55); if (a2) v3 = strcpy(sh_xmalloc(strlen(a2) + 1, "assoc.c", 0x56), a2); else v3 = 0; v0[2] = v3; v2 = 0; } return v2; }
size_t sys_write_archive_buffer (void) { return (((archive) >= (1 << 30)) ? rmt_write__ (archive - (1 << 30), record_start->buffer, record_size) : full_write (archive, record_start->buffer, record_size)); }
int sys_write_archive_buffer() { unsigned long long v1; if (archive <= 1073741823) v1 = full_write(archive, *(&record_start), *(&record_size), *(&record_start)); else v1 = rmt_write__(archive - 0x40000000, *(&record_start), *(&record_size), archive - 0x40000000); return v1; }
static int bash_progcomp_ignore_filenames (names) char **names; { _ignore_completion_names (names, test_for_canon_directory); return 0; }
void bash_progcomp_ignore_filenames(void* a0) { void* v1; _ignore_completion_names(a0, test_for_canon_directory); v1 = 0; return; }
void sigwinch_sighandler (sig) int sig; { sigwinch_received = 1; return; }
void sigwinch_sighandler(void) { sigwinch_received = 1; return; }
static void terminal_free_display(EditLine *el) { terminal_free_buffer(&el->el_display); terminal_free_buffer(&el->el_vdisplay); }
void terminal_free_display(long param_1) { terminal_free_buffer(param_1 + 0x38); terminal_free_buffer(param_1 + 0x40); return; }
static void print_usage(FILE *f) { printf("Usage: ip link <options> type vxcan [peer <options>]\n" "To get <options> type 'ip link add help'\n"); }
void print_usage(unsigned long a0) { unsigned long v0; unsigned long long v2; v0 = a0; v2 = printf("Usage: ip link <options> type vxcan [peer <options>]\nTo get <options> type 'ip link add help'\n"); return; }
void fatal_error (const char *format, ...) { va_list args; error_prolog (0); __builtin_va_start( args , format ) ; vfprintf ( stderr , format, args); fprintf ( stderr , "\n"); __builtin_va_end( args ) ; sh_exit (2); }
unsigned long fatal_error(const char *a1, long a2, long a3, long a4, long a5, long a6, ...) { long v6; long v7; long v8; long v9; gcc_va_list arg; unsigned long v12; long v13; long v14; long v15; long v16; long v17; va_start(arg, a6); v13 = a2; v14 = a3; v15 = a4; v16 = a5; v17 = a6; v12 = __readfsqword(0x28u); error_prolog(0); arg[0].gp_offset = 8; vfprintf(stderr, a1, arg); fprintf(stderr, "\n"); sh_exit(2LL); return internal_error((_BYTE *)error_prolog + 2, (long)"\n", v6, v7, v8, v9); }
static inline _Bool is_smack_enabled (void) { return 0 ; }
long is_smack_enabled() { return 0LL; }
static unsigned int get_ifa_flags(struct ifaddrmsg *ifa, struct rtattr *ifa_flags_attr) { return ifa_flags_attr ? rta_getattr_u32(ifa_flags_attr) : ifa->ifa_flags; }
int get_ifa_flags(struct_0 *a0, void* a1) { unsigned long v1; if (!a1) { v1 = a0->field_2; return v1; } v1 = rta_getattr_u32(a1); return v1; }
int read_history_range (const char *filename, int from, int to) { register char *line_start, *line_end, *p; char *input, *buffer, *bufend, *last_ts; int file, current_line, chars_read, has_timestamps, reset_comment_char; struct stat finfo; size_t file_size; int overflow_errno = 27 ; history_lines_read_from_file = 0; buffer = last_ts = (char *) ((void *)0) ; input = history_filename (filename); file = input ? open (input, 00 |0, 0666) : -1; if ((file < 0) || (fstat (file, &finfo) == -1)) goto error_and_exit; if ( (((( finfo.st_mode )) & 0170000) == (0100000)) == 0) { (*__errno_location ()) = 22 ; goto error_and_exit; } file_size = (size_t)finfo.st_size; if (file_size != finfo.st_size || file_size + 1 < file_size) { (*__errno_location ()) = overflow_errno; goto error_and_exit; } if (file_size == 0) { xfree (input); close (file); return 0; } buffer = (char *)malloc (file_size + 1); if (buffer == 0) { (*__errno_location ()) = overflow_errno; goto error_and_exit; } chars_read = read (file, buffer, file_size); if (chars_read < 0) { error_and_exit: if ( (*__errno_location ()) != 0) chars_read = (*__errno_location ()) ; else chars_read = 5 ; if (file >= 0) close (file); if (input) free (input); if (buffer) free (buffer); return (chars_read); } close (file); if (to < 0) to = chars_read; bufend = buffer + chars_read; *bufend = '\0'; current_line = 0; reset_comment_char = 0; if (history_comment_char == '\0' && buffer[0] == '#' && ((*__ctype_b_loc ())[(int) (( (unsigned char)buffer[1] ))] & (unsigned short int) _ISdigit) ) { history_comment_char = '#'; reset_comment_char = 1; } has_timestamps = (*(buffer) == history_comment_char && ((*__ctype_b_loc ())[(int) (( (unsigned char)(buffer)[1] ))] & (unsigned short int) _ISdigit) ); history_multiline_entries += has_timestamps && history_write_timestamps; if (has_timestamps) last_ts = buffer; for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++) if (*line_end == '\n') { p = line_end + 1; if ((*(p) == history_comment_char && ((*__ctype_b_loc ())[(int) (( (unsigned char)(p)[1] ))] & (unsigned short int) _ISdigit) ) == 0) current_line++; else last_ts = p; line_start = p; if (current_line >= from && has_timestamps) { for (line_end = p; line_end < bufend && *line_end != '\n'; line_end++) ; line_start = (*line_end == '\n') ? line_end + 1 : line_end; } } for (line_end = line_start; line_end < bufend; line_end++) if (*line_end == '\n') { if (line_end > line_start && line_end[-1] == '\r') line_end[-1] = '\0'; else *line_end = '\0'; if (*line_start) { if ((*(line_start) == history_comment_char && ((*__ctype_b_loc ())[(int) (( (unsigned char)(line_start)[1] ))] & (unsigned short int) _ISdigit) ) == 0) { if (last_ts == ((void *)0) && history_length > 0 && history_multiline_entries) _hs_append_history_line (history_length - 1, line_start); else add_history (line_start); if (last_ts) { add_history_time (last_ts); last_ts = ((void *)0) ; } } else { last_ts = line_start; current_line--; } } current_line++; if (current_line >= to) break; line_start = line_end + 1; } history_lines_read_from_file = current_line; if (reset_comment_char) history_comment_char = '\0'; if (input) free (input); if (buffer) free (buffer); return (0); }
int read_history_range(undefined8 param_1,int param_2,int param_3) { bool bVar1; bool bVar2; bool bVar3; int iVar4; int iVar5; char *__file; int *piVar6; ssize_t sVar7; char *pcVar8; ushort **ppuVar9; char *pcVar10; char *pcVar11; long in_FS_OFFSET; char *local_110; int local_108; int local_f8; int local_f4; char *local_e0; char *local_d8; stat local_b8; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); history_lines_read_from_file = 0; local_d8 = (char *)0x0; local_e0 = (char *)0x0; __file = (char *)history_filename(); if (__file == (char *)0x0) { iVar4 = -1; } else { iVar4 = open(__file,0,0x1b6); } if ((-1 < iVar4) && (iVar5 = fstat(iVar4,&local_b8), iVar5 != -1)) { if ((local_b8.st_mode & 0xf000) == 0x8000) { if (local_b8.st_size == 0xffffffffffffffff) { piVar6 = __errno_location(); *piVar6 = 0x1b; } else { if (local_b8.st_size == 0) { xfree(); close(iVar4); local_f4 = 0; goto LAB_00100b4e; } local_e0 = (char *)malloc(local_b8.st_size + 1); if (local_e0 == (char *)0x0) { piVar6 = __errno_location(); *piVar6 = 0x1b; } else { sVar7 = read(iVar4,local_e0,local_b8.st_size); iVar5 = (int)sVar7; if (-1 < iVar5) { close(iVar4); local_108 = param_3; if (param_3 < 0) { local_108 = iVar5; } pcVar8 = local_e0 + iVar5; *pcVar8 = '\0'; local_f8 = 0; bVar3 = false; if (((history_comment_char == '\0') && (*local_e0 == '#')) && (ppuVar9 = __ctype_b_loc(), ((*ppuVar9)[(byte)local_e0[1]] & 0x800) != 0)) { history_comment_char = '#'; bVar3 = true; } if ((*local_e0 == history_comment_char) && (ppuVar9 = __ctype_b_loc(), ((*ppuVar9)[(byte)local_e0[1]] & 0x800) != 0)) { bVar2 = true; } else { bVar2 = false; } if ((bVar2) && (history_write_timestamps != 0)) { iVar4 = 1; } else { iVar4 = 0; } history_multiline_entries = history_multiline_entries + iVar4; pcVar10 = local_e0; local_110 = local_e0; if (bVar2) { local_d8 = local_e0; } while ((pcVar11 = local_110, pcVar10 < pcVar8 && (local_f8 < param_2))) { if (*pcVar10 == '\n') { local_110 = pcVar10 + 1; if ((*local_110 == history_comment_char) && (ppuVar9 = __ctype_b_loc(), ((*ppuVar9)[(byte)pcVar10[2]] & 0x800) != 0)) { bVar1 = true; } else { bVar1 = false; } pcVar11 = local_110; if (!bVar1) { local_f8 = local_f8 + 1; pcVar11 = local_d8; } local_d8 = pcVar11; if ((param_2 <= local_f8) && (bVar2)) { for (; (local_110 < pcVar8 && (*local_110 != '\n')); local_110 = local_110 + 1) { } pcVar10 = local_110; if (*local_110 == '\n') { local_110 = local_110 + 1; } } } pcVar10 = pcVar10 + 1; } for (; pcVar11 < pcVar8; pcVar11 = pcVar11 + 1) { if (*pcVar11 == '\n') { if ((local_110 < pcVar11) && (pcVar11[-1] == '\r')) { pcVar11[-1] = '\0'; } else { *pcVar11 = '\0'; } if (*local_110 != '\0') { if ((*local_110 == history_comment_char) && (ppuVar9 = __ctype_b_loc(), ((*ppuVar9)[(byte)local_110[1]] & 0x800) != 0)) { bVar2 = true; } else { bVar2 = false; } if (bVar2) { local_d8 = local_110; local_f8 = local_f8 + -1; } else { if (((local_d8 == (char *)0x0) && (0 < history_length)) && (history_multiline_entries != 0)) { _hs_append_history_line(history_length + -1,local_110); } else { add_history(local_110); } if (local_d8 != (char *)0x0) { add_history_time(); local_d8 = (char *)0x0; } } } local_f8 = local_f8 + 1; if (local_108 <= local_f8) break; local_110 = pcVar11 + 1; } } history_lines_read_from_file = local_f8; if (bVar3) { history_comment_char = '\0'; } if (__file != (char *)0x0) { free(__file); } if (local_e0 != (char *)0x0) { free(local_e0); } local_f4 = 0; goto LAB_00100b4e; } } } } else { piVar6 = __errno_location(); *piVar6 = 0x16; } } piVar6 = __errno_location(); if (*piVar6 == 0) { local_f4 = 5; } else { piVar6 = __errno_location(); local_f4 = *piVar6; } if (-1 < iVar4) { close(iVar4); } if (__file != (char *)0x0) { free(__file); } if (local_e0 != (char *)0x0) { free(local_e0); } LAB_00100b4e: if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return local_f4; }
static void print_all_completions () { progcomp_walk (print_compitem); }
void print_all_completions(void) { progcomp_walk(print_compitem); return; }
void restore_sigmask () { sigprocmask ( 2 , &top_level_mask, (sigset_t *) ((void *)0) ); }
void restore_sigmask() { unsigned long long v1; v1 = sigprocmask(0x2, &top_level_mask, NULL); return; }
void ifsfree(void) { struct ifsregion *p = ifsfirst.next; if (!p) goto out; ({ suppressint++; ({ __asm__ __volatile__ ("": : :"memory"); }); 0; }); do { struct ifsregion *ifsp; ifsp = p->next; free((pointer)(p)); p = ifsp; } while (p); ifsfirst.next = ((void *)0) ; ({ ({ __asm__ __volatile__ ("": : :"memory"); }); if (--suppressint == 0 && intpending) onint(); 0; }); out: ifslastp = ((void *)0) ; }
void ifsfree() { unsigned long long *v0; void* v1; unsigned long long v3; unsigned long long v4; unsigned long long v5; unsigned long long v6; v3 = ifsfirst; v0 = ifsfirst; if (v0) { suppressint = suppressint + 1; while (true) { v1 = *(v0); free(v0); v0 = v1; if (!v0) break; } ifsfirst = 0; suppressint = suppressint - 1; v4 = suppressint; if (!suppressint) { v5 = intpending; if (intpending) v6 = onint(); } } ifslastp = 0; return; }
static inline char *_STPUTC(int c, char *p) { if (p == sstrend) p = growstackstr(); *p++ = c; return p; }
int _STPUTC(unsigned long a0, unsigned long a1) { char *v0; int tmp_13; v0 = a1; if (v0 == sstrend) v0 = growstackstr(); tmp_13 = v0; v0 += 1; *(tmp_13) = a0; return v0; }
static void mySIGSEGVorSIGBUScatcher ( IntNative n ) { if (opMode == 1) fprintf ( stderr , "\n%s: Caught a SIGSEGV or SIGBUS whilst compressing.\n" "\n" " Possible causes are (most likely first):\n" " (1) This computer has unreliable memory or cache hardware\n" " (a surprisingly common problem; try a different machine.)\n" " (2) A bug in the compiler used to create this executable\n" " (unlikely, if you didn't compile bzip2 yourself.)\n" " (3) A real bug in bzip2 -- I hope this should never be the case.\n" " The user's manual, Section 4.3, has more info on (1) and (2).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (1)\n" " or (2), feel free to report it to: bzip2-devel@sourceware.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" " have the manual or can't be bothered to read it, mail me anyway.\n" "\n", progName ); else fprintf ( stderr , "\n%s: Caught a SIGSEGV or SIGBUS whilst decompressing.\n" "\n" " Possible causes are (most likely first):\n" " (1) The compressed data is corrupted, and bzip2's usual checks\n" " failed to detect this. Try bzip2 -tvv my_file.bz2.\n" " (2) This computer has unreliable memory or cache hardware\n" " (a surprisingly common problem; try a different machine.)\n" " (3) A bug in the compiler used to create this executable\n" " (unlikely, if you didn't compile bzip2 yourself.)\n" " (4) A real bug in bzip2 -- I hope this should never be the case.\n" " The user's manual, Section 4.3, has more info on (2) and (3).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (2)\n" " or (3), feel free to report it to: bzip2-devel@sourceware.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" " have the manual or can't be bothered to read it, mail me anyway.\n" "\n", progName ); showFileNames(); if (opMode == 1) cleanUpAndFail( 3 ); else { cadvise(); cleanUpAndFail( 2 ); } }
long long mySIGSEGVorSIGBUScatcher(unsigned long a0) { unsigned int v0; v0 = a0; if (opMode != 1) fprintf(*(&stderr), "\n%s: Caught a SIGSEGV or SIGBUS whilst decompressing.\n\n Possible causes are (most likely first):\n (1) The compressed data is corrupted, and bzip2's usual checks\n failed to detect this. Try bzip2 -tvv my_file.bz2.\n (2) This computer has unreliable memory or cache hardware\n (a surprisingly common problem; try a different machine.)\n (3) A bug in the compiler used to create this executable\n (unlikely, if you didn't compile bzip2 yourself.)\n (4) A real bug in bzip2 -- I hope this should never be the case.\n The user's manual, Section 4.3, has more info on (2) and (3).\n \n If you suspect this is a bug in bzip2, or are unsure about (2)\n or (3), feel free to report it to: bzip2-devel@sourceware.org.\n Section 4.3 of the user's manual describes the info a useful\n bug report should have. If the manual is available on your\n system, please try and read it before mailing me. If you don't\n have the manual or can't be bothered to read it, mail me anyway.\n\n", *(&progName)); else fprintf(*(&stderr), "\n%s: Caught a SIGSEGV or SIGBUS whilst compressing.\n\n Possible causes are (most likely first):\n (1) This computer has unreliable memory or cache hardware\n (a surprisingly common problem; try a different machine.)\n (2) A bug in the compiler used to create this executable\n (unlikely, if you didn't compile bzip2 yourself.)\n (3) A real bug in bzip2 -- I hope this should never be the case.\n The user's manual, Section 4.3, has more info on (1) and (2).\n \n If you suspect this is a bug in bzip2, or are unsure about (1)\n or (2), feel free to report it to: bzip2-devel@sourceware.org.\n Section 4.3 of the user's manual describes the info a useful\n bug report should have. If the manual is available on your\n system, please try and read it before mailing me. If you don't\n have the manual or can't be bothered to read it, mail me anyway.\n\n", *(&progName)); showFileNames(); if (opMode == 1) cleanUpAndFail(0x3); cadvise(); cleanUpAndFail(0x2); }
int acl_extended_file(const char *path_p) { return __acl_extended_file(path_p, getxattr); }
void acl_extended_file(undefined8 param_1) { __acl_extended_file(param_1,uRam000000000010001b); return; }
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 ("Concatenate FILE(s) to standard output.\n"), stdout ) ; emit_stdin_note (); fputs_unlocked (gettext ("\n -A, --show-all equivalent to -vET\n -b, --number-nonblank number nonempty output lines, overrides -n\n -e equivalent to -vE\n -E, --show-ends display $ at end of each line\n -n, --number number all output lines\n -s, --squeeze-blank suppress repeated empty output lines\n"), stdout ) ; fputs_unlocked (gettext (" -t equivalent to -vT\n -T, --show-tabs display TAB characters as ^I\n -u (ignored)\n -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB\n"), stdout ) ; fputs_unlocked (gettext (" --help display this help and exit\n"), stdout ); fputs_unlocked (gettext (" --version output version information and exit\n"), stdout ); printf (gettext ("\nExamples:\n %s f - g Output f's contents, then standard input, then g's contents.\n %s Copy standard input to standard output.\n") , program_name, program_name); emit_ancillary_info ("cat"); } exit (status); }
void usage(int a1) { long v1; char *v2; char *v3; FILE *v4; char *v5; FILE *v6; char *v7; FILE *v8; char *v9; FILE *v10; char *v11; FILE *v12; char *v13; long v14; long v15; char *v16; v1 = program_name; if ( a1 ) { v2 = gettext("Try '%s --help' for more information.\n"); fprintf(stderr, v2, v1); } else { v3 = gettext("Usage: %s [OPTION]... [FILE]...\n"); printf(v3, v1); v4 = stdout; v5 = gettext("Concatenate FILE(s) to standard output.\n"); fputs_unlocked(v5, v4); emit_stdin_note(); v6 = stdout; v7 = gettext( "\n" " -A, --show-all equivalent to -vET\n" " -b, --number-nonblank number nonempty output lines, overrides -n\n" " -e equivalent to -vE\n" " -E, --show-ends display $ at end of each line\n" " -n, --number number all output lines\n" " -s, --squeeze-blank suppress repeated empty output lines\n"); fputs_unlocked(v7, v6); v8 = stdout; v9 = gettext( " -t equivalent to -vT\n" " -T, --show-tabs display TAB characters as ^I\n" " -u (ignored)\n" " -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB\n"); fputs_unlocked(v9, v8); v10 = stdout; v11 = gettext(" --help display this help and exit\n"); fputs_unlocked(v11, v10); v12 = stdout; v13 = gettext(" --version output version information and exit\n"); fputs_unlocked(v13, v12); v14 = program_name; v15 = program_name; v16 = gettext( "\n" "Examples:\n" " %s f - g Output f's contents, then standard input, then g's contents.\n" " %s Copy standard input to standard output.\n"); printf(v16, v15, v14); emit_ancillary_info("cat"); } exit(a1); }
static int visible_var (var) SHELL_VAR *var; { return (((((var)->attributes) & (0x0001000))) == 0); }
long long visible_var(struct_0 *a0) { return !(a0->field_28 & 0x1000); }
static enum ipstats_maybe_on_off ipstats_dissect_01(int value, const char *what) { switch (value) { case 0: return IPSTATS_MOO_OFF; case 1: return IPSTATS_MOO_ON; default: fprintf( stderr , "Invalid value for %s: expected 0 or 1, got %d.\n", what, value); return IPSTATS_MOO_INVALID; } }
undefined8 ipstats_dissect_01(uint param_1,undefined8 param_2) { undefined8 uVar1; if (param_1 == 0) { uVar1 = 0xffffffff; } else if (param_1 == 1) { uVar1 = 1; } else { fprintf(stderr,"Invalid value for %s: expected 0 or 1, got %d.\n",param_2,(ulong)param_1); uVar1 = 0; } return uVar1; }
test_code_t test_sha(gnutls_session_t session) { int ret; sprintf(prio_str, "NONE:" "+CIPHER-ALL:+ARCFOUR-128:+3DES-CBC" ":+GOST28147-TC26Z-CNT" ":" "+COMP-NULL" ":%s:+SHA1:" "+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH" ":+VKO-GOST-12" ":%s", protocol_str, rest); { int _ret; if ((_ret=__gnutls_priority_set_direct(session, prio_str, 886)) != TEST_SUCCEED) { return _ret; } }; gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred); ret = test_do_handshake(session); return ret; }
long long test_sha(unsigned long long a0) { unsigned int v0; unsigned int v1; unsigned long long v3; sprintf(&prio_str, "NONE:+CIPHER-ALL:+ARCFOUR-128:+3DES-CBC:+GOST28147-TC26Z-CNT:+COMP-NULL:%s:+SHA1:+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH:+VKO-GOST-12:%s", &protocol_str, &rest); v0 = __gnutls_priority_set_direct(a0, &prio_str, 0x376); if (v0) { v3 = v0; return v3; } gnutls_credentials_set(a0, 0x1, xcred); v1 = test_do_handshake(a0); v3 = v1; return v3; }
static void print_boottime (const STRUCT_UTMP *utmp_ent) { print_line (-1, "", ' ', -1, gettext ("system boot"), time_string (utmp_ent), "", "", "", ""); }
void print_boottime(void* a0) { unsigned long long v1; v1 = print_line(0xffffffff, &g_401de3, 0x20, 0xffffffff, gettext("system boot"), time_string(a0), &g_401de3, &g_401de3, &g_401de3, &g_401de3); return; }
static void virt_wifi_print_help(struct link_util *lu, int argc, char **argv, FILE *f) { fprintf(f, "Usage: ... virt_wifi \n"); }
void virt_wifi_print_help(void) { FILE *in_RCX; fprintf(in_RCX,"Usage: ... virt_wifi \n"); return; }
static __u32 e2fsck_journal_sb_csum(journal_superblock_t *jsb) { __u32 crc, old_crc; old_crc = jsb->s_checksum; jsb->s_checksum = 0; crc = ext2fs_crc32c_le(~0, (unsigned char *)jsb, sizeof(journal_superblock_t)); jsb->s_checksum = old_crc; return crc; }
long e2fsck_journal_sb_csum(long a1) { long result; int v2; v2 = *(_DWORD *)(a1 + 252); *(_DWORD *)(a1 + 252) = 0; LODWORD(result) = ext2fs_crc32c_le(0xFFFFFFFFLL, a1, 1024LL); *(_DWORD *)(a1 + 252) = v2; return (unsigned int)result; }