input
stringlengths
28
169k
output
stringlengths
20
317k
static int execute_for_command (for_command) FOR_COM *for_command; { register WORD_LIST *releaser, *list; SHELL_VAR *v; char *identifier; int retval, save_line_number; save_line_number = line_number; if (check_identifier (for_command->name, 1) == 0) { if (posixly_correct && interactive_shell == 0) { last_command_exit_value = 2; jump_to_top_level (4); } return (1); } loop_level++; identifier = for_command->name->word; line_number = for_command->line; list = releaser = expand_words_no_vars (for_command->map_list); begin_unwind_frame ("for"); add_unwind_protect (dispose_words, releaser); if (for_command->flags & 0x08) for_command->action->flags |= 0x08; for (retval = 0; list; list = list->next) { do { if (terminating_signal) termsig_handler (terminating_signal); if (interrupt_state) throw_to_top_level (); } while (0); line_number = for_command->line; command_string_index = 0; print_for_command_head (for_command); if (echo_command_at_execute) xtrace_print_for_command_head (for_command); if (signal_in_progress ( (64 + 1) ) == 0 && running_trap == 0) { do { if (the_printed_command_except_trap) sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 2928); } while (0); the_printed_command_except_trap = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command)), "execute_cmd.c", 2929), (the_printed_command)); } retval = run_debug_trap (); if (debugging_mode && retval != 0) continue; this_command_name = (char *) ((void *)0) ; v = find_variable_last_nameref (identifier, 1); if (v && ((((v)->attributes) & (0x0000800)))) { if (valid_nameref_value (list->word->word, 1) == 0) { sh_invalidid (list->word->word); v = 0; } else if (((((v)->attributes) & (0x0000002)))) err_readonly (((v)->name)); else v = bind_variable_value (v, list->word->word, 0x0010); } else v = bind_variable (identifier, list->word->word, 0); if (v == 0 || ((((v)->attributes) & (0x0000002))) || ((((v)->attributes) & (0x0004000)))) { line_number = save_line_number; if (v && ((((v)->attributes) & (0x0000002))) && interactive_shell == 0 && posixly_correct) { last_command_exit_value = 1; jump_to_top_level (1); } else { dispose_words (releaser); discard_unwind_frame ("for"); loop_level--; return (1); } } if (((identifier)[0] == 'I' && (identifier)[1] == 'F' && (identifier)[2] == 'S' && (identifier)[3] == '\0')) setifs (v); else stupidly_hack_special_variables (identifier); retval = execute_command (for_command->action); do { if (job_control == 0 || interactive_shell == 0) reap_dead_jobs (); } while (0); do { if (terminating_signal) termsig_handler (terminating_signal); if (interrupt_state) throw_to_top_level (); } while (0); if (breaking) { breaking--; break; } if (continuing) { continuing--; if (continuing) break; } } loop_level--; line_number = save_line_number; dispose_words (releaser); discard_unwind_frame ("for"); return (retval); }
long long execute_for_command(struct_0 *a0, unsigned int a1, unsigned int a2, unsigned int a3, unsigned int a4, unsigned long long a5) { unsigned int v0; unsigned int v1; void* v2; char v3[4]; unsigned long long v6; unsigned long long v7; unsigned long long v9; struct_3 *v10; unsigned long long v11; v1 = line_number; if (!check_identifier(a0->field_8, 0x1)) { if (*(&posixly_correct) && !*(&interactive_shell)) { line_number_for_err_trap = 2; jump_to_top_level(0x4); } v11 = 1; } else { loop_level = loop_level + 1; *(&v3) = a0->field_8->field_0; line_number = a0->field_4; v6 = expand_words_no_vars(a0->field_10); v7 = v6; v10 = v6; begin_unwind_frame("for"); add_unwind_protect(got.dispose_words, v6); if ((a0->field_0 & 8)) a0->field_18->field_4 = a0->field_18->field_4 | 8; v0 = 0; while (true) { if (v10) { if (terminating_signal) termsig_handler(terminating_signal); if (interrupt_state) throw_to_top_level(); line_number = a0->field_4; command_string_index = 0; print_for_command_head(a0); if (echo_command_at_execute) xtrace_print_for_command_head(a0); if (!signal_in_progress(0x41) && !running_trap) { sh_xfree(0xbaec7d8920ec8348, "execute_cmd.c", 0xb70); this_shell_function = strcpy(sh_xmalloc(strlen(the_printed_command) + 1, "execute_cmd.c", 0xb71), the_printed_command); } v0 = run_debug_trap(); if (!debugging_mode || !v0) { this_shell_function = 0; v2 = find_variable_last_nameref(v3, 0x1); if (v2 && (v2[40] & 0x800)) { v9 = valid_nameref_value(v10->field_8->field_0, 0x1); if (!v9) { sh_invalidid(v10->field_8->field_0); v2 = 0; } else if ((v2[40] & 2)) { err_readonly(*(v2)); } else { v2 = bind_variable_value(v2, v10->field_8->field_0, 0x10, v10->field_8->field_0); } } if (!v2 || !(v2[40] & 0x800)) v2 = bind_variable(v3, v10->field_8->field_0, 0x0, v10->field_8->field_0); if (v2 && !(v2[40] & 2) && !(v2[40] & 0x4000)) { if (v3[0] == 73 && v3[1] == 70 && v3[2] == 83 && !v3[3]) setifs(v2); if (v3[2] != 83 || v3[0] != 73 || v3[3] || v3[1] != 70) stupidly_hack_special_variables(v3); v0 = execute_command(a0->field_18, a1, a2, a3, a4, a5); if (!*(&interactive_shell) || !job_control) reap_dead_jobs(); if (terminating_signal) termsig_handler(terminating_signal); if (interrupt_state) throw_to_top_level(); if (breaking) { breaking = breaking - 1; } else if (continuing) { continuing = continuing - 1; } } if (!v2 || (v2[40] & 0x4000) || (v2[40] & 2)) { line_number = v1; if (v2 && (v2[40] & 2) && !*(&interactive_shell) && *(&posixly_correct)) { line_number_for_err_trap = 1; jump_to_top_level(0x1); } dispose_words(v7); discard_unwind_frame("for"); loop_level = loop_level - 1; v11 = 1; break; } } if ((!breaking || debugging_mode) && (!breaking || v0) && (!(v2[40] & 0x4000) || debugging_mode) && (!(v2[40] & 0x4000) || v0) && (!continuing || debugging_mode) && (!continuing || v0) && (!(v2[40] & 2) || debugging_mode) && (!(v2[40] & 2) || v0) && (debugging_mode || v2) && (v0 || v2)) { v10 = v10->field_0; continue; } } if (!v10 || !debugging_mode && !(v2[40] & 0x4000) && !(v2[40] & 2) && breaking && v2 || !debugging_mode && !(v2[40] & 0x4000) && !(v2[40] & 2) && continuing && v2 || !(v2[40] & 0x4000) && !(v2[40] & 2) && !v0 && breaking && v2 || !(v2[40] & 0x4000) && !(v2[40] & 2) && !v0 && continuing && v2) { loop_level = loop_level - 1; line_number = v1; dispose_words(v7); discard_unwind_frame("for"); v11 = v0; break; } } } return v11; }
static int cfg_search_add(struct cfg *cfg, const char *path) { struct cfg_search *s; size_t len; enum search_type type; type = cfg_define_search_type(path); if (type != SEARCH_PATH) len = 0; else len = strlen(path) + 1; s = malloc(sizeof(struct cfg_search) + len); if (s == ((void *)0) ) { log_printf( 3 , "search add: out of memory\n"); return - 12 ; } s->type = type; if (type != SEARCH_PATH) s->len = 0; else { s->len = len - 1; memcpy(s->path, path, len); } log_printf( 7 , "search add: %s, search type=%hhu\n", path, type); s->next = cfg->searches; cfg->searches = s; return 0; }
void cfg_search_add(struct_0 *a0, void* a1, unsigned long long a2, unsigned long long a3, unsigned long long a4) { unsigned int v0; void* v1; struct_1 *v2; unsigned long long v5; void* v6; v0 = cfg_define_search_type(a1); if (v0) v1 = 0; else v1 = strlen(a1) + 1; v2 = malloc(v1 + 24); if (!v2) { log_printf(0x3, "search add: out of memory\n", a2, a3, a4); v5 = 4294967284; } else { v2->field_8 = v0; if (v0) { v2->field_10 = 0; } else { v2->field_10 = v1 - 1; memcpy(v2 + 1, a1, v1); } log_printf(0x7, "search add: %s, search type=%hhu\n", a1, v0, a4); v2->field_0 = a0->field_1020; a0->field_1020 = v2; v6 = 0; } return; }
int posix_memalign (memptr, alignment, size) void **memptr; size_t alignment, size; { void *mem; if ((alignment % sizeof (void *) != 0) || alignment == 0) return 22 ; else if (((((alignment) - 1) & (alignment)) == 0) == 0) return 22 ; mem = internal_memalign (alignment, size, (char *)0, 0, 0); if (mem != 0) { *memptr = mem; return 0; } return 12 ; }
long posix_memalign(long *a1, long a2, long a3) { long v4; if ( (a2 & 7) != 0 || !a2 ) return 22LL; if ( (a2 & (a2 - 1)) != 0 ) return 22LL; v4 = internal_memalign(a2, a3, 0LL, 0); if ( !v4 ) return 12LL; *a1 = v4; return 0LL; }
void client_expect_confirm(struct ssh *ssh, int id, const char *request, enum confirm_action action) { struct channel_reply_ctx *cr = xcalloc(1, sizeof(*cr)); cr->request_type = request; cr->action = action; channel_register_status_confirm(ssh, id, client_status_confirm, client_abandon_status_confirm, cr); }
void client_expect_confirm (undefined8 param_1,undefined4 param_2,undefined8 param_3,undefined4 param_4) { undefined8 *puVar1; puVar1 = (undefined8 *)xcalloc(1,0x10); *puVar1 = param_3; *(undefined4 *)((long)puVar1 + 0xc) = param_4; channel_register_status_confirm (param_1,param_2,client_status_confirm,client_abandon_status_confirm,puVar1); return; }
static long_int shr (long_int a, int b) { long_int one = 1; return (-one >> 1 == -1 ? a >> b : (a + (a < 0)) / (one << b) - (a < 0)); }
long shr(long param_1,byte param_2) { return param_1 >> (param_2 & 0x3f); }
int ansic_shouldquote (string) const char *string; { const char *s; unsigned char c; if (string == 0) return 0; for (s = string; c = *s; s++) { if (is_basic (c) == 0) return (ansic_wshouldquote (s)); if ((1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)c ))] & (unsigned short int) _ISprint) ) == 0) return 1; } return 0; }
undefined8 ansic_shouldquote(byte *param_1) { byte bVar1; int iVar2; undefined8 uVar3; ushort **ppuVar4; byte *local_10; local_10 = param_1; if (param_1 != (byte *)0x0) { for (; bVar1 = *local_10, bVar1 != 0; local_10 = local_10 + 1) { iVar2 = is_basic((int)(char)bVar1); if (iVar2 == 0) { uVar3 = ansic_wshouldquote(local_10); return uVar3; } ppuVar4 = __ctype_b_loc(); if (((*ppuVar4)[bVar1] & 0x4000) == 0) { return 1; } } } return 0; }
void usage(int result) { printf("Usage: utmpdump [ -froh ] [ filename ]\n"); exit(result); }
void usage(unsigned long a0) { printf("Usage: utmpdump [ -froh ] [ filename ]\n"); exit(a0); }
static int write_host_entry(FILE *f, const char *host, const char *ip, const struct sshkey *key, int store_hash) { int r, success = 0; char *hashed_host = ((void *)0) , *lhost; lhost = xstrdup(host); lowercase(lhost); if (store_hash) { if ((hashed_host = host_hash(lhost, ((void *)0) , 0)) == ((void *)0) ) { sshlog("hostfile.c", __func__, 448, 1, SYSLOG_LEVEL_ERROR, ((void *)0) , "host_hash failed"); free(lhost); return 0; } fprintf(f, "%s ", hashed_host); } else if (ip != ((void *)0) ) fprintf(f, "%s,%s ", lhost, ip); else { fprintf(f, "%s ", lhost); } free(hashed_host); free(lhost); if ((r = sshkey_write(key, f)) == 0) success = 1; else sshlog("hostfile.c", __func__, 463, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), "sshkey_write"); fputc('\n', f); if (success && store_hash && ip != ((void *)0) ) success = write_host_entry(f, ip, ((void *)0) , key, 1); return success; }
int write_host_entry(void* a0, unsigned long long a1, unsigned long long a2, unsigned long long a3, unsigned long a4) { unsigned long long v0; unsigned int v1; unsigned int v2; void* v3; void* v4; unsigned int v6; v1 = 0; v3 = 0; v4 = xstrdup(a1, a1, a2, a3); lowercase(v4); if (a4) { v3 = host_hash(v4, 0x0, 0x0); if (!v3) { v0 = "host_hash failed"; sshlog("hostfile.c", "write_host_entry", 0x1c0, 0x1, 0x2, 0x0); free(v4); v6 = 0; } else { fprintf(a0, "%s ", v3); } } else if (a2) { fprintf(a0, "%s,%s ", v4, a2); } else { fprintf(a0, "%s ", v4); } if (!a4 || v3) { free(v3); free(v4); v2 = sshkey_write(a3, a0, a0); if (!v2) { v1 = 1; } else { v0 = "sshkey_write"; sshlog("hostfile.c", "write_host_entry", 0x1cf, 0x1, 0x2, ssh_err(v2)); } fputc(0xa, a0); if (v1 && a4 && a2) v1 = write_host_entry(a0, a2, 0x0, a3, 0x1); v6 = v1; } return v6; }
static void rmspace(u_char *buf, size_t len) { size_t i; if (!len) return; for (i = len - 1; i > 0; i--) if (i == len - 1 || buf[i] == ' ') buf[i] = '\0'; else break; }
long rmspace(long a1, long a2) { long result; long i; if ( a2 ) { result = a2 - 1; for ( i = a2 - 1; i; --i ) { if ( i != a2 - 1 ) { result = *(unsigned char *)(a1 + i); if ( (_BYTE)result != 32 ) break; } result = a1 + i; *(_BYTE *)(a1 + i) = 0; } } return result; }
static _Bool parse_rxsci(int *argcp, char ***argvp, struct rxsc_desc *rxsc, struct sa_desc *rxsa) { struct sci sci = { 0 }; if (*argcp == 0 || get_sci_portaddr(&sci, argcp, argvp, 0 , 0 ) < 0) { fprintf( stderr , "expected sci\n"); ipmacsec_usage(); } rxsc->sci = sci.sci; return get_sa(argcp, argvp, &rxsa->an); }
int parse_rxsci(unsigned int *a0, unsigned long long *a1, struct_0 *a2, char *a3) { void* v0; void* v1; v0 = 0; v1 = 0; if (*(a0) && get_sci_portaddr(&v0, a0, a1, 0x0, 0x0) >= 0) { a2->field_8 = v0; return get_sa(a0, a1, a3); } fprintf(stderr, "expected sci\n"); ipmacsec_usage(); }
static int cmp_version (struct fileinfo const *a, struct fileinfo const *b) { int diff = filevercmp (a->name, b->name); return diff ? diff : strcmp (a->name, b->name); }
int cmp_version(char **param_1,char **param_2) { int iVar1; iVar1 = filevercmp(*param_1,*param_2); if (iVar1 == 0) { iVar1 = strcmp(*param_1,*param_2); } return iVar1; }
static void vlist_add (vlist, var, flags) VARLIST *vlist; SHELL_VAR *var; int flags; { register int i; for (i = 0; i < vlist->list_len; i++) if (((var->name)[0] == (vlist->list[i]->name)[0] && strcmp(var->name, vlist->list[i]->name) == 0)) break; if (i < vlist->list_len) return; if (i >= vlist->list_size) vlist = vlist_realloc (vlist, vlist->list_size + 16); vlist->list[vlist->list_len++] = var; vlist->list[vlist->list_len] = (SHELL_VAR *) ((void *)0) ; }
long vlist_add(long a1, const char **a2) { int i; long result; long v4; int v5; long v7; v7 = a1; for ( i = 0; i < *(_DWORD *)(a1 + 12) && (**a2 != ***(_BYTE ***)(8LL * i + *(_QWORD *)a1) || strcmp(*a2, **(const char ***)(8LL * i + *(_QWORD *)a1))); ++i ) { ; } result = *(unsigned int *)(a1 + 12); if ( i >= (int)result ) { if ( i >= *(_DWORD *)(a1 + 8) ) v7 = vlist_realloc(a1, *(_DWORD *)(a1 + 8) + 16); v4 = *(_QWORD *)v7; v5 = *(_DWORD *)(v7 + 12); *(_DWORD *)(v7 + 12) = v5 + 1; *(_QWORD *)(v4 + 8LL * v5) = a2; result = *(_QWORD *)v7 + 8LL * *(int *)(v7 + 12); *(_QWORD *)result = 0LL; } return result; }
int chachapoly_get_length(struct chachapoly_ctx *cpctx, u_int *plenp, u_int seqnr, const u_char *cp, u_int len) __attribute__(()); struct chachapoly_ctx { EVP_CIPHER_CTX *main_evp, *header_evp; };
long long chachapoly_get_length(struct_0 *a0, unsigned int *a1, unsigned long a2, unsigned long long a3, unsigned long a4) { char v0; char v1; char v2; char v3; char v4; char v5; char v6; char v7; char v8; char v9; char v10; char v11; char v12; unsigned long long v14; if (a4 <= 3) { v14 = 4294967293; return v14; } memset(&v4, 0x0, 0x10); v5 = a2 >> 56; v6 = a2 >> 48; v7 = a2 >> 40; v8 = a2 >> 32; v9 = a2 >> 24; v10 = a2 >> 16; v11 = a2 >> 8; v12 = a2; if (!EVP_CipherInit(a0->field_8, 0x0, 0x0, &v4, 0x0)) { v14 = 4294967274; return v14; } else if (EVP_Cipher(a0->field_8, &v0, a3, 0x4) >= 0) { *(a1) = (v0 * 0x1000000) | (v1 * 0x10000) | (v2 * 0x100) | v3; v14 = 0; return v14; } else { v14 = 4294967274; return v14; } }
static void process_remove_identity(SocketEntry *e) { int r, success = 0; struct sshkey *key = ((void *)0) ; Identity *id; sshlog("ssh-agent.c", __func__, 884, 1, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "entering"); if ((r = sshkey_froms(e->request, &key)) != 0) { sshlog("ssh-agent.c", __func__, 886, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), "parse key"); goto done; } if ((id = lookup_identity(key)) == ((void *)0) ) { sshlog("ssh-agent.c", __func__, 890, 1, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "key not found"); goto done; } if (identity_permitted(id, e, ((void *)0) , ((void *)0) , ((void *)0) ) != 0) goto done; if (idtab->nentries < 1) sshfatal("ssh-agent.c", __func__, 898, 1, SYSLOG_LEVEL_FATAL, ((void *)0) , "internal error: nentries %d", idtab->nentries); do { if (((id)->next.tqe_next) != ((void *)0) ) (id)->next.tqe_next->next.tqe_prev = (id)->next.tqe_prev; else (&idtab->idlist)->tqh_last = (id)->next.tqe_prev; *(id)->next.tqe_prev = (id)->next.tqe_next; ; ; } while (0); free_identity(id); idtab->nentries--; success = 1; done: sshkey_free(key); send_status(e, success); }
void process_remove_identity(struct_0 *a0) { char v0; char v1; unsigned int v2; unsigned int v3; void* v4; struct_1 *v5; char v6; unsigned long long *v8; unsigned long long v9; v2 = 0; v4 = 0; sshlog("ssh-agent.c", "process_remove_identity", 0x374, 0x1, 0x6, 0x0, "entering", *(&v0), *(&v1), a0, 0x0); v3 = sshkey_froms(a0->field_18, &v4, &v4); if (v3) { sshlog("ssh-agent.c", "process_remove_identity", 0x376, 0x1, 0x2, ssh_err(v3), "parse key", *(&v0), *(&v1), a0, *(&v2)); } else { v5 = lookup_identity(v4); if (!v5) { sshlog("ssh-agent.c", "process_remove_identity", 0x37a, 0x1, 0x5, 0x0, "key not found", *(&v0), *(&v1), a0, *(&v2)); } else if (!identity_permitted(v5, a0, 0x0, NULL, NULL)) { if (g_e87d894820ec8348 <= 0) sshfatal("ssh-agent.c", "process_remove_identity", 0x382, 0x1, 0x1, 0x0); if (v5->field_0) v5->field_0->field_8 = v5->field_8; else g_e87d894820ec8358 = &v5->field_8->field_0; v5->field_8->field_0 = v5->field_0; free_identity(v5); g_e87d894820ec8348 = __addvsi3(g_e87d894820ec8348, 0xffffffff); v2 = 1; } } sshkey_free(v4); send_status(a0, v2); v9 = *(&v6) ^ v8[5]; return; }
static void badfieldspec (char const *spec, char const *msgid) { ((!!sizeof (struct { _Static_assert (SORT_FAILURE, "verify_expr (" "SORT_FAILURE" ", " "(error (SORT_FAILURE, 0, gettext (\"%s: invalid field specification %s\"), gettext (msgid), quote (spec)), assume (false))" ")"); int _gl_dummy; })) ? ((error (SORT_FAILURE, 0, gettext ("%s: invalid field specification %s"), gettext (msgid), quote (spec)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (SORT_FAILURE, 0, gettext ("%s: invalid field specification %s"), gettext (msgid), quote (spec)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; }
void badfieldspec(undefined8 param_1,undefined8 param_2) { undefined8 uVar1; undefined8 uVar2; undefined8 uVar3; uVar1 = quote(param_1); uVar2 = gettext(param_2); uVar3 = gettext("%s: invalid field specification %s"); error(2,0,uVar3,uVar2,uVar1); }
printversion(const struct cmdinfo *ci, const char *value) { if (f_robot) { printf("%s", "1.20.12"); } else { printf(gettext("Debian '%s' package management program version %s.\n"), "dpkg", "1.20.12" " (" "amd64" ")"); printf(gettext("This is free software; see the GNU General Public License version 2 or\n" "later for copying conditions. There is NO warranty.\n") ); } m_output( stdout , gettext("<standard output>")); exit(0); }
void printversion(void) { char *pcVar1; undefined8 uVar2; if (f_robot == 0) { pcVar1 = (char *)gettext("Debian \'%s\' package management program version %s.\n"); printf(pcVar1,&DAT_00101394,"1.20.12 (amd64)"); pcVar1 = (char *)gettext( "This is free software; see the GNU General Public License version 2 or\nlater for copying conditions. There is NO warranty.\n" ); printf(pcVar1); } else { printf("%s","1.20.12"); } uVar2 = gettext("<standard output>"); m_output(stdout,uVar2); exit(0); }
static void map_print_key(EditLine *el, el_action_t *map, const wchar_t *in) { char outbuf[((size_t)1024)]; el_bindings_t *bp, *ep; if (in[0] == '\0' || in[1] == '\0') { (void) keymacro__decode_str(in, outbuf, sizeof(outbuf), ""); ep = &el->el_map.help[el->el_map.nfunc]; for (bp = el->el_map.help; bp < ep; bp++) if (bp->func == map[(unsigned char) *in]) { (void) fprintf(el->el_outfile, "%s\t->\t%ls\n", outbuf, bp->name); return; } } else keymacro_print(el, in); }
void map_print_key(unsigned long long a0[136], char *a1, unsigned int a2[2]) { struct_0 *v0; unsigned long v1; char v2; char v3; unsigned long long *v5; unsigned long long v6; if (!a2[0] || !a2[1]) { keymacro__decode_str(a2, &v2, 0x400, &g_4076e4); v1 = a0[135] * 24 + a0[133]; v0 = a0[133]; while (true) { if (v0 >= v1) break; if (v0->field_8 != a1[a2[0]]) { v0 += 2; } else { fprintf(a0[2], "%s\t->\t%ls\n", &v2); break; } } } else { keymacro_print(a0, a2, a2); } v6 = *(&v3) ^ v5[5]; return; }
inline int c_tolower (int c) { switch (c) { case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): case 'g' + ('A' - 'a'): case 'h' + ('A' - 'a'): case 'i' + ('A' - 'a'): case 'j' + ('A' - 'a'): case 'k' + ('A' - 'a'): case 'l' + ('A' - 'a'): case 'm' + ('A' - 'a'): case 'n' + ('A' - 'a'): case 'o' + ('A' - 'a'): case 'p' + ('A' - 'a'): case 'q' + ('A' - 'a'): case 'r' + ('A' - 'a'): case 's' + ('A' - 'a'): case 't' + ('A' - 'a'): case 'u' + ('A' - 'a'): case 'v' + ('A' - 'a'): case 'w' + ('A' - 'a'): case 'x' + ('A' - 'a'): case 'y' + ('A' - 'a'): case 'z' + ('A' - 'a'): return c - 'A' + 'a'; default: return c; } }
void c_tolower(void) { halt_baddata(); }
static void ensure_minimum_time_since(double start, double seconds) { struct timespec ts; double elapsed = monotime_double() - start, req = seconds, remain; while ((remain = seconds - elapsed) < 0.0) seconds *= 2; ts.tv_sec = remain; ts.tv_nsec = (remain - ts.tv_sec) * 1000000000; sshlog("auth2.c", __func__, 254, 1, SYSLOG_LEVEL_DEBUG3, ((void *)0) , "elapsed %0.3lfms, delaying %0.3lfms (requested %0.3lfms)", elapsed*1000, remain*1000, req*1000) ; nanosleep(&ts, ((void *)0) ); }
unsigned long ensure_minimum_time_since(double a1, double a2) { double v3; double v4; double v5; struct timespec requested_time; unsigned long v7; v3 = a2; v7 = __readfsqword(0x28u); v4 = monotime_double() - a1; while ( 1 ) { v5 = v3 - v4; if ( v3 - v4 >= 0.0 ) break; v3 = v3 + v3; } requested_time.tv_sec = (unsigned int)(int)v5; requested_time.tv_nsec = (unsigned int)(int)(1000000000.0 * (v5 - (double)(int)v5)); sshlog( "auth2.c", "ensure_minimum_time_since", 254LL, 1LL, 7LL, 0LL, "elapsed %0.3lfms, delaying %0.3lfms (requested %0.3lfms)", 1000.0 * v4, v5 * 1000.0, a2 * 1000.0); nanosleep(&requested_time, 0LL); return __readfsqword(0x28u) ^ v7; }
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 ("List information about the FILEs (the current directory by default).\nSort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n"), stdout ) ; emit_mandatory_arg_note (); fputs_unlocked (gettext (" -a, --all do not ignore entries starting with .\n -A, --almost-all do not list implied . and ..\n --author with -l, print the author of each file\n -b, --escape print C-style escapes for nongraphic characters\n"), stdout ) ; fputs_unlocked (gettext (" --block-size=SIZE with -l, scale sizes by SIZE when printing them;\n e.g., '--block-size=M'; see SIZE format below\n\n"), stdout ) ; fputs_unlocked (gettext (" -B, --ignore-backups do not list implied entries ending with ~\n"), stdout ) ; fputs_unlocked (gettext (" -c with -lt: sort by, and show, ctime (time of last\n modification of file status information);\n with -l: show ctime and sort by name;\n otherwise: sort by ctime, newest first\n\n"), stdout ) ; fputs_unlocked (gettext (" -C list entries by columns\n --color[=WHEN] color the output WHEN; more info below\n -d, --directory list directories themselves, not their contents\n -D, --dired generate output designed for Emacs' dired mode\n"), stdout ) ; fputs_unlocked (gettext (" -f list all entries in directory order\n -F, --classify[=WHEN] append indicator (one of */=>@|) to entries WHEN\n --file-type likewise, except do not append '*'\n"), stdout ) ; fputs_unlocked (gettext (" --format=WORD across -x, commas -m, horizontal -x, long -l,\n single-column -1, verbose -l, vertical -C\n\n"), stdout ) ; fputs_unlocked (gettext (" --full-time like -l --time-style=full-iso\n"), stdout ) ; fputs_unlocked (gettext (" -g like -l, but do not list owner\n"), stdout ) ; fputs_unlocked (gettext (" --group-directories-first\n group directories before files;\n can be augmented with a --sort option, but any\n use of --sort=none (-U) disables grouping\n\n"), stdout ) ; fputs_unlocked (gettext (" -G, --no-group in a long listing, don't print group names\n"), stdout ) ; fputs_unlocked (gettext (" -h, --human-readable with -l and -s, print sizes like 1K 234M 2G etc.\n --si likewise, but use powers of 1000 not 1024\n"), stdout ) ; fputs_unlocked (gettext (" -H, --dereference-command-line\n follow symbolic links listed on the command line\n"), stdout ) ; fputs_unlocked (gettext (" --dereference-command-line-symlink-to-dir\n follow each command line symbolic link\n that points to a directory\n\n"), stdout ) ; fputs_unlocked (gettext (" --hide=PATTERN do not list implied entries matching shell PATTERN\n (overridden by -a or -A)\n\n"), stdout ) ; fputs_unlocked (gettext (" --hyperlink[=WHEN] hyperlink file names WHEN\n"), stdout ) ; fputs_unlocked (gettext (" --indicator-style=WORD\n append indicator with style WORD to entry names:\n none (default), slash (-p),\n file-type (--file-type), classify (-F)\n\n"), stdout ) ; fputs_unlocked (gettext (" -i, --inode print the index number of each file\n -I, --ignore=PATTERN do not list implied entries matching shell PATTERN\n"), stdout ) ; fputs_unlocked (gettext (" -k, --kibibytes default to 1024-byte blocks for file system usage;\n used only with -s and per directory totals\n\n"), stdout ) ; fputs_unlocked (gettext (" -l use a long listing format\n"), stdout ) ; fputs_unlocked (gettext (" -L, --dereference when showing file information for a symbolic\n link, show information for the file the link\n references rather than for the link itself\n\n"), stdout ) ; fputs_unlocked (gettext (" -m fill width with a comma separated list of entries\n"), stdout ) ; fputs_unlocked (gettext (" -n, --numeric-uid-gid like -l, but list numeric user and group IDs\n -N, --literal print entry names without quoting\n -o like -l, but do not list group information\n -p, --indicator-style=slash\n append / indicator to directories\n"), stdout ) ; fputs_unlocked (gettext (" -q, --hide-control-chars print ? instead of nongraphic characters\n"), stdout ) ; fputs_unlocked (gettext (" --show-control-chars show nongraphic characters as-is (the default,\n unless program is 'ls' and output is a terminal)\n\n"), stdout ) ; fputs_unlocked (gettext (" -Q, --quote-name enclose entry names in double quotes\n"), stdout ) ; fputs_unlocked (gettext (" --quoting-style=WORD use quoting style WORD for entry names:\n literal, locale, shell, shell-always,\n shell-escape, shell-escape-always, c, escape\n (overrides QUOTING_STYLE environment variable)\n\n"), stdout ) ; fputs_unlocked (gettext (" -r, --reverse reverse order while sorting\n -R, --recursive list subdirectories recursively\n -s, --size print the allocated size of each file, in blocks\n"), stdout ) ; fputs_unlocked (gettext (" -S sort by file size, largest first\n"), stdout ) ; fputs_unlocked (gettext (" --sort=WORD sort by WORD instead of name: none (-U), size (-S),\n time (-t), version (-v), extension (-X), width\n\n"), stdout ) ; fputs_unlocked (gettext (" --time=WORD change the default of using modification times;\n access time (-u): atime, access, use;\n change time (-c): ctime, status;\n birth time: birth, creation;\n with -l, WORD determines which time to show;\n with --sort=time, sort by WORD (newest first)\n\n"), stdout ) ; fputs_unlocked (gettext (" --time-style=TIME_STYLE\n time/date format with -l; see TIME_STYLE below\n"), stdout ) ; fputs_unlocked (gettext (" -t sort by time, newest first; see --time\n -T, --tabsize=COLS assume tab stops at each COLS instead of 8\n"), stdout ) ; fputs_unlocked (gettext (" -u with -lt: sort by, and show, access time;\n with -l: show access time and sort by name;\n otherwise: sort by access time, newest first\n\n"), stdout ) ; fputs_unlocked (gettext (" -U do not sort; list entries in directory order\n"), stdout ) ; fputs_unlocked (gettext (" -v natural sort of (version) numbers within text\n"), stdout ) ; fputs_unlocked (gettext (" -w, --width=COLS set output width to COLS. 0 means no limit\n -x list entries by lines instead of by columns\n -X sort alphabetically by entry extension\n -Z, --context print any security context of each file\n --zero end each output line with NUL, not newline\n -1 list one file per line\n"), stdout ) ; fputs_unlocked (gettext (" --help display this help and exit\n"), stdout ); fputs_unlocked (gettext (" --version output version information and exit\n"), stdout ); emit_size_note (); fputs_unlocked (gettext ("\nThe TIME_STYLE argument can be full-iso, long-iso, iso, locale, or +FORMAT.\nFORMAT is interpreted like in date(1). If FORMAT is FORMAT1<newline>FORMAT2,\nthen FORMAT1 applies to non-recent files and FORMAT2 to recent files.\nTIME_STYLE prefixed with 'posix-' takes effect only outside the POSIX locale.\nAlso the TIME_STYLE environment variable sets the default style to use.\n"), stdout ) ; fputs_unlocked (gettext ("\nThe WHEN argument defaults to 'always' and can also be 'auto' or 'never'.\n"), stdout ) ; fputs_unlocked (gettext ("\nUsing color to distinguish file types is disabled both by default and\nwith --color=never. With --color=auto, ls emits color codes only when\nstandard output is connected to a terminal. The LS_COLORS environment\nvariable can change the settings. Use the dircolors(1) command to set it.\n"), stdout ) ; fputs_unlocked (gettext ("\nExit status:\n 0 if OK,\n 1 if minor problems (e.g., cannot access subdirectory),\n 2 if serious trouble (e.g., cannot access command-line argument).\n"), stdout ) ; emit_ancillary_info ((ls_mode == 1 ? "ls" : (ls_mode == 2 ? "dir" : "vdir"))); } exit (status); }
void usage(unsigned long a0) { unsigned long v0; unsigned long v2; unsigned long long v3; v0 = v2; if (a0) { fprintf(stderr, gettext("Try '%s --help' for more information.\n")); } else { printf(gettext("Usage: %s [OPTION]... [FILE]...\n")); fputs_unlocked(gettext("List information about the FILEs (the current directory by default).\nSort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n"), stdout); emit_mandatory_arg_note(); fputs_unlocked(gettext(" -a, --all do not ignore entries starting with .\n -A, --almost-all do not list implied . and ..\n --author with -l, print the author of each file\n -b, --escape print C-style escapes for nongraphic characters\n"), stdout); fputs_unlocked(gettext(" --block-size=SIZE with -l, scale sizes by SIZE when printing them;\n e.g., '--block-size=M'; see SIZE format below\n\n"), stdout); fputs_unlocked(gettext(" -B, --ignore-backups do not list implied entries ending with ~\n"), stdout); fputs_unlocked(gettext(" -c with -lt: sort by, and show, ctime (time of last\n modification of file status information);\n with -l: show ctime and sort by name;\n otherwise: sort by ctime, newest first\n\n"), stdout); fputs_unlocked(gettext(" -C list entries by columns\n --color[=WHEN] color the output WHEN; more info below\n -d, --directory list directories themselves, not their contents\n -D, --dired generate output designed for Emacs' dired mode\n"), stdout); fputs_unlocked(gettext(" -f list all entries in directory order\n -F, --classify[=WHEN] append indicator (one of */=>@|) to entries WHEN\n --file-type likewise, except do not append '*'\n"), stdout); fputs_unlocked(gettext(" --format=WORD across -x, commas -m, horizontal -x, long -l,\n single-column -1, verbose -l, vertical -C\n\n"), stdout); fputs_unlocked(gettext(" --full-time like -l --time-style=full-iso\n"), stdout); fputs_unlocked(gettext(" -g like -l, but do not list owner\n"), stdout); fputs_unlocked(gettext(" --group-directories-first\n group directories before files;\n can be augmented with a --sort option, but any\n use of --sort=none (-U) disables grouping\n\n"), stdout); fputs_unlocked(gettext(" -G, --no-group in a long listing, don't print group names\n"), stdout); fputs_unlocked(gettext(" -h, --human-readable with -l and -s, print sizes like 1K 234M 2G etc.\n --si likewise, but use powers of 1000 not 1024\n"), stdout); fputs_unlocked(gettext(" -H, --dereference-command-line\n follow symbolic links listed on the command line\n"), stdout); fputs_unlocked(gettext(" --dereference-command-line-symlink-to-dir\n follow each command line symbolic link\n that points to a directory\n\n"), stdout); fputs_unlocked(gettext(" --hide=PATTERN do not list implied entries matching shell PATTERN\n (overridden by -a or -A)\n\n"), stdout); fputs_unlocked(gettext(" --hyperlink[=WHEN] hyperlink file names WHEN\n"), stdout); fputs_unlocked(gettext(" --indicator-style=WORD\n append indicator with style WORD to entry names:\n none (default), slash (-p),\n file-type (--file-type), classify (-F)\n\n"), stdout); fputs_unlocked(gettext(" -i, --inode print the index number of each file\n -I, --ignore=PATTERN do not list implied entries matching shell PATTERN\n"), stdout); fputs_unlocked(gettext(" -k, --kibibytes default to 1024-byte blocks for file system usage;\n used only with -s and per directory totals\n\n"), stdout); fputs_unlocked(gettext(" -l use a long listing format\n"), stdout); fputs_unlocked(gettext(" -L, --dereference when showing file information for a symbolic\n link, show information for the file the link\n references rather than for the link itself\n\n"), stdout); fputs_unlocked(gettext(" -m fill width with a comma separated list of entries\n"), stdout); fputs_unlocked(gettext(" -n, --numeric-uid-gid like -l, but list numeric user and group IDs\n -N, --literal print entry names without quoting\n -o like -l, but do not list group information\n -p, --indicator-style=slash\n append / indicator to directories\n"), stdout); fputs_unlocked(gettext(" -q, --hide-control-chars print ? instead of nongraphic characters\n"), stdout); fputs_unlocked(gettext(" --show-control-chars show nongraphic characters as-is (the default,\n unless program is 'ls' and output is a terminal)\n\n"), stdout); fputs_unlocked(gettext(" -Q, --quote-name enclose entry names in double quotes\n"), stdout); fputs_unlocked(gettext(" --quoting-style=WORD use quoting style WORD for entry names:\n literal, locale, shell, shell-always,\n shell-escape, shell-escape-always, c, escape\n (overrides QUOTING_STYLE environment variable)\n\n"), stdout); fputs_unlocked(gettext(" -r, --reverse reverse order while sorting\n -R, --recursive list subdirectories recursively\n -s, --size print the allocated size of each file, in blocks\n"), stdout); fputs_unlocked(gettext(" -S sort by file size, largest first\n"), stdout); fputs_unlocked(gettext(" --sort=WORD sort by WORD instead of name: none (-U), size (-S),\n time (-t), version (-v), extension (-X), width\n\n"), stdout); fputs_unlocked(gettext(" --time=WORD change the default of using modification times;\n access time (-u): atime, access, use;\n change time (-c): ctime, status;\n birth time: birth, creation;\n with -l, WORD determines which time to show;\n with --sort=time, sort by WORD (newest first)\n\n"), stdout); fputs_unlocked(gettext(" --time-style=TIME_STYLE\n time/date format with -l; see TIME_STYLE below\n"), stdout); fputs_unlocked(gettext(" -t sort by time, newest first; see --time\n -T, --tabsize=COLS assume tab stops at each COLS instead of 8\n"), stdout); fputs_unlocked(gettext(" -u with -lt: sort by, and show, access time;\n with -l: show access time and sort by name;\n otherwise: sort by access time, newest first\n\n"), stdout); fputs_unlocked(gettext(" -U do not sort; list entries in directory order\n"), stdout); fputs_unlocked(gettext(" -v natural sort of (version) numbers within text\n"), stdout); fputs_unlocked(gettext(" -w, --width=COLS set output width to COLS. 0 means no limit\n -x list entries by lines instead of by columns\n -X sort alphabetically by entry extension\n -Z, --context print any security context of each file\n --zero end each output line with NUL, not newline\n -1 list one file per line\n"), stdout); fputs_unlocked(gettext(" --help display this help and exit\n"), stdout); fputs_unlocked(gettext(" --version output version information and exit\n"), stdout); emit_size_note(); fputs_unlocked(gettext("\nThe TIME_STYLE argument can be full-iso, long-iso, iso, locale, or +FORMAT.\nFORMAT is interpreted like in date(1). If FORMAT is FORMAT1<newline>FORMAT2,\nthen FORMAT1 applies to non-recent files and FORMAT2 to recent files.\nTIME_STYLE prefixed with 'posix-' takes effect only outside the POSIX locale.\nAlso the TIME_STYLE environment variable sets the default style to use.\n"), stdout); fputs_unlocked(gettext("\nThe WHEN argument defaults to 'always' and can also be 'auto' or 'never'.\n"), stdout); fputs_unlocked(gettext("\nUsing color to distinguish file types is disabled both by default and\nwith --color=never. With --color=auto, ls emits color codes only when\nstandard output is connected to a terminal. The LS_COLORS environment\nvariable can change the settings. Use the dircolors(1) command to set it.\n"), stdout); fputs_unlocked(gettext("\nExit status:\n 0 if OK,\n 1 if minor problems (e.g., cannot access subdirectory),\n 2 if serious trouble (e.g., cannot access command-line argument).\n"), stdout); if (ls_mode == 1) { v3 = "ls"; } else if (ls_mode == 2) { v3 = "dir"; } else { v3 = "vdir"; } emit_ancillary_info(v3); } exit(a0); }
int rl_set_mark (int count, int key) { return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point)); }
long long rl_set_mark(unsigned long a0, unsigned long a1) { unsigned int v0; v0 = a1; return _rl_set_mark_at_pos((!rl_explicit_arg ? a0 : rl_point)); }
Channel * channel_new(struct ssh *ssh, char *ctype, int type, int rfd, int wfd, int efd, u_int window, u_int maxpack, int extusage, const char *remote_name, int nonblock) { struct ssh_channels *sc = ssh->chanctxt; u_int i, found = 0; Channel *c; int r; for (i = 0; i < sc->channels_alloc; i++) { if (sc->channels[i] == ((void *)0) ) { found = i; break; } } if (i >= sc->channels_alloc) { found = sc->channels_alloc; if (sc->channels_alloc > (16*1024)) sshfatal("channels.c", __func__, 391, 1, SYSLOG_LEVEL_FATAL, ((void *)0) , "internal error: channels_alloc %d too big", sc->channels_alloc) ; sc->channels = xrecallocarray(sc->channels, sc->channels_alloc, sc->channels_alloc + 10, sizeof(*sc->channels)); sc->channels_alloc += 10; sshlog("channels.c", __func__, 396, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "channel: expanding %d", sc->channels_alloc); } c = sc->channels[found] = xcalloc(1, sizeof(Channel)); if ((c->input = sshbuf_new()) == ((void *)0) || (c->output = sshbuf_new()) == ((void *)0) || (c->extended = sshbuf_new()) == ((void *)0) ) sshfatal("channels.c", __func__, 403, 1, SYSLOG_LEVEL_FATAL, ((void *)0) , "sshbuf_new failed"); if ((r = sshbuf_set_max_size(c->input, (16*1024*1024))) != 0) sshfatal("channels.c", __func__, 405, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "sshbuf_set_max_size"); c->ostate = 0; c->istate = 0; channel_register_fds(ssh, c, rfd, wfd, efd, extusage, nonblock, 0); c->self = found; c->type = type; c->ctype = ctype; c->local_window = window; c->local_window_max = window; c->local_maxpacket = maxpack; c->remote_name = xstrdup(remote_name); c->ctl_chan = -1; c->delayed = 1; do { (&c->status_confirms)->tqh_first = ((void *)0) ; (&c->status_confirms)->tqh_last = &(&c->status_confirms)->tqh_first; } while (0); sshlog("channels.c", __func__, 419, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "channel %d: new [%s]", found, remote_name); return c; }
int channel_new(struct_0 *a0, unsigned long a1, unsigned long a2, unsigned long a3, unsigned long a4, unsigned long a5, unsigned int v11, unsigned int a6, unsigned int a7, unsigned long long a8, unsigned int a9) { unsigned long long v0; unsigned long v1; unsigned int v2; unsigned int v3; unsigned int v4; struct_2 *v5; struct_1 *v6; unsigned long v7; unsigned long long v8; unsigned long v9; char v10; unsigned long long *v12; v5 = a0->field_868; v3 = 0; v2 = 0; while (true) { if (v2 >= v5->field_8) break; if (*((v5->field_0 + (v2 << 3)))) { v2 += 1; } else { v3 = v2; break; } } if (v2 >= v5->field_8) { v3 = v5->field_8; if (v5->field_8 > 0x4000) { v1 = v5->field_8; v0 = "internal error: channels_alloc %d too big"; sshfatal("channels.c", "channel_new", 0x187, 0x1, 0x1, 0x0); } v5->field_0 = xrecallocarray(v5->field_0, v5->field_8, v5->field_8 + 10, 0x8); v5->field_8 = v5->field_8 + 10; v9 = v5->field_8; v8 = "channel: expanding %d"; sshlog("channels.c", "channel_new", 0x18c, 0x0, 0x6, 0x0, *(&v10)); } v12 = v5->field_0 + v3 * 8; *((v5->field_0 + v3 * 8)) = xcalloc(0x1, 0x160); v6 = *(v12); v6->field_68 = sshbuf_new(0x1, 0x160, 0x18c, 0x0, 0x6, 0x0); if (!v6->field_68) { LABEL_400756: v8 = "sshbuf_new failed"; sshfatal("channels.c", "channel_new", 0x193, 0x1, 0x1, 0x0); } else { v6->field_70 = sshbuf_new(0x1, 0x160, v6, 0x0, 0x6, 0x0); if (!v6->field_70 || (v6->field_78 = sshbuf_new(0x1, 0x160, v6, 0x0, 0x6, 0x0), !v6->field_78)) goto LABEL_400756; } v4 = sshbuf_set_max_size(v6->field_68, 0x1000000); if (v4) { v8 = "sshbuf_set_max_size"; sshfatal("channels.c", "channel_new", 0x195, 0x1, 0x1, ssh_err(v4)); } v6->field_14 = 0; v6->field_10 = 0; v9 = 0; v8 = a9; channel_register_fds(a0, v6, a3, a4, a5, a7, *(&v10), v11); v6->field_4 = v3; v6->field_0 = a2; v6->field_c8 = a1; v6->field_b0 = v11; v6->field_b4 = v11; v6->field_bc = a6; v6->field_a0 = xstrdup(a8); v6->field_44 = -1; v6->field_60 = 1; v6->field_f0 = 0; v6->field_f8 = &v6->field_f0; v8 = a8; v7 = v3; v6 = "channel %d: new [%s]"; sshlog("channels.c", "channel_new", 0x1a3, 0x0, 0x5, 0x0, *(&v10)); return v6; }
int sshbuf_reserve(struct sshbuf *buf, size_t len, u_char **dpp) { u_char *dp; int r; if (dpp != ((void *)0) ) *dpp = ((void *)0) ; ; if ((r = sshbuf_allocate(buf, len)) != 0) return r; dp = buf->d + buf->size; buf->size += len; if (dpp != ((void *)0) ) *dpp = dp; return 0; }
long long sshbuf_reserve(unsigned long long a0[4], unsigned long a1, unsigned long long *a2) { unsigned int v0; unsigned long v1; void* v3; if (a2) *(a2) = 0; v0 = sshbuf_allocate(a0, a1); if (v0) { v3 = v0; return v3; } v1 = a0[3] + a0[0]; a0[3] = a0[3] + a1; if (a2) *(a2) = v1; v3 = 0; return v3; }
void sshfatal(const char *file, const char *func, int line, int showfunc, LogLevel level, const char *suffix, const char *fmt, ...) { va_list args; __builtin_va_start( args , fmt ) ; sshlogv(file, func, line, showfunc, level, suffix, fmt, args); __builtin_va_end( args ) ; cleanup_exit(255); }
void sshfatal(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4, undefined4 param_5,undefined4 param_6,undefined4 param_7_00,undefined4 param_8, undefined8 param_9,undefined8 param_10,undefined4 param_11,undefined4 param_12, undefined4 param_13,undefined8 param_14,undefined8 param_7) { char in_AL; long in_FS_OFFSET; undefined4 local_d8; undefined4 local_d4; undefined *local_d0; undefined *local_c8; undefined8 local_c0; undefined local_b8 [48]; undefined4 local_88; undefined4 local_78; undefined4 local_68; undefined4 local_58; undefined4 local_48; undefined4 local_38; undefined4 local_28; undefined4 local_18; if (in_AL != '\0') { local_88 = param_1; local_78 = param_2; local_68 = param_3; local_58 = param_4; local_48 = param_5; local_38 = param_6; local_28 = param_7_00; local_18 = param_8; } local_c0 = *(undefined8 *)(in_FS_OFFSET + 0x28); local_d8 = 0x30; local_d4 = 0x30; local_d0 = &stack0x00000010; local_c8 = local_b8; sshlogv(param_9,param_10,param_11,param_12,param_13,param_14,param_7,&local_d8); cleanup_exit(0xff); halt_baddata(); }
int pidfile_remove(struct pidfh *pfh) { return (_pidfile_remove(pfh, 1)); }
long long pidfile_remove(void* a0) { return _pidfile_remove(a0, 0x1); }
static void reserve_block_for_lnf_repair(e2fsck_t ctx) { blk64_t blk = 0; errcode_t err; ext2_filsys fs = ctx->fs; static const char name[] = "lost+found"; ext2_ino_t ino; ctx->lnf_repair_block = 0; if (!ext2fs_lookup(fs, 2, name, sizeof(name)-1, 0, &ino)) return; err = ext2fs_new_block2(fs, 0, ctx->block_found_map, &blk); if (err) return; ext2fs_mark_block_bitmap2(ctx->block_found_map, blk); ctx->lnf_repair_block = blk; }
unsigned long reserve_block_for_lnf_repair(long *a1) { char v2[4]; long v3; long v4; unsigned long v6; v6 = __readfsqword(0x28u); v3 = 0LL; v4 = *a1; a1[112] = 0LL; if ( ext2fs_lookup(v4, 2LL, "lost+found", 10LL, 0LL, v2) ) { if ( !ext2fs_new_block2(v4, 0LL, a1[52], &v3) ) { ext2fs_mark_block_bitmap2(a1[52], v3); a1[112] = v3; } } return __readfsqword(0x28u) ^ v6; }
inline int c_toupper (int c) { switch (c) { case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'g' + (0): case 'h' + (0): case 'i' + (0): case 'j' + (0): case 'k' + (0): case 'l' + (0): case 'm' + (0): case 'n' + (0): case 'o' + (0): case 'p' + (0): case 'q' + (0): case 'r' + (0): case 's' + (0): case 't' + (0): case 'u' + (0): case 'v' + (0): case 'w' + (0): case 'x' + (0): case 'y' + (0): case 'z' + (0): return c - 'a' + 'A'; default: return c; } }
void c_toupper(void) { halt_baddata(); }
static void parse_nh_res_group_rta(const struct rtattr *res_grp_attr, struct nha_res_grp *res_grp) { struct rtattr *tb[(__NHA_RES_GROUP_MAX - 1) + 1]; struct rtattr *rta; memset(res_grp, 0, sizeof(*res_grp)); (parse_rtattr_flags((tb), ((__NHA_RES_GROUP_MAX - 1)), ((void*)(((char*)(res_grp_attr)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((res_grp_attr)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), (1 << 15))); if (tb[NHA_RES_GROUP_BUCKETS]) res_grp->buckets = rta_getattr_u16(tb[NHA_RES_GROUP_BUCKETS]); if (tb[NHA_RES_GROUP_IDLE_TIMER]) { rta = tb[NHA_RES_GROUP_IDLE_TIMER]; res_grp->idle_timer = rta_getattr_u32(rta); } if (tb[NHA_RES_GROUP_UNBALANCED_TIMER]) { rta = tb[NHA_RES_GROUP_UNBALANCED_TIMER]; res_grp->unbalanced_timer = rta_getattr_u32(rta); } if (tb[NHA_RES_GROUP_UNBALANCED_TIME]) { rta = tb[NHA_RES_GROUP_UNBALANCED_TIME]; res_grp->unbalanced_time = rta_getattr_u64(rta); } }
void parse_nh_res_group_rta(unsigned short *a0, struct_0 *a1) { unsigned long long v0; char v1; char v2; char v3; char v4; char v5; char v6; unsigned long long *v8; unsigned long long v9; memset(a1, 0x0, 0x18); parse_rtattr_flags(&v1, 0x4, a0 + 2, *(a0) - 4, 0x8000); if (*(&v2)) a1->field_0 = rta_getattr_u16(*(&v2)); if (*(&v3)) { v0 = *(&v3); a1->field_4 = rta_getattr_u32(v0); } if (*(&v4)) { v0 = *(&v4); a1->field_8 = rta_getattr_u32(v0); } if (*(&v5)) { v0 = *(&v5); a1->field_10 = rta_getattr_u64(v0); } v9 = *(&v6) ^ v8[5]; return; }
COMMAND * make_while_command (test, action) COMMAND *test, *action; { return (make_until_or_while (cm_while, test, action)); }
long make_while_command(long a1, long a2) { return make_until_or_while(2, a1, a2); }
terminal__flush(EditLine *el) { (void) fflush(el->el_outfile); }
void terminal__flush(struct_0 *a0) { unsigned long long v1; v1 = fflush(a0->field_10); return; }
void * mmalloca (size_t n) { int plus = sizeof (small_t) + 2 * sa_alignment_max - 1; idx_t nplus; if (!__builtin_add_overflow (n, plus, &nplus) && !__builtin_mul_overflow_p (nplus, 1, (ptrdiff_t) 1)) { char *mem = (char *) malloc (nplus); if (mem != ((void *)0) ) { char *p = (char *)((((uintptr_t)mem + sizeof (small_t) + sa_alignment_max - 1) & ~(uintptr_t)(2 * sa_alignment_max - 1)) + sa_alignment_max); ((small_t *) p)[-1] = p - mem; return p; } } return ((void *)0) ; }
long long mmalloca(unsigned long a0) { unsigned int v0; unsigned int v1; unsigned long v2; unsigned long long v3; unsigned long v5; void* v6; v0 = 32; v5 = 0; if (0x8000000000000000 + a0 + v0 < a0) *(&v5) = 1; *(&v1) = a0 + v0; if (!(v5 & 1 ^ 1)) { v6 = 0; return v6; } else if (false) { v6 = 0; return v6; } else { v2 = malloc(*(&v1)); if (v2) { v3 = (v2 + 16 & -0x20) + 16; *((v3 - 1)) = v3 - v2; v6 = v3; return v6; } v6 = 0; return v6; } }
static size_t cvtnum(intmax_t num, int flags) { int len = max_int_length(sizeof(num)); char buf[len]; len = fmtstr(buf, len, "%" "l" "d" , num); return memtodest(buf, len, flags); }
long cvtnum(long a1, int a2) { unsigned long v2; void *v3; _BYTE v5[4]; int v6; long v7; int v8; long v9; char *v10; unsigned long v11; v7 = a1; v6 = a2; v11 = __readfsqword(0x28u); v8 = max_int_length(8); v9 = v8 - 1LL; v2 = 16 * ((v8 + 15LL) / 0x10uLL); while ( v5 != &v5[-(v2 & 0xFFFFFFFFFFFFF000LL)] ) ; v3 = alloca(v2 & 0xFFF); if ( (v2 & 0xFFF) != 0 ) *(_QWORD *)&v5[(v2 & 0xFFF) - 8] = *(_QWORD *)&v5[(v2 & 0xFFF) - 8]; v10 = v5; v8 = fmtstr(v5, v8, &unk_2B96, v7); return memtodest(v10, v8, v6); }
static void check_for_offset (struct control *p, char const *str, char const *num) { if (xstrtoimax (num, ((void *)0) , 10, &p->offset, "") != LONGINT_OK) ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, gettext (\"%s: integer expected after delimiter\"), quote (str)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, gettext ("%s: integer expected after delimiter"), quote (str)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, gettext ("%s: integer expected after delimiter"), quote (str)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; }
void check_for_offset(unsigned long long a0, unsigned long long a1, unsigned long long a2) { unsigned long long v2; if (xstrtoimax(a2, 0x0, 0xa, a0, &g_403143)) { v2 = quote(a1); error(0x1, 0x0, gettext("%s: integer expected after delimiter")); } return; }
struct timeval * multimeval (d, m) struct timeval *d; int m; { time_t t; t = d->tv_usec * m; d->tv_sec = d->tv_sec * m + t / 1000000; d->tv_usec = t % 1000000; return d; }
_QWORD * multimeval(_QWORD *a1, int a2) { long v3; v3 = a1[1] * a2; *a1 = a2 * *a1 + v3 / 1000000; a1[1] = v3 % 1000000; return a1; }
static off_t deflate_fast() { IPos hash_head; int flush = 0; unsigned match_length = 0; prev_length = 3 -1; while (lookahead != 0) { ((ins_h = (((ins_h)<<((15 +3 -1)/3)) ^ (window[(strstart) + 3 -1])) & ((unsigned)(1<<15)-1)), prev[(strstart) & (0x8000 -1)] = hash_head = (prev+0x8000)[ins_h], (prev+0x8000)[ins_h] = (strstart)); if (hash_head != 0 && strstart - hash_head <= (0x8000 -(258 +3 +1)) && strstart <= window_size - (258 +3 +1)) { match_length = longest_match (hash_head); if (match_length > lookahead) match_length = lookahead; } if (match_length >= 3) { ; flush = ct_tally(strstart-match_start, match_length - 3); lookahead -= match_length; do { if (rsync) rsync_roll((strstart), (match_length)); } while(0); if (match_length <= max_lazy_match) { match_length--; do { strstart++; ((ins_h = (((ins_h)<<((15 +3 -1)/3)) ^ (window[(strstart) + 3 -1])) & ((unsigned)(1<<15)-1)), prev[(strstart) & (0x8000 -1)] = hash_head = (prev+0x8000)[ins_h], (prev+0x8000)[ins_h] = (strstart)); } while (--match_length != 0); strstart++; } else { strstart += match_length; match_length = 0; ins_h = window[strstart]; (ins_h = (((ins_h)<<((15 +3 -1)/3)) ^ (window[strstart+1])) & ((unsigned)(1<<15)-1)); } } else { ; flush = ct_tally (0, window[strstart]); do { if (rsync) rsync_roll((strstart), (1)); } while(0); lookahead--; strstart++; } if (rsync && strstart > rsync_chunk_end) { rsync_chunk_end = 0xFFFFFFFFUL; flush = 2; } if (flush) flush_block(block_start >= 0L ? (char*)&window[(unsigned)block_start] : (char*) ((void *)0) , (long)strstart - block_start, flush-1, (0)), block_start = strstart; while (lookahead < (258 +3 +1) && !eofile) fill_window(); } return flush_block(block_start >= 0L ? (char*)&window[(unsigned)block_start] : (char*) ((void *)0) , (long)strstart - block_start, flush-1, (1)); }
void deflate_fast() { unsigned int v0; unsigned int v1; unsigned int v2; unsigned long long v4; unsigned long long v5; unsigned long long v6; v0 = 0; v1 = 0; good_match = 2; while (lookahead) { ins_h = (*(3856222327) ^ (ins_h * 32)) & 32767; v2 = *((0x10000 + &prev + 2 * ins_h)); g_5090b2 = v2; *((0x10000 + &prev + 2 * ins_h)) = 18517; if (v2 && 3850979413 - v2 <= 32506 && 17042544940070553685 <= window_size - 262) { v1 = longest_match(v2); if (v1 > lookahead) v1 = lookahead; } if (v1 > 2) { v0 = ct_tally(0x0, v1 - 3, 0x0, v1 - 3); lookahead = lookahead - v1; if (*(&rsync)) rsync_roll(0xec834853e5894855, v1); if (v1 <= max_lazy_match) { v1 -= 1; do { good_match = 3850979414; ins_h = (*(3856222327) ^ (ins_h * 32)) & 32767; v2 = *((0x10000 + &prev + 2 * ins_h)); g_5090b2 = v2; *((0x10000 + &prev + 2 * ins_h)) = 18517; v1 -= 1; } while (v1); good_match = 3850979414; } else { good_match = v1 + 17042544940070553685; v1 = 0; ins_h = *(17042544940075796597); ins_h = (*(3856222326) ^ (ins_h * 32)) & 32767; } } else { v0 = ct_tally(0x0, *(17042544940075796597), 0xec834853e5894855, (ins_h + 0x8000) * 2); if (*(&rsync)) rsync_roll(0xec834853e5894855, 0x1); lookahead = lookahead - 1; good_match = 3850979414; } if (*(&rsync) && 17042544940070553685 > rsync_chunk_end) { rsync_chunk_end = 4294967295; v0 = 2; } if (v0) { v4 = 0; if (false) v4 = 17040927305185314931; flush_block(v4); block_start = 17042544940070553685; } while (lookahead <= 261) { if (eofile) break; fill_window(); } } v5 = 0; if (false) v5 = 17040927305185314931; v6 = flush_block(v5); return; }
_Bool pred_prune (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) { (void) pathname; (void) pred_ptr; if (options.do_dir_first == 1 ) { ((void) sizeof (( state.have_stat ) ? 1 : 0), __extension__ ({ if ( state.have_stat ) ; else __assert_fail ( "state.have_stat" , "pred.c", 853, __extension__ __PRETTY_FUNCTION__); })) ; if (stat_buf != ((void *)0) && (((( stat_buf->st_mode )) & 0170000) == (0040000)) ) state.stop_at_current_level = 1 ; } return 1 ; }
long long pred_prune(unsigned long a0, struct_0 *a1, unsigned long a2) { unsigned long v0; unsigned long v1; v1 = a0; v0 = a2; if (options) { if (!g_50002c) { __assert_fail(); } else if (a1 && (a1->field_18 & 0xf000) == 0x4000) { options = 1; } } return 1; }
void bi_init (zipfile) file_t zipfile; { zfile = zipfile; bi_buf = 0; bi_valid = 0; if (zfile != (-1)) { read_buf = file_read; } }
unsigned long bi_init(int a1) { unsigned long result; zfile = a1; bi_buf = 0; bi_valid = 0; result = (unsigned int)a1; if ( a1 != -1 ) { result = (unsigned long)&file_read; read_buf = (long)&file_read; } return result; }
void dump_mmp_msg(struct mmp_struct *mmp, const char *fmt, ...) { va_list pvar; if (fmt) { printf("MMP check failed: "); __builtin_va_start( pvar , fmt ) ; vprintf(fmt, pvar); __builtin_va_end( pvar ) ; } if (mmp) { time_t t = mmp->mmp_time; printf("MMP_block:\n"); printf(" mmp_magic: 0x%x\n", mmp->mmp_magic); printf(" mmp_check_interval: %d\n", mmp->mmp_check_interval); printf(" mmp_sequence: %08x\n", mmp->mmp_seq); printf(" mmp_update_date: %s", ctime(&t)); printf(" mmp_update_time: %lld\n", (long long) mmp->mmp_time); printf(" mmp_node_name: %.*s\n", (int)sizeof(mmp->mmp_nodename), (char *)mmp->mmp_nodename); printf(" mmp_device_name: %.*s\n", (int)sizeof(mmp->mmp_bdevname), (char *)mmp->mmp_bdevname); } }
void dump_mmp_msg(struct_0 *a0, char *a1, unsigned long a2) { unsigned long v0; unsigned int v1; unsigned int v2; unsigned long v3; unsigned long v4; unsigned long long v5; char v6; unsigned long v7; unsigned long v8; unsigned long v9; unsigned long v10; int v11; int v12; int v13; int v14; int v15; int v16; int v17; int v18; unsigned long v19; unsigned long v20; unsigned long v21; unsigned long v22; char v23; int v24; int v25; int v26; int v27; int v28; int v29; int v30; int v31; unsigned long long *v32; unsigned long long v33; v7 = a2; v8 = v20; v9 = v21; v10 = v22; if (v23) { v11 = v24; v12 = v25; v13 = v26; v14 = v27; v15 = v28; v16 = v29; v17 = v30; v18 = v31; } v5 = v32[5]; if (a1) { printf("MMP check failed: "); v1 = 16; v2 = 48; v3 = &v19; v4 = &v6; vprintf(a1, &v1); } if (a0) { v0 = a0->field_8; printf("MMP_block:\n"); printf(" mmp_magic: 0x%x\n", a0->field_0); printf(" mmp_check_interval: %d\n", a0->field_70); printf(" mmp_sequence: %08x\n", a0->field_4); printf(" mmp_update_date: %s", ctime(&v0)); printf(" mmp_update_time: %lld\n", a0->field_8); printf(" mmp_node_name: %.*s\n", 64); printf(" mmp_device_name: %.*s\n", 32); } v33 = v5 ^ v32[5]; if (!(v5 ^ v32[5])) return; __stack_chk_fail(); }
int kex_buf2prop(struct sshbuf *raw, int *first_kex_follows, char ***propp) { struct sshbuf *b = ((void *)0) ; u_char v; u_int i; char **proposal = ((void *)0) ; int r; *propp = ((void *)0) ; if ((proposal = calloc(PROPOSAL_MAX, sizeof(char *))) == ((void *)0) ) return -2; if ((b = sshbuf_fromb(raw)) == ((void *)0) ) { r = -2; goto out; } if ((r = sshbuf_consume(b, 16)) != 0) { sshlog("kex.c", __func__, 365, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), "consume cookie"); goto out; } for (i = 0; i < PROPOSAL_MAX; i++) { if ((r = sshbuf_get_cstring(b, &(proposal[i]), ((void *)0) )) != 0) { sshlog("kex.c", __func__, 371, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), "parse proposal %u", i); goto out; } sshlog("kex.c", __func__, 374, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "%s: %s", proposal_names[i], proposal[i]); } if ((r = sshbuf_get_u8(b, &v)) != 0 || (r = sshbuf_get_u32(b, &i)) != 0) { sshlog("kex.c", __func__, 379, 1, SYSLOG_LEVEL_ERROR, ssh_err(r), "parse"); goto out; } if (first_kex_follows != ((void *)0) ) *first_kex_follows = v; sshlog("kex.c", __func__, 384, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "first_kex_follows %d ", v); sshlog("kex.c", __func__, 385, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "reserved %u ", i); r = 0; *propp = proposal; out: if (r != 0 && proposal != ((void *)0) ) kex_prop_free(proposal); sshbuf_free(b); return r; }
int kex_buf2prop(unsigned long long a0, unsigned int *a1, unsigned long long *a2) { unsigned long v0; struct_0 *v1; char v2; unsigned int v3; unsigned int v4; unsigned long long v5; void* v6; unsigned int v8; v5 = 0; v6 = 0; *(a2) = 0; v6 = calloc(0xa, 0x8); if (!v6) { v8 = -2; } else { v5 = sshbuf_fromb(a0); if (!v5) { v4 = -2; } else { v4 = sshbuf_consume(v5, 0x10); if (v4) { sshlog("kex.c", "kex_buf2prop", 0x16d, 0x1, 0x2, ssh_err(v4), "consume cookie"); } else { v3 = 0; while (true) { if (v3 <= 9) { v4 = sshbuf_get_cstring(v5, &v6[v3], 0x0, &v6[v3]); if (v4) { v1 = v3; sshlog("kex.c", "kex_buf2prop", 0x173, 0x1, 0x2, ssh_err(v4), "parse proposal %u"); break; } else { v0 = (&proposal_names)[v3]; sshlog("kex.c", "kex_buf2prop", 0x176, 0x0, 0x6, 0x0, "%s: %s"); v3 += 1; } } else { v4 = sshbuf_get_u8(v5, &v2, &v2); if (!v4) { v4 = sshbuf_get_u32(v5, &v3, &v3); if (!v4) { if (a1) *(a1) = v2; v1 = v2; sshlog("kex.c", "kex_buf2prop", 0x180, 0x0, 0x6, 0x0, "first_kex_follows %d "); v1 = v3; sshlog("kex.c", "kex_buf2prop", 0x181, 0x0, 0x6, 0x0, "reserved %u "); v4 = 0; *(a2) = v6; break; } } if (v4 || v4) { sshlog("kex.c", "kex_buf2prop", 0x17b, 0x1, 0x2, ssh_err(v4), "parse"); break; } } } } } if (v4 && v6) kex_prop_free(v6); sshbuf_free(v5); v8 = v4; } return v8; }
void coproc_dispose (cp) struct coproc *cp; { sigset_t set, oset; if (cp == 0) return; do { sigemptyset (&set); sigaddset (&set, 17 ); sigemptyset (&oset); sigprocmask ( 0 , &set, &oset); } while (0); cp->c_lock = 3; coproc_unsetvars (cp); do { if (cp->c_name) sh_xfree((cp->c_name), "execute_cmd.c", 2077); } while (0); coproc_close (cp); coproc_init (cp); cp->c_lock = 0; sigprocmask ( 2 , &oset, (sigset_t *) ((void *)0) ); }
void coproc_dispose(long *param_1) { long in_FS_OFFSET; sigset_t local_118; sigset_t local_98; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_1 != (long *)0x0) { sigemptyset(&local_118); sigaddset(&local_118,0x11); sigemptyset(&local_98); sigprocmask(0,&local_118,&local_98); *(undefined4 *)((long)param_1 + 0x24) = 3; coproc_unsetvars(param_1); if (*param_1 != 0) { sh_xfree(*param_1,"execute_cmd.c",0x81d); } coproc_close(param_1); coproc_init(param_1); *(undefined4 *)((long)param_1 + 0x24) = 0; sigprocmask(2,&local_98,(sigset_t *)0x0); } if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return; }
int rl_get_previous_history(int count, int key) { char a[2]; a[0] = (char)key; a[1] = '\0'; while (count--) el_push(e, a); return 0; }
long long rl_get_previous_history(unsigned long a0, unsigned long a1) { unsigned int v0; int tmp_9; char v1; char v2; v0 = a0; v1 = a1; v2 = 0; while (true) { tmp_9 = v0; v0 -= 1; if (!tmp_9) break; el_push(e, &v1, &v1); } return 0; }
int main (int argc, char **argv) { Prog = Basename (argv[0]); log_set_progname(Prog); log_set_logfd( stderr ); (void) setlocale ( 6 , ""); (void) bindtextdomain ("shadow", "/usr/share/locale"); (void) textdomain ("shadow"); process_root_flag ("-R", argc, argv); { int c; static struct option const longopts[] = { {"before", 1 , ((void *)0) , 'b'}, {"clear", 0 , ((void *)0) , 'C'}, {"help", 0 , ((void *)0) , 'h'}, {"root", 1 , ((void *)0) , 'R'}, {"set", 0 , ((void *)0) , 'S'}, {"time", 1 , ((void *)0) , 't'}, {"user", 1 , ((void *)0) , 'u'}, { ((void *)0) , 0, ((void *)0) , '\0'} }; while ((c = getopt_long (argc, argv, "b:ChR:St:u:", longopts, ((void *)0) )) != -1) { switch (c) { case 'b': { unsigned long inverse_days; if (getulong (optarg, &inverse_days) == 0) { fprintf ( stderr , gettext ("%s: invalid numeric argument '%s'\n"), Prog, optarg); exit ( 1 ); } inverse_seconds = (time_t) inverse_days * (24L*3600L); bflg = 1 ; break; } case 'C': { Cflg = 1 ; break; } case 'h': usage ( 0 ); break; case 'R': break; case 'S': { Sflg = 1 ; break; } case 't': { unsigned long days; if (getulong (optarg, &days) == 0) { fprintf ( stderr , gettext ("%s: invalid numeric argument '%s'\n"), Prog, optarg); exit ( 1 ); } seconds = (time_t) days * (24L*3600L); tflg = 1 ; break; } case 'u': { const struct passwd *pwent; uflg = 1 ; pwent = getpwnam (optarg); if ( ((void *)0) != pwent) { umin = (unsigned long) pwent->pw_uid; has_umin = 1 ; umax = umin; has_umax = 1 ; } else { if (getrange (optarg, &umin, &has_umin, &umax, &has_umax) == 0) { fprintf ( stderr , gettext ("%s: Unknown user or range: %s\n"), Prog, optarg); exit ( 1 ); } } break; } default: usage ( 1 ); break; } } if (argc > optind) { fprintf ( stderr , gettext ("%s: unexpected argument: %s\n"), Prog, argv[optind]); usage ( 1 ); } if (Cflg && Sflg) { fprintf ( stderr , gettext ("%s: Option -C cannot be used together with option -S\n"), Prog); usage ( 1 ); } if ((Cflg || Sflg) && !uflg) { fprintf ( stderr , gettext ("%s: Options -C and -S require option -u to specify the user\n"), Prog); usage ( 1 ); } } lastlogfile = fopen ("/var/log/lastlog", (Cflg || Sflg)?"r+":"r"); if ( ((void *)0) == lastlogfile) { perror ("/var/log/lastlog"); exit ( 1 ); } if (fstat (fileno (lastlogfile), &statbuf) != 0) { fprintf ( stderr , gettext ("%s: Cannot get the size of %s: %s\n"), Prog, "/var/log/lastlog", strerror ( (*__errno_location ()) )); exit ( 1 ); } if (Cflg || Sflg) update (); else print (); (void) fclose (lastlogfile); return 0 ; }
int main(unsigned long a0, unsigned long long *a1) { unsigned int v0; char v1; struct_0 *v2; unsigned long long v4; Prog = Basename(*(a1)); log_set_progname(0xdc7d8928ec834853); log_set_logfd(stderr); setlocale(0x6, &g_40133f); bindtextdomain("shadow", "/usr/share/locale"); textdomain("shadow"); process_root_flag("-R", a0, a1); while (true) { v0 = getopt_long(a0, a1, "b:ChR:St:u:", &longopts.5863, NULL); if (v0 == -1) break; switch (v0) { case 67: Cflg = 1; break; case 82: break; case 83: Sflg = 1; break; case 98: if (getulong(*(&optarg), &v1, &v1)) { inverse_seconds = *(&v1) * 86400; bflg = 1; break; } else { fprintf(stderr, gettext("%s: invalid numeric argument '%s'\n")); exit(0x1); } case 104: usage(0x0); case 116: if (getulong(*(&optarg), &v1, &v1)) { seconds = *(&v1) * 86400; tflg = 1; break; } else { fprintf(stderr, gettext("%s: invalid numeric argument '%s'\n")); exit(0x1); } case 117: uflg = 1; v2 = &getpwnam(*(&optarg))->pw_name; if (v2) { umin = v2->field_10; has_umin = 1; umax = umin; has_umax = 1; break; } else { if (!getrange(*(&optarg), &umin, &has_umin, &umax, &has_umax)) { fprintf(stderr, gettext("%s: Unknown user or range: %s\n")); exit(0x1); } break; } default: usage(0x1); } } if (a0 > optind) { fprintf(stderr, gettext("%s: unexpected argument: %s\n")); usage(0x1); } if (Cflg && Sflg) { fprintf(stderr, gettext("%s: Option -C cannot be used together with option -S\n")); usage(0x1); } if ((Cflg || Sflg) && (uflg ^ 1)) { fprintf(stderr, gettext("%s: Options -C and -S require option -u to specify the user\n")); usage(0x1); } if (Cflg || Sflg) v4 = "r+"; else v4 = "r"; lastlogfile = fopen("/var/log/lastlog", v4); if (!lastlogfile) { perror("/var/log/lastlog"); exit(0x1); } else if (!fstat(fileno(lastlogfile), &statbuf)) { if (Cflg || Sflg) update(); else print(); fclose(lastlogfile); return 0; } else { strerror(*(__errno_location())); fprintf(stderr, gettext("%s: Cannot get the size of %s: %s\n")); exit(0x1); } }
static int oexpr(enum token n) { int res = 0; for (;;) { res |= aexpr(n); n = t_lex(t_wp + 1); if (n != BOR) break; n = t_lex(t_wp += 2); } return res; }
int oexpr(unsigned long a0) { unsigned int v0; unsigned int v1; v0 = a0; v1 = 0; while (true) { v1 |= aexpr(v0); v0 = t_lex(t_wp + 8); if (v0 != 36) break; t_wp = t_wp + 16; v0 = t_lex(t_wp); } return v1; }
void el_end(EditLine *el) { if (el == ((void *)0) ) return; el_reset(el); terminal_end(el); keymacro_end(el); map_end(el); if (!(el->el_flags & 0x002)) tty_end(el, 2 ); ch_end(el); read_end(el->el_read); search_end(el); hist_end(el); prompt_end(el); sig_end(el); literal_end(el); free(el->el_prog); free(el->el_visual.cbuff); free(el->el_visual.wbuff); free(el->el_scratch.cbuff); free(el->el_scratch.wbuff); free(el->el_lgcyconv.cbuff); free(el->el_lgcyconv.wbuff); free(el); }
void el_end(void **param_1) { if (param_1 != (void **)0x0) { el_reset(param_1); terminal_end(param_1); keymacro_end(param_1); map_end(param_1); if ((*(uint *)((long)param_1 + 0x2c) & 2) == 0) { tty_end(param_1,2); } ch_end(param_1); read_end(param_1[0x98]); search_end(param_1); hist_end(param_1); prompt_end(param_1); sig_end(param_1); literal_end(param_1); free(*param_1); free(param_1[0x99]); free(param_1[0x9b]); free(param_1[0x9d]); free(param_1[0x9f]); free(param_1[0xa1]); free(param_1[0xa3]); free(param_1); } return; }
_Bool force_depends(struct deppossi *possi) { return in_force(FORCE_DEPENDS) || ignore_depends_possi(possi) || ignore_depends(possi->up->up); }
long long force_depends(unsigned long long **a0) { unsigned int v1; unsigned long v2; v1 = in_force(0x1000); if (!v1) { v1 = ignore_depends_possi(a0); if (!v1) { v1 = ignore_depends(*(*(a0))); if (!v1) v1 = 0; } } if (v1 || v1 || v1) v1 = 1; v2 = v1 & 1; return v2; }
static char * expand_string_if_necessary (string, quoted, func) char *string; int quoted; EXPFUNC *func; { WORD_LIST *list; size_t slen; int i, saw_quote; char *ret; mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); slen = ( (__ctype_get_mb_cur_max ()) > 1) ? strlen (string) : 0; i = saw_quote = 0; while (string[i]) { if ((string[i] == '$' || string[i] == '`' || string[i] == '<' || string[i] == '>' || string[i] == '\001' || string[i] == '~')) break; else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"') saw_quote = 1; 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); } if (string[i]) { list = (*func) (string, quoted); if (list) { ret = string_list (list); dispose_words (list); } else ret = (char *) ((void *)0) ; } else if (saw_quote && ((quoted & (0x002|0x001)) == 0)) ret = string_quote_removal (string, quoted); else ret = (char *)strcpy (sh_xmalloc((1 + strlen (string)), "subst.c", 3855), (string)); return ret; }
char * expand_string_if_necessary(char *param_1,uint param_2,code *param_3) { bool bVar1; int iVar2; size_t sVar3; long lVar4; char *__dest; long in_FS_OFFSET; int local_4c; char *local_40; ulong local_38; mbstate_t local_20; mbstate_t local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(&local_20,0,8); sVar3 = __ctype_get_mb_cur_max(); if (sVar3 < 2) { sVar3 = 0; } else { sVar3 = strlen(param_1); } bVar1 = false; local_4c = 0; while (((((param_1[local_4c] != '\0' && (param_1[local_4c] != '$')) && (param_1[local_4c] != '`')) && ((param_1[local_4c] != '<' && (param_1[local_4c] != '>')))) && ((param_1[local_4c] != '\x01' && (param_1[local_4c] != '~'))))) { if (((param_1[local_4c] == '\'') || (param_1[local_4c] == '\\')) || (param_1[local_4c] == '\"')) { bVar1 = true; } if (locale_mb_cur_max < 2) { local_4c = local_4c + 1; } else { iVar2 = is_basic((int)param_1[local_4c]); if (iVar2 == 0) { if ((locale_utf8locale == 0) || (param_1[local_4c] < '\0')) { local_18 = local_20; local_38 = mbrlen(param_1 + local_4c,sVar3 - (long)local_4c,&local_20); } else { local_38 = (ulong)(param_1[local_4c] != '\0'); } } else { local_38 = 1; } if ((local_38 == 0xfffffffffffffffe) || (local_38 == 0xffffffffffffffff)) { local_20 = local_18; local_4c = local_4c + 1; } else if (local_38 == 0) { local_4c = local_4c + 1; } else { local_4c = local_4c + (int)local_38; } } } if (param_1[local_4c] == '\0') { if ((bVar1) && ((param_2 & 3) == 0)) { local_40 = (char *)string_quote_removal(param_1,param_2); } else { sVar3 = strlen(param_1); __dest = (char *)sh_xmalloc(sVar3 + 1,"subst.c",0xf0f); local_40 = strcpy(__dest,param_1); } } else { lVar4 = (*param_3)(param_1,param_2); if (lVar4 == 0) { local_40 = (char *)0x0; } else { local_40 = (char *)string_list(lVar4); dispose_words(lVar4); } } if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return local_40; }
static char * restore_tilde (val, directory_part) char *val, *directory_part; { int l, vl, dl2, xl; char *dh2, *expdir, *ret, *v; vl = strlen (val); dh2 = directory_part ? bash_dequote_filename (directory_part, 0) : 0; bash_directory_expansion (&dh2); dl2 = strlen (dh2); expdir = bash_tilde_expand (directory_part, 0); xl = strlen (expdir); if (*directory_part == '~' && ((directory_part)[0] == (expdir)[0] && strcmp(directory_part, expdir) == 0)) { v = mbschr (val, '/'); vl = (((v) && (v)[0]) ? ((v)[1] ? ((v)[2] ? strlen(v) : 2) : 1) : 0); ret = (char *)sh_xmalloc((xl + vl + 2), "bashline.c", 3206); strcpy (ret, directory_part); if (v && *v) strcpy (ret + xl, v); sh_xfree((dh2), "bashline.c", 3211); sh_xfree((expdir), "bashline.c", 3212); return ret; } sh_xfree((expdir), "bashline.c", 3216); l = (vl - xl) + 1; if (l <= 0) { sh_xfree((dh2), "bashline.c", 3228); return ((char *)strcpy (sh_xmalloc((1 + strlen (val)), "bashline.c", 3229), (val))); } ret = (char *)sh_xmalloc((dl2 + 2 + l), "bashline.c", 3232); strcpy (ret, dh2); strcpy (ret + dl2, val + xl); sh_xfree((dh2), "bashline.c", 3236); return (ret); }
char * restore_tilde(const char *a1, const char *a2) { char *v2; int v3; size_t v5; char *v6; int v7; int v8; int v9; int v10; char *v11; char *s2; char *src; char *dest; unsigned long v15; v15 = __readfsqword(0x28u); v7 = strlen(a1); if ( a2 ) v2 = (char *)bash_dequote_filename(a2, 0); else v2 = 0LL; v11 = v2; bash_directory_expansion((const char **)&v11); v8 = strlen(v11); s2 = (char *)bash_tilde_expand(a2, 0LL); v9 = strlen(s2); if ( *a2 == 126 && *a2 == *s2 && !strcmp(a2, s2) ) { src = (char *)mbschr(a1, 47LL); if ( src && *src ) { if ( src[1] ) { if ( src[2] ) v3 = strlen(src); else v3 = 2; } else { v3 = 1; } } else { v3 = 0; } dest = (char *)sh_xmalloc(v9 + v3 + 2, "bashline.c", 3206LL); strcpy(dest, a2); if ( src ) { if ( *src ) strcpy(&dest[v9], src); } sh_xfree(v11, "bashline.c", 3211LL); sh_xfree(s2, "bashline.c", 3212LL); return dest; } else { sh_xfree(s2, "bashline.c", 3216LL); v10 = v7 - v9 + 1; if ( v10 > 0 ) { dest = (char *)sh_xmalloc(v8 + 2 + v10, "bashline.c", 3232LL); strcpy(dest, v11); strcpy(&dest[v8], &a1[v9]); sh_xfree(v11, "bashline.c", 3236LL); return dest; } else { sh_xfree(v11, "bashline.c", 3228LL); v5 = strlen(a1); v6 = (char *)sh_xmalloc(v5 + 1, "bashline.c", 3229LL); return strcpy(v6, a1); } } }
static size_t print_file_name_and_frills (const struct fileinfo *f, size_t start_col) { char buf[ ((( ((2 * sizeof (uintmax_t) * 8 * 146 / 485 + 1) * ( 16 + 1) - 16 + 1 + 3) + 1 )>( ((((((sizeof (uintmax_t) * 8) - (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) + 1) ))?( ((2 * sizeof (uintmax_t) * 8 * 146 / 485 + 1) * ( 16 + 1) - 16 + 1 + 3) + 1 ):( ((((((sizeof (uintmax_t) * 8) - (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) + 1) )) ]; set_normal_color (); if (print_inode) printf ("%*s ", format == with_commas ? 0 : inode_number_width, format_inode (buf, sizeof buf, f)); if (print_block_size) printf ("%*s ", format == with_commas ? 0 : block_size_width, ! f->stat_ok ? "?" : human_readable (((f->stat).st_blocks), buf, human_output_opts, 512 , output_block_size)); if (print_scontext) printf ("%*s ", format == with_commas ? 0 : scontext_width, f->scontext); size_t width = print_name_with_quoting (f, 0 , ((void *)0) , start_col); if (indicator_style != none) width += print_type_indicator (f->stat_ok, f->stat.st_mode, f->filetype); return width; }
void print_file_name_and_frills(struct_0 *a0, unsigned long long a1) { unsigned long long v0; char v1; unsigned long long v4; set_normal_color(); if (print_inode) { format_inode(&v1, 0x28c, a0); printf("%*s "); } if (print_block_size) { if (!(a0->field_b8 ^ 1)) human_readable(a0->field_58, &v1, human_output_opts, 0x200, output_block_size); printf("%*s "); } if (print_scontext) printf("%*s "); *(&v0) = print_name_with_quoting(a0, 0x0, 0x0, a1); if (indicator_style) v0 += print_type_indicator(a0->field_b8, a0->field_30, a0->field_a8); v4 = v0; return; }
static _Bool do_stat (char const *filename, char const *format, char const *format2) { int fd = (strcmp (filename, "-") == 0) ? 0 : -100 ; int flags = 0; struct stat st; struct statx stx = { 0, }; char const *pathname = filename; struct print_args pa; pa.st = &st; pa.btime = (struct timespec) {-1, -1}; if ( -100 != fd) { pathname = ""; flags = 0x1000 ; } else if (!follow_links) { flags = 0x100 ; } if (dont_sync) flags |= 0x4000 ; else if (force_sync) flags |= 0x2000 ; if (! force_sync) flags |= 0x800 ; fd = statx (fd, pathname, flags, format_to_mask (format), &stx); if (fd < 0) { if (flags & 0x1000 ) error (0, (*__errno_location ()) , gettext ("cannot stat standard input")); else error (0, (*__errno_location ()) , gettext ("cannot statx %s"), quotearg_style (shell_escape_always_quoting_style, filename)); return 0 ; } if ( (((( stx.stx_mode )) & 0170000) == (0060000)) || (((( stx.stx_mode )) & 0170000) == (0020000)) ) format = format2; statx_to_stat (&stx, &st); if (stx.stx_mask & 0x00000800U ) pa.btime = statx_timestamp_to_timespec (stx.stx_btime); _Bool fail = print_it (format, fd, filename, print_stat, &pa); return ! fail; }
_BOOL8 do_stat(const char *a1, char *a2, char *a3) { int v3; unsigned int v4; char *v5; int *v6; long v7; char *v8; int *v9; long v11; char *v13; unsigned int v14; unsigned int v15; signed int v16; const char *v17; char *v18; long v19; long v20; char v21[144]; long v22[36]; v13 = a2; v22[33] = __readfsqword(0x28u); if ( !strcmp(a1, "-") ) v3 = 0; else v3 = -100; v15 = v3; v14 = 0; memset(v22, 0, 0x100uLL); v17 = a1; v18 = v21; v19 = -1LL; v20 = -1LL; if ( v3 == -100 ) { if ( follow_links != 1 ) v14 = 256; } else { v17 = locale; v14 = 4096; } if ( dont_sync ) { v14 |= 0x4000u; } else if ( force_sync ) { v14 |= 0x2000u; } if ( force_sync != 1 ) v14 |= 0x800u; v4 = format_to_mask(a2); v16 = statx(v15, v17, v14, v4, v22); if ( v16 >= 0 ) { if ( (WORD2(v22[3]) & 0xF000) == 24576 || (WORD2(v22[3]) & 0xF000) == 0x2000 ) v13 = a3; statx_to_stat((long)v22, (long)v21); if ( (v22[0] & 0x800) != 0 ) { v19 = statx_timestamp_to_timespec(v22[10]); v20 = v11; } return !print_it(v13, v16, a1, print_stat, (long *)&v18); } else { if ( (v14 & 0x1000) != 0 ) { v5 = gettext("cannot stat standard input"); v6 = _errno_location(); error(0, *v6, v5); } else { v7 = quotearg_style(4LL, a1); v8 = gettext("cannot statx %s"); v9 = _errno_location(); error(0, *v9, v8, v7); } return 0LL; } }
terminal_bind_arrow(EditLine *el) { el_action_t *map; const el_action_t *dmap; int i, j; char *p; funckey_t *arrow = el->el_terminal.t_fkey; if (el->el_terminal.t_buf == ((void *)0) || el->el_map.key == ((void *)0) ) return; map = el->el_map.type == 1 ? el->el_map.alt : el->el_map.key; dmap = el->el_map.type == 1 ? el->el_map.vic : el->el_map.emacs; terminal_reset_arrow(el); for (i = 0; i < 7; i++) { wchar_t wt_str[((size_t)8)]; wchar_t *px; size_t n; p = el->el_terminal.t_str[arrow[i].key]; if (!p || !*p) continue; for (n = 0; n < ((size_t)8) && p[n]; ++n) wt_str[n] = p[n]; while (n < ((size_t)8)) wt_str[n++] = '\0'; px = wt_str; j = (unsigned char) *p; if (arrow[i].type == 2) keymacro_clear(el, map, px); else { if (p[1] && (dmap[j] == map[j] || map[j] == 25)) { keymacro_add(el, px, &arrow[i].fun, arrow[i].type); map[j] = 25; } else if (map[j] == 28) { keymacro_clear(el, map, px); if (arrow[i].type == 0) map[j] = arrow[i].fun.cmd; else keymacro_add(el, px, &arrow[i].fun, arrow[i].type); } } } }
void terminal_bind_arrow(struct_0 *a0) { unsigned int v0; unsigned int v1; void* v2; unsigned long v3; char *v4; char *v5; void* v6; void* v7; char v8; char v9; unsigned long long v11; unsigned long long v12; void* v13; unsigned long long *v14; unsigned long long v15; v3 = a0->field_c8; if (a0->field_a0 && a0->field_3f8) { if (a0->field_420 == 1) v11 = a0->field_3f0; else v11 = a0->field_3f8; v4 = v11; if (a0->field_420 == 1) v12 = a0->field_410; else v12 = a0->field_408; v5 = v12; terminal_reset_arrow(a0); for (v0 = 0; v0 <= 6; v0 += 1) { v6 = *((a0->field_b0 + *((v3 + v0 * 32 + 8)) * 8)); if (v6 && *(v6)) { for (v2 = 0; v2 <= 7; v2 += 1) { if (!*((v2 + v6))) break; *((&v8 + 0x4 * v2)) = *((v2 + v6)); } for (; v2 <= 7; *((&v8 + 0x4 * v13)) = 0) { v13 = v2; v2 += 1; } v7 = &v8; v1 = *(v6); if (*((v3 + (v0 << 5) + 24)) == 2) { keymacro_clear(a0, v4, v7, v4); } else { if (v6[1] && (v5[v1] == v4[v1] || v4[v1] == 25)) { keymacro_add(a0, v7, v3 + v0 * 32 + 16, *((v3 + v0 * 32 + 24))); v4[v1] = 25; } if ((!v6[1] || v5[v1] != v4[v1] && v4[v1] != 25) && v4[v1] == 28) { keymacro_clear(a0, v4, v7, v4); if (!*((v3 + (v0 << 5) + 24))) v4[v1] = *((v3 + v0 * 32 + 16)); else keymacro_add(a0, v7, v3 + v0 * 32 + 16, *((v3 + v0 * 32 + 24))); } } } } } v15 = *(&v9) ^ v14[5]; return; }
static uintmax_t name_to_gid (char const *name) { struct group *gr = getgrnam (name); return gr ? gr->gr_gid : (18446744073709551615UL) ; }
long name_to_gid(const char *a1) { struct group *v2; v2 = getgrnam(a1); if ( v2 ) return v2->gr_gid; else return -1LL; }
static char * maybe_restore_tilde (val, directory_part) char *val, *directory_part; { rl_icppfunc_t *save; char *ret; save = (dircomplete_expand == 0) ? save_directory_hook () : (rl_icppfunc_t *)0; ret = restore_tilde (val, directory_part); if (save) restore_directory_hook (save); return ret; }
char * maybe_restore_tilde(const char *a1, const char *a2) { long ( *v2)(_QWORD); long ( *v4)(_QWORD); char *v5; if ( dircomplete_expand ) v2 = 0LL; else v2 = save_directory_hook(); v4 = v2; v5 = restore_tilde(a1, a2); if ( v4 ) restore_directory_hook(v4); return v5; }
static inline __u8 rta_getattr_u8(const struct rtattr *rta) { return *(__u8 *)((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); }
undefined rta_getattr_u8(long param_1) { return *(undefined *)(param_1 + 4); }
static void vti6_print_help(struct link_util *lu, int argc, char **argv, FILE *f) { fprintf(f, "Usage: ... %-4s [ remote ADDR ]\n" " [ local ADDR ]\n" " [ [i|o]key KEY ]\n" " [ dev PHYS_DEV ]\n" " [ fwmark MARK ]\n" "\n" "Where: ADDR := { IPV6_ADDRESS }\n" " KEY := { DOTTED_QUAD | NUMBER }\n" " MARK := { 0x0..0xffffffff }\n", lu->id); }
void vti6_print_help(unsigned long a0, unsigned long a1, unsigned long a2, void* a3) { unsigned long v0; unsigned int v1; unsigned long v2; unsigned long long v4; v2 = a0; v1 = a1; v0 = a2; v4 = fprintf(a3, "Usage: ... %-4s\t[ remote ADDR ]\n\t\t[ local ADDR ]\n\t\t[ [i|o]key KEY ]\n\t\t[ dev PHYS_DEV ]\n\t\t[ fwmark MARK ]\n\nWhere:\tADDR := { IPV6_ADDRESS }\n\tKEY := { DOTTED_QUAD | NUMBER }\n\tMARK := { 0x0..0xffffffff }\n"); return; }
static void set_process_rdomain(struct ssh *ssh, const char *name) { sshfatal("sshd.c", __func__, 1483, 0, SYSLOG_LEVEL_FATAL, ((void *)0) , "Unable to set routing domain: not supported in this platform"); }
void set_process_rdomain(unsigned long a0, unsigned long a1, unsigned long a2) { unsigned long long v0; unsigned long v1; unsigned long v2; v2 = a0; v1 = a1; v0 = "Unable to set routing domain: not supported in this platform"; sshfatal("sshd.c"); }
static char * create_fullname (char const *gecos_name, char const *user_name) { size_t rsize = strlen (gecos_name) + 1; char *result; char *r; size_t ampersands = count_ampersands (gecos_name); if (ampersands != 0) { size_t ulen = strlen (user_name); size_t product; if (__builtin_mul_overflow (ulen, ampersands - 1, &product) || __builtin_add_overflow (rsize, product, &rsize)) xalloc_die (); } r = result = xmalloc (rsize); while (*gecos_name) { if (*gecos_name == '&') { char const *uname = user_name; if ( ((*__ctype_b_loc ())[(int) (( to_uchar (*uname) ))] & (unsigned short int) _ISlower) ) *r++ = toupper (to_uchar (*uname++)); while (*uname) *r++ = *uname++; } else { *r++ = *gecos_name; } gecos_name++; } *r = 0; return result; }
int create_fullname(unsigned long a0, char *a1) { char *v0; int tmp_8; int tmp_10; unsigned long long v1; unsigned long v2; char *v3; char *v4; unsigned long v5; unsigned long v6; char *v7; unsigned long v9; unsigned long v10; char *v11; unsigned short v13; unsigned int v14; char *v16; char *v17; v0 = a0; v1 = strlen(v0) + 1; v5 = count_ampersands(v0); if (v5) { v6 = strlen(a1); v9 = 0; if ([D] amd64g_calculate_condition(0x0<64>, 0x30<64>, Sub(Load(addr=stack_base-56, size=8, endness=Iend_LE), 0x1<64>), Load(addr=stack_base-48, size=8, endness=Iend_LE), cc_ndep<8>)) *(&v9) = 1; v2 = (v5 - 1) * v6; if ((v9 & 1)) xalloc_die(); v10 = 0; if (__CFADD__(v1, v2)) *(&v10) = 1; v1 += v2; if ((v10 & 1)) xalloc_die(); } v7 = xmalloc(v1); v3 = v7; while (true) { switch (*(v0)) { case 0: *(v3) = 0; goto LABEL_40050e; case 38: v4 = a1; v13 = *((to_uchar(*(v4)) * 2 + *(__ctype_b_loc()))); v14 = v13 & 0x200; if (v14) { tmp_8 = v4; v4 += 1; *(&v10) = toupper(to_uchar(*(tmp_8))); v16 = v3; v3 += 1; *(v16) = *(&v10); } for (; *(v4); *(v17) = *(tmp_10)) { tmp_10 = v4; v4 += 1; v17 = v3; v3 += 1; } v0 += 1; break; default: v11 = v3; v3 += 1; *(v11) = *(v0); v0 += 1; break; } } LABEL_40050e: return v7; }
static int xvsnprintf(char *outbuf, size_t length, const char *fmt, va_list ap) { int ret; ({ suppressint++; ({ __asm__ __volatile__ ("": : :"memory"); }); 0; }); ret = vsnprintf(outbuf, length, fmt, ap); ({ ({ __asm__ __volatile__ ("": : :"memory"); }); if (--suppressint == 0 && intpending) onint(); 0; }); return ret; }
int xvsnprintf(char *a0, unsigned int a1, char *a2, unsigned long a3) { unsigned int v0; suppressint = suppressint + 1; v0 = vsnprintf(a0, a1, a2, a3); suppressint = suppressint - 1; if (!suppressint && intpending) onint(); return v0; }
static wchar_t cval (s, i, l) char *s; int i, l; { size_t tmp; wchar_t wc; mbstate_t mps; if ( (__ctype_get_mb_cur_max ()) == 1 || is_basic (s[i])) return ((wchar_t)s[i]); if (i >= (l - 1)) return ((wchar_t)s[i]); memset (&mps, 0, sizeof (mbstate_t)); tmp = mbrtowc (&wc, s + i, l - i, &mps); if (((tmp) == (size_t)-1 || (tmp) == (size_t)-2) || ((tmp) == 0)) return ((wchar_t)s[i]); return wc; }
int cval(unsigned long a0, unsigned long a1, unsigned long a2) { char v0; unsigned long v1; char v2; unsigned int v4; if (__ctype_get_mb_cur_max() != 1 && !is_basic(*((a0 + a1)))) { if (a1 >= a2 - 1) { v4 = *((a0 + a1)); return v4; } memset(&v2, 0x0, 0x8); v1 = mbrtowc(&v0, a1 + a0, a2 - a1, &v2); switch (v1) { case 0: case 18446744073709551614: v4 = *((a0 + a1)); return v4; default: v4 = *(&v0); return v4; } } v4 = *((a0 + a1)); return v4; }
void ga_free(void) { int i; if (ngroups > 0) { for (i = 0; i < ngroups; i++) free(groups_byname[i]); ngroups = 0; free(groups_byname); groups_byname = ((void *)0) ; } }
void ga_free() { unsigned int v0; unsigned long long v2; unsigned long long v3; v2 = ngroups; if (ngroups > 0) { for (v0 = 0; v0 < ngroups; v0 = __addvsi3(v0, 0x1)) { free(*((groups_byname + 8 * v0))); } ngroups = 0; v3 = free(groups_byname); groups_byname = 0; } return; }
static size_t dev_ino_hash (void const *x, size_t table_size) { struct dev_ino const *p = x; return (uintmax_t) p->st_ino % table_size; }
long long dev_ino_hash(unsigned long long *a0, unsigned long a1) { return (0 CONCAT *(a0)) /m a1 >> 64; }
static rsRetVal setDynaFileCacheSize(void __attribute__((unused)) *pVal, int iNewVal) { rsRetVal iRet = RS_RET_OK; if(iNewVal < 1) { (*__errno_location ()) = 0; parser_errmsg( "DynaFileCacheSize must be greater 0 (%d given), changed to 1.", iNewVal); iRet = RS_RET_VAL_OUT_OF_RANGE; iNewVal = 1; } else if(iNewVal > 25000) { (*__errno_location ()) = 0; parser_warnmsg("DynaFileCacheSize is larger than 25,000 (%d given) - this looks very " "large. Is it intended?", iNewVal); } cs.iDynaFileCacheSize = iNewVal; if(Debug) { r_dbgprintf("omfile.c", "DynaFileCacheSize changed to %d.\n", iNewVal); }; return iRet; }
long long setDynaFileCacheSize(unsigned long a0, unsigned long a1) { unsigned int v0; unsigned long v1; unsigned int v2; v1 = a0; v0 = a1; v2 = 0; if (v0 <= 0) { *(__errno_location()) = 0; parser_errmsg("DynaFileCacheSize must be greater 0 (%d given), changed to 1."); v2 = -2012; v0 = 1; } else if (v0 > 25000) { *(__errno_location()) = 0; parser_warnmsg("DynaFileCacheSize is larger than 25,000 (%d given) - this looks very large. Is it intended?", v0); } cs = v0; if (Debug) r_dbgprintf("omfile.c", "DynaFileCacheSize changed to %d.\n"); return v2; }
static int ipstats_stat_show_attrs_alloc_tb(struct ipstats_stat_show_attrs *attrs, unsigned int group) { unsigned int ifla_max; int err; ((void) sizeof (( group < (sizeof(ipstats_stat_ifla_max) / sizeof((ipstats_stat_ifla_max)[0])) ) ? 1 : 0), __extension__ ({ if ( group < (sizeof(ipstats_stat_ifla_max) / sizeof((ipstats_stat_ifla_max)[0])) ) ; else __assert_fail ( "group < ARRAY_SIZE(ipstats_stat_ifla_max)" , "ipstats.c", 82, __extension__ __PRETTY_FUNCTION__); })) ; ((void) sizeof (( group < (sizeof(attrs->tbs) / sizeof((attrs->tbs)[0])) ) ? 1 : 0), __extension__ ({ if ( group < (sizeof(attrs->tbs) / sizeof((attrs->tbs)[0])) ) ; else __assert_fail ( "group < ARRAY_SIZE(attrs->tbs)" , "ipstats.c", 83, __extension__ __PRETTY_FUNCTION__); })) ; ifla_max = ipstats_stat_ifla_max[group]; ((void) sizeof (( ifla_max != 0 ) ? 1 : 0), __extension__ ({ if ( ifla_max != 0 ) ; else __assert_fail ( "ifla_max != 0" , "ipstats.c", 85, __extension__ __PRETTY_FUNCTION__); })) ; if (attrs->tbs[group]) return 0; attrs->tbs[group] = calloc(ifla_max + 1, sizeof(*attrs->tbs[group])); if (attrs->tbs[group] == ((void *)0) ) return - 12 ; if (group == 0) err = parse_rtattr(attrs->tbs[group], ifla_max, ((struct rtattr *)(((char *)(attrs->ifsm)) + ( ((sizeof(struct if_stats_msg))+4U -1) & ~(4U -1) ))), attrs->len); else err = (parse_rtattr_flags((attrs->tbs[group]), (ifla_max), ((void*)(((char*)(attrs->tbs[0][group])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((attrs->tbs[0][group])->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), (1 << 15))) ; if (err != 0) { free(attrs->tbs[group]); attrs->tbs[group] = ((void *)0) ; } return err; }
long ipstats_stat_show_attrs_alloc_tb(long a1, unsigned int a2) { unsigned int v3; unsigned int v4; if ( a2 > 5 ) _assert_fail("group < ARRAY_SIZE(ipstats_stat_ifla_max)", "ipstats.c", 0x52u, "ipstats_stat_show_attrs_alloc_tb"); v4 = ipstats_stat_ifla_max[a2]; if ( !v4 ) _assert_fail("ifla_max != 0", "ipstats.c", 0x55u, "ipstats_stat_show_attrs_alloc_tb"); if ( *(_QWORD *)(a1 + 8 * (a2 + 2LL)) ) return 0LL; *(_QWORD *)(a1 + 8 * (a2 + 2LL)) = calloc(v4 + 1, 8uLL); if ( !*(_QWORD *)(a1 + 8 * (a2 + 2LL)) ) return 4294967284LL; if ( a2 ) v3 = parse_rtattr_flags( *(_QWORD *)(a1 + 8 * (a2 + 2LL)), v4, *(_QWORD *)(8LL * a2 + *(_QWORD *)(a1 + 16)) + 4LL, (unsigned int)**(unsigned short **)(8LL * a2 + *(_QWORD *)(a1 + 16)) - 4, 0x8000LL); else v3 = parse_rtattr(*(_QWORD *)(a1 + 16), v4, *(_QWORD *)a1 + 12LL, *(unsigned int *)(a1 + 8)); if ( v3 ) { free(*(void **)(a1 + 8 * (a2 + 2LL))); *(_QWORD *)(a1 + 8 * (a2 + 2LL)) = 0LL; } return v3; }
static void xheader_list_append (struct keyword_list **root, char const *kw, char const *value) { struct keyword_list *kp = xmalloc (sizeof *kp); kp->pattern = xstrdup (kw); kp->value = value ? xstrdup (value) : ((void *)0) ; kp->next = *root; *root = kp; }
void xheader_list_append(undefined8 *param_1,undefined8 param_2,long param_3) { undefined8 *puVar1; undefined8 uVar2; puVar1 = (undefined8 *)xmalloc(0x18); uVar2 = xstrdup(param_2); puVar1[1] = uVar2; if (param_3 == 0) { uVar2 = 0; } else { uVar2 = xstrdup(param_3); } puVar1[2] = uVar2; *puVar1 = *param_1; *param_1 = puVar1; return; }
static int vi_delete_dispatch (_rl_vimotion_cxt *m) { if (((strchr (" l|h^0bBFT`", m->motion) == 0) && (rl_point >= m->start)) && (rl_mark < rl_end)) do { if ( (__ctype_get_mb_cur_max ()) == 1 || rl_byte_oriented) rl_mark++; else rl_mark = _rl_find_next_mbchar (rl_line_buffer, rl_mark, 1, 0x00); } while (0); rl_kill_text (rl_point, rl_mark); return (0); }
long vi_delete_dispatch(long a1) { if ( !strchr(" l|h^0bBFT`", *(_DWORD *)(a1 + 32)) && *(_DWORD *)(a1 + 20) <= rl_point && rl_mark < rl_end ) { if ( _ctype_get_mb_cur_max() == 1 || rl_byte_oriented ) ++rl_mark; else rl_mark = rl_find_next_mbchar(rl_line_buffer, rl_mark, 1LL, 0LL); } rl_kill_text(rl_point, rl_mark); return 0LL; }
static int channel_decode_socks5(Channel *c, struct sshbuf *input, struct sshbuf *output) { struct { u_int8_t version; u_int8_t command; u_int8_t reserved; u_int8_t atyp; } s5_req, s5_rsp; u_int16_t dest_port; char dest_addr[255+1], ntop[ 46 ]; const u_char *p; u_int have, need, i, found, nmethods, addrlen, af; int r; sshlog("channels.c", __func__, 1407, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "channel %d: decode socks5", c->self); p = sshbuf_ptr(input); if (p[0] != 0x05) return -1; have = sshbuf_len(input); if (!(c->flags & 0x1000)) { if (have < 2) return 0; nmethods = p[1]; if (have < nmethods + 2) return 0; for (found = 0, i = 2; i < nmethods + 2; i++) { if (p[i] == 0x00) { found = 1; break; } } if (!found) { sshlog("channels.c", __func__, 1427, 0, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "channel %d: method SSH_SOCKS5_NOAUTH not found", c->self) ; return -1; } if ((r = sshbuf_consume(input, nmethods + 2)) != 0) sshfatal("channels.c", __func__, 1432, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %d: consume", c->self); if ((r = sshbuf_put_u8(output, 0x05)) != 0 || (r = sshbuf_put_u8(output, 0x00)) != 0) sshfatal("channels.c", __func__, 1436, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %d: append reply", c->self); c->flags |= 0x1000; sshlog("channels.c", __func__, 1438, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "channel %d: socks5 auth done", c->self); return 0; } sshlog("channels.c", __func__, 1441, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "channel %d: socks5 post auth", c->self); if (have < sizeof(s5_req)+1) return 0; memcpy(&s5_req, p, sizeof(s5_req)); if (s5_req.version != 0x05 || s5_req.command != 0x01 || s5_req.reserved != 0x00) { sshlog("channels.c", __func__, 1448, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "channel %d: only socks5 connect supported", c->self); return -1; } switch (s5_req.atyp){ case 0x01: addrlen = 4; af = 2 ; break; case 0x03: addrlen = p[sizeof(s5_req)]; af = -1; break; case 0x04: addrlen = 16; af = 10 ; break; default: sshlog("channels.c", __func__, 1465, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "channel %d: bad socks5 atyp %d", c->self, s5_req.atyp); return -1; } need = sizeof(s5_req) + addrlen + 2; if (s5_req.atyp == 0x03) need++; if (have < need) return 0; if ((r = sshbuf_consume(input, sizeof(s5_req))) != 0) sshfatal("channels.c", __func__, 1474, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %d: consume", c->self); if (s5_req.atyp == 0x03) { if ((r = sshbuf_consume(input, 1)) != 0) sshfatal("channels.c", __func__, 1478, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %d: consume", c->self); } if ((r = sshbuf_get(input, &dest_addr, addrlen)) != 0 || (r = sshbuf_get(input, &dest_port, 2)) != 0) { sshlog("channels.c", __func__, 1482, 0, SYSLOG_LEVEL_DEBUG1, ssh_err(r), "channel %d: parse addr/port", c->self); return -1; } dest_addr[addrlen] = '\0'; free(c->path); c->path = ((void *)0) ; if (s5_req.atyp == 0x03) { if (addrlen >= 1025 ) { sshlog("channels.c", __func__, 1490, 0, SYSLOG_LEVEL_ERROR, ((void *)0) , "channel %d: dynamic request: socks5 hostname " "\"%.100s\" too long", c->self, dest_addr) ; return -1; } c->path = xstrdup(dest_addr); } else { if (inet_ntop(af, dest_addr, ntop, sizeof(ntop)) == ((void *)0) ) return -1; c->path = xstrdup(ntop); } c->host_port = ntohs(dest_port); sshlog("channels.c", __func__, 1502, 0, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "channel %d: dynamic request: socks5 host %s port %u command %u", c->self, c->path, c->host_port, s5_req.command) ; s5_rsp.version = 0x05; s5_rsp.command = 0x00; s5_rsp.reserved = 0; s5_rsp.atyp = 0x01; dest_port = 0; if ((r = sshbuf_put(output, &s5_rsp, sizeof(s5_rsp))) != 0 || (r = sshbuf_put_u32(output, ntohl( ((in_addr_t) 0x00000000) ))) != 0 || (r = sshbuf_put(output, &dest_port, sizeof(dest_port))) != 0) sshfatal("channels.c", __func__, 1514, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %d: append reply", c->self); return 1; }
int channel_decode_socks5(struct_0 *a0, unsigned long long a1, unsigned long long a2) { unsigned long v0; int tmp_28; unsigned long v1; char v2; unsigned int v3; unsigned int v4; unsigned int v5; unsigned int v6; unsigned int v7; unsigned int v8; unsigned int v9; unsigned int v10; char v11; char v12; char v13; char v14; char v15; char v16; char v17; char v18; char v19[5]; char v20; char v21; unsigned long long v22; unsigned long v23; unsigned long v24; unsigned long v25; unsigned long long v26; unsigned long v27; char v28; unsigned int v30; v1 = a0->field_4; sshlog("channels.c", "channel_decode_socks5", 0x57f, 0x0, 0x6, 0x0, "channel %d: decode socks5"); *(&v19) = sshbuf_ptr(a1); if (v19[0] != 5) { v30 = -1; } else { v9 = sshbuf_len(a1); if ((a0->field_18 & 0x1000)) { v1 = a0->field_4; sshlog("channels.c", "channel_decode_socks5", 0x5a1, 0x0, 0x6, 0x0, "channel %d: socks5 post auth"); if (v9 <= 4) { v30 = 0; } else { memcpy(&v11, v19, 0x4); if (v11 != 5) { LABEL_403f51: v1 = a0->field_4; sshlog("channels.c", "channel_decode_socks5", 0x5a8, 0x0, 0x6, 0x0, "channel %d: only socks5 connect supported"); v30 = -1; } else { if (!(v12 == 1)) goto LABEL_403f51; if (!(!v13)) goto LABEL_403f51; v30 = v14; if (v14 != 4) { if (v30 <= 4) { if (v30 == 1) { v6 = 4; v7 = 2; goto LABEL_404070; } if (v30 == 3) { v6 = v19[4]; v7 = -1; goto LABEL_404070; } } v0 = a0->field_4; sshlog("channels.c", "channel_decode_socks5", 0x5b9, 0x0, 0x6, 0x0, "channel %d: bad socks5 atyp %d"); v30 = -1; } else { v6 = 16; v7 = 10; LABEL_404070: v3 = v6 + 6; if (v14 == 3) v3 += 1; if (v9 < v3) { v30 = 0; } else { v8 = sshbuf_consume(a1, 0x4, 0x4); if (v8) { v1 = a0->field_4; sshfatal("channels.c", "channel_decode_socks5", 0x5c2, 0x1, 0x1, ssh_err(v8)); } if (v14 == 3) { v8 = sshbuf_consume(a1, 0x1, a2); if (v8) { v27 = a0->field_4; v26 = "channel %d: consume"; sshfatal("channels.c", "channel_decode_socks5", 0x5c6, 0x1, 0x1, ssh_err(v8)); } } v8 = sshbuf_get(a1, &v21, v6, &v21); if (v8) { LABEL_4041eb: v27 = a0->field_4; v26 = "channel %d: parse addr/port"; sshlog("channels.c", "channel_decode_socks5", 0x5ca, 0x0, 0x5, ssh_err(v8), *(&v28)); v30 = -1; } else { v8 = sshbuf_get(a1, &v2, 0x2, &v2); if (!(!v8)) goto LABEL_4041eb; (&v21)[v6] = 0; free(a0->field_80); a0->field_80 = 0; if (v14 == 3) { if (v6 > 0x400) { v26 = &v21; v25 = a0->field_4; v24 = "channel %d: dynamic request: socks5 hostname \"%.100s\" too long"; sshlog("channels.c", "channel_decode_socks5", 0x5d2, 0x0, 0x2, 0x0, *(&v28)); v30 = -1; goto LABEL_4044e8; } else { a0->field_80 = xstrdup(&v21); } } else { if (!inet_ntop(v7, &v21, &v20, 0x2e)) { v30 = -1; goto LABEL_4044e8; } else { a0->field_80 = xstrdup(&v20); } } a0->field_98 = ntohs(*(&v2)); v26 = v12; v25 = a0->field_98; v24 = a0->field_80; v23 = a0->field_4; v22 = "channel %d: dynamic request: socks5 host %s port %u command %u"; sshlog("channels.c", "channel_decode_socks5", 0x5de, 0x0, 0x6, 0x0, *(&v28)); v15 = 5; v16 = 0; v17 = 0; v18 = 1; v2 = 0; v8 = sshbuf_put(a2, &v15, 0x4, &v15); if (!v8) { v30 = ntohl(0x0); v8 = sshbuf_put_u32(a2, v30, v30); if (!v8) { v8 = sshbuf_put(a2, &v2, 0x2, &v2); if (!v8) goto LABEL_4044e3; } } v27 = a0->field_4; v26 = "channel %d: append reply"; sshfatal("channels.c", "channel_decode_socks5", 0x5ea, 0x1, 0x1, ssh_err(v8)); LABEL_4044e3: v30 = 1; } } } } } } else if (v9 <= 1) { v30 = 0; } else { v10 = v19[1]; if (v9 < v10 + 2) { v30 = 0; } else { v5 = 0; v4 = 2; while (true) { if (v4 >= v10 + 2) break; if (v19[v4]) { v4 += 1; } else { v5 = 1; break; } } if (!v5) { v1 = a0->field_4; sshlog("channels.c", "channel_decode_socks5", 0x593, 0x0, 0x5, 0x0, "channel %d: method SSH_SOCKS5_NOAUTH not found"); v30 = -1; } else { v8 = sshbuf_consume(a1, v10 + 2, v10 + 2); if (v8) { v1 = a0->field_4; sshfatal("channels.c", "channel_decode_socks5", 0x598, 0x1, 0x1, ssh_err(v8)); } v8 = sshbuf_put_u8(a2, 0x5); if (!v8) { v8 = sshbuf_put_u8(a2, 0x0); if (!v8) goto LABEL_403e52; } v27 = a0->field_4; v26 = "channel %d: append reply"; sshfatal("channels.c", "channel_decode_socks5", 0x59c, 0x1, 0x1, ssh_err(v8)); LABEL_403e52: v30 = a0->field_18; *(&v30) = (a0->field_18 >> 8) | 16; tmp_28 = v30; a0->field_18 = tmp_28; v27 = a0->field_4; v26 = "channel %d: socks5 auth done"; sshlog("channels.c", "channel_decode_socks5", 0x59e, 0x0, 0x6, 0x0, *(&v28)); v30 = 0; } } } } LABEL_4044e8: return v30; }
void builtin_warning (const char *format, ...) { va_list args; builtin_error_prolog (); fprintf ( stderr , gettext("warning: ")); __builtin_va_start( args , format ) ; vfprintf ( stderr , format, args); __builtin_va_end( args ) ; fprintf ( stderr , "\n"); }
unsigned long builtin_warning(const char *a1, long a2, long a3, long a4, long a5, long a6, ...) { char *v6; gcc_va_list arg; unsigned long v9; long v10; long v11; long v12; long v13; long v14; va_start(arg, a6); v10 = a2; v11 = a3; v12 = a4; v13 = a5; v14 = a6; v9 = __readfsqword(0x28u); builtin_error_prolog(); v6 = gettext("warning: "); fprintf(stderr, v6); arg[0].gp_offset = 8; vfprintf(stderr, a1, arg); fprintf(stderr, "\n"); return __readfsqword(0x28u) ^ v9; }
static void cmd_parser(int argc, char **argv) { char *rest = ((void *)0) ; static char lh[] = "localhost"; int optct = process_options(argc,argv); argc -= optct; argv += optct; if (rest == ((void *)0) && argc > 0) rest = argv[0]; if (gnutls_cli_debug_options.present.port) port = gnutls_cli_debug_options.value.port; else { if (gnutls_cli_debug_options.present.starttls_proto) port = starttls_proto_to_port(gnutls_cli_debug_options.arg.starttls_proto); else port = 443; } if (rest == ((void *)0) ) hostname = lh; else hostname = rest; if (gnutls_cli_debug_options.present.debug) debug = gnutls_cli_debug_options.value.debug; if (gnutls_cli_debug_options.present.verbose) verbose++; }
void cmd_parser(int param_1,long param_2) { int iVar1; char *local_10; local_10 = (char *)0x0; iVar1 = process_options(param_1,param_2); if (0 < param_1 - iVar1) { local_10 = *(char **)(param_2 + (long)iVar1 * 8); } if (DAT_00102272 == '\0') { if (DAT_00102273 == '\0') { port = 0x1bb; } else { port = starttls_proto_to_port(_printf); } } else { port = DAT_0010229c; } if (local_10 == (char *)0x0) { hostname = lh_11959; } else { hostname = local_10; } if (gnutls_cli_debug_options != '\0') { debug = _strcmp; } if (DAT_00102271 != '\0') { verbose = verbose + 1; } return; }
static void set_filter(const struct cmdinfo *cip, const char *value) { filter_add(value, cip->arg_int); }
void set_filter(long param_1,undefined8 param_2) { filter_add(param_2,*(int *)(param_1 + 0x28) != 0); return; }
static void ip_long(uhash_ctx_t ahc, u_char *res) { int i; UINT64 t; for (i = 0; i < (16 / 4); i++) { if (ahc->poly_accum[i] >= ((UINT64)0xFFFFFFFFFFFFFFC5ull)) ahc->poly_accum[i] -= ((UINT64)0xFFFFFFFFFFFFFFC5ull); t = ip_aux(0,ahc->ip_keys+(i*4), ahc->poly_accum[i]); put_u32((UINT32 *)res+i, ip_reduce_p36(t) ^ ahc->ip_trans[i]) ; } }
void ip_long(unsigned long a0, unsigned long a1) { unsigned int v0; unsigned int v1; for (v0 = 0; v0 <= 3; v0 = __addvsi3(v0, 0x1)) { if (*((a0 + (v0 + 150 << 3) + 8)) > -60) *((a0 + (v0 + 150) * 8 + 8)) = *((a0 + (v0 + 150) * 8 + 8)) + 59; *(&v1) = ip_aux(0x0, a0 + 1240 + v0 * 32, *((a0 + (v0 + 150) * 8 + 8))); put_u32(a1 + v0 * 4, *((a0 + (v0 + 340) * 4 + 8)) ^ ip_reduce_p36(*(&v1)), *((a0 + (v0 + 340) * 4 + 8)) ^ ip_reduce_p36(*(&v1))); } return; }
static void sighandler (int sig) { if (! 1 ) signal (sig, ((__sighandler_t) 1) ); if (! interrupt_signal) interrupt_signal = sig; }
long long sighandler(unsigned long a0) { unsigned long long v1; v1 = interrupt_signal; if (!interrupt_signal) { v1 = a0; interrupt_signal = a0; } return v1; }
static void kbdint_reset_device(KbdintAuthctxt *kbdintctxt) { if (kbdintctxt->ctxt) { kbdintctxt->device->free_ctx(kbdintctxt->ctxt); kbdintctxt->ctxt = ((void *)0) ; } kbdintctxt->device = ((void *)0) ; }
void kbdint_reset_device(long param_1) { if (*(long *)(param_1 + 8) != 0) { (**(code **)(*(long *)(param_1 + 0x10) + 0x20))(*(undefined8 *)(param_1 + 8)); *(undefined8 *)(param_1 + 8) = 0; } *(undefined8 *)(param_1 + 0x10) = 0; return; }
static _Bool from_match (const char *tok, const char *string) { size_t tok_len; if (tok[0] == '@') { return (netgroup_match (tok + 1, string, (char *) 0)); } else if (string_match (tok, string)) { return 1 ; } else if (tok[0] == '.') { size_t str_len; str_len = strlen (string); tok_len = strlen (tok); if ( (str_len > tok_len) && (strcasecmp (tok, string + str_len - tok_len) == 0)) { return 1 ; } } else if (strcasecmp (tok, "LOCAL") == 0) { if (strchr (string, '.') == ((void *)0) ) { return 1 ; } } else if ( (tok[(tok_len = strlen (tok)) - 1] == '.') && (strncmp (tok, resolve_hostname (string), tok_len) == 0)) { return 1 ; } return 0 ; }
int from_match(char *a0, char *a1) { unsigned int v0; unsigned long v1; unsigned int v3; if (*(a0) == 64) { v3 = netgroup_match(a0 + 1, a1, 0x0); } else if (string_match(a0, a1)) { v3 = 1; } else { if (*(a0) == 46) { v1 = strlen(a1); v0 = strlen(a0); if (v1 > v0 && !strcasecmp(a0, &a1[v1 + -1 * v0])) { v3 = 1; goto LABEL_400ab3; } } else if (strcasecmp(a0, "LOCAL")) { *(&v0) = strlen(a0); if (a0[1 + *(&v0)] == 46 && !strncmp(a0, resolve_hostname(a1), *(&v0))) { v3 = 1; goto LABEL_400ab3; } } else if (!strchr(a1, 0x2e)) { v3 = 1; goto LABEL_400ab3; } v3 = 0; } LABEL_400ab3: return v3; }
char * do_realpath(struct sftp_conn *conn, const char *path) { return do_realpath_expand(conn, path, 0); }
const char * do_realpath(unsigned int *a1, const char *a2) { return do_realpath_expand(a1, a2, 0); }
static void port_open_helper(struct ssh *ssh, Channel *c, char *rtype) { char *local_ipaddr = get_local_ipaddr(c->sock); int local_port = c->sock == -1 ? 65536 : get_local_port(c->sock); char *remote_ipaddr = get_peer_ipaddr(c->sock); int remote_port = get_peer_port(c->sock); int r; if (remote_port == -1) { free(remote_ipaddr); remote_ipaddr = xstrdup("127.0.0.1"); remote_port = 65535; } free(c->remote_name); xasprintf(&c->remote_name, "%s: listening port %d for %.100s port %d, " "connect from %.200s port %d to %.100s port %d", rtype, c->listening_port, c->path, c->host_port, remote_ipaddr, remote_port, local_ipaddr, local_port); open_preamble(ssh, __func__, c, rtype); if (strcmp(rtype, "direct-tcpip") == 0) { if ((r = sshpkt_put_cstring(ssh, c->path)) != 0 || (r = sshpkt_put_u32(ssh, c->host_port)) != 0) sshfatal("channels.c", __func__, 1737, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %i: reply", c->self); } else if (strcmp(rtype, "direct-streamlocal@openssh.com") == 0) { if ((r = sshpkt_put_cstring(ssh, c->path)) != 0) sshfatal("channels.c", __func__, 1741, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %i: reply", c->self); } else if (strcmp(rtype, "forwarded-streamlocal@openssh.com") == 0) { if ((r = sshpkt_put_cstring(ssh, c->path)) != 0) sshfatal("channels.c", __func__, 1745, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %i: reply", c->self); } else { if ((r = sshpkt_put_cstring(ssh, c->path)) != 0 || (r = sshpkt_put_u32(ssh, local_port)) != 0) sshfatal("channels.c", __func__, 1750, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %i: reply", c->self); } if (strcmp(rtype, "forwarded-streamlocal@openssh.com") == 0) { if ((r = sshpkt_put_cstring(ssh, "")) != 0) sshfatal("channels.c", __func__, 1755, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %i: reply", c->self); } else { if ((r = sshpkt_put_cstring(ssh, remote_ipaddr)) != 0 || (r = sshpkt_put_u32(ssh, (u_int)remote_port)) != 0) sshfatal("channels.c", __func__, 1760, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %i: reply", c->self); } if ((r = sshpkt_send(ssh)) != 0) sshfatal("channels.c", __func__, 1763, 1, SYSLOG_LEVEL_FATAL, ssh_err(r), "channel %i: send", c->self); free(remote_ipaddr); free(local_ipaddr); }
void port_open_helper(long a1, long a2, const char *a3) { int local_port; long v4; long v5; long v6; long v7; long v8; long v9; long v10; long v11; long v12; long v13; long v14; long v15; long v16; long v17; unsigned int peer_port; unsigned int v20; unsigned int v21; unsigned int v22; unsigned int v23; unsigned int v24; unsigned int v25; unsigned int v26; unsigned int v27; void *ptr; char *local_ipaddr; local_ipaddr = (char *)get_local_ipaddr(*(unsigned int *)(a2 + 40)); if ( *(_DWORD *)(a2 + 40) == -1 ) local_port = 0x10000; else local_port = get_local_port(*(unsigned int *)(a2 + 40)); v27 = local_port; ptr = (void *)get_peer_ipaddr(*(unsigned int *)(a2 + 40)); peer_port = get_peer_port(*(unsigned int *)(a2 + 40)); if ( peer_port == -1 ) { free(ptr); ptr = (void *)xstrdup("127.0.0.1"); peer_port = 0xFFFF; } free(*(void **)(a2 + 160)); xasprintf( a2 + 160, "%s: listening port %d for %.100s port %d, connect from %.200s port %d to %.100s port %d", a3, *(unsigned int *)(a2 + 136), *(const char **)(a2 + 128), *(unsigned int *)(a2 + 152), (const char *)ptr, peer_port, local_ipaddr, v27); open_preamble(a1, "port_open_helper", (unsigned int *)a2, (long)a3); if ( !strcmp(a3, "direct-tcpip") ) { v20 = sshpkt_put_cstring(a1, *(_QWORD *)(a2 + 128)); if ( !v20 ) { v20 = sshpkt_put_u32(a1, *(unsigned int *)(a2 + 152)); if ( !v20 ) goto LABEL_19; } v4 = *(unsigned int *)(a2 + 4); v5 = ssh_err(v20); sshfatal("channels.c", "port_open_helper", 1737LL, 1LL, 1LL, v5, "channel %i: reply", v4); } if ( !strcmp(a3, "direct-streamlocal@openssh.com") ) { v21 = sshpkt_put_cstring(a1, *(_QWORD *)(a2 + 128)); if ( !v21 ) goto LABEL_19; v6 = *(unsigned int *)(a2 + 4); v7 = ssh_err(v21); sshfatal("channels.c", "port_open_helper", 1741LL, 1LL, 1LL, v7, "channel %i: reply", v6); } if ( !strcmp(a3, "forwarded-streamlocal@openssh.com") ) { v22 = sshpkt_put_cstring(a1, *(_QWORD *)(a2 + 128)); if ( !v22 ) goto LABEL_19; v8 = *(unsigned int *)(a2 + 4); v9 = ssh_err(v22); sshfatal("channels.c", "port_open_helper", 1745LL, 1LL, 1LL, v9, "channel %i: reply", v8); } v23 = sshpkt_put_cstring(a1, *(_QWORD *)(a2 + 128)); if ( v23 || (v23 = sshpkt_put_u32(a1, v27)) != 0 ) { v10 = *(unsigned int *)(a2 + 4); v11 = ssh_err(v23); sshfatal("channels.c", "port_open_helper", 1750LL, 1LL, 1LL, v11, "channel %i: reply", v10); } LABEL_19: if ( !strcmp(a3, "forwarded-streamlocal@openssh.com") ) { v24 = sshpkt_put_cstring(a1, &unk_11B22); if ( !v24 ) goto LABEL_25; v12 = *(unsigned int *)(a2 + 4); v13 = ssh_err(v24); sshfatal("channels.c", "port_open_helper", 1755LL, 1LL, 1LL, v13, "channel %i: reply", v12); } v25 = sshpkt_put_cstring(a1, ptr); if ( v25 || (v25 = sshpkt_put_u32(a1, peer_port)) != 0 ) { v14 = *(unsigned int *)(a2 + 4); v15 = ssh_err(v25); sshfatal("channels.c", "port_open_helper", 1760LL, 1LL, 1LL, v15, "channel %i: reply", v14); } LABEL_25: v26 = sshpkt_send(a1); if ( v26 ) { v16 = *(unsigned int *)(a2 + 4); v17 = ssh_err(v26); sshfatal("channels.c", "port_open_helper", 1763LL, 1LL, 1LL, v17, "channel %i: send", v16); } free(ptr); free(local_ipaddr); }
static char * expand_char(int nr) { STRDEF *h; h = chardef; if (!nr) return ((void *)0) ; while (h) if (h->nr == nr) { curpos += h->slen; return h->st; } else h = h->next; charb[0] = nr / 256; charb[1] = nr % 256; charb[2] = '\0'; if (charb[0] == '<') { charb[4] = charb[1]; strncpy(charb, "&lt;", 4); charb[5] = '\0'; } curpos += 2; return charb; }
undefined1 * expand_char(int param_1) { int iVar1; undefined1 *puVar2; int *local_10; local_10 = chardef; if (param_1 == 0) { puVar2 = (undefined1 *)0x0; } else { for (; local_10 != (int *)0x0; local_10 = *(int **)(local_10 + 4)) { if (param_1 == *local_10) { curpos = curpos + local_10[1]; return *(undefined1 **)(local_10 + 2); } } iVar1 = param_1; if (param_1 < 0) { iVar1 = param_1 + 0xff; } charb[0] = (char)((uint)iVar1 >> 8); charb[1] = (undefined)param_1; charb[2] = 0; if (charb[0] == '<') { charb[4] = charb[1]; strncpy(charb,"&lt;",4); charb[5] = 0; } curpos = curpos + 2; puVar2 = charb; } return puVar2; }
static void print_key(struct rtattr *key) { char keyid[64]; print_string(PRINT_ANY, "key", " key %s\n", hexstring_n2a(((void*)(((char*)(key)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((key)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), keyid, sizeof(keyid))); }
void print_key(ushort *param_1) { undefined8 uVar1; long in_FS_OFFSET; undefined local_58 [72]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = hexstring_n2a(param_1 + 2,*param_1 - 4,local_58,0x40); print_string(4,&DAT_00104470," key %s\n",uVar1); if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return; }
void print_stats64(FILE *fp, struct rtnl_link_stats64 *s, const struct rtattr *carrier_changes, const char *what) { unsigned int cols[] = { strlen("*X errors:"), strlen("packets"), strlen("errors"), strlen("dropped"), strlen("heartbt"), strlen("overrun"), strlen("compressed"), strlen("otherhost"), }; if (is_json_context()) { if (what) open_json_object(what); open_json_object("rx"); print_u64(PRINT_JSON, "bytes", ((void *)0) , s->rx_bytes); print_u64(PRINT_JSON, "packets", ((void *)0) , s->rx_packets); print_u64(PRINT_JSON, "errors", ((void *)0) , s->rx_errors); print_u64(PRINT_JSON, "dropped", ((void *)0) , s->rx_dropped); print_u64(PRINT_JSON, "over_errors", ((void *)0) , s->rx_over_errors); print_u64(PRINT_JSON, "multicast", ((void *)0) , s->multicast); if (s->rx_compressed) print_u64(PRINT_JSON, "compressed", ((void *)0) , s->rx_compressed); if (show_stats > 1) { print_u64(PRINT_JSON, "length_errors", ((void *)0) , s->rx_length_errors); print_u64(PRINT_JSON, "crc_errors", ((void *)0) , s->rx_crc_errors); print_u64(PRINT_JSON, "frame_errors", ((void *)0) , s->rx_frame_errors); print_u64(PRINT_JSON, "fifo_errors", ((void *)0) , s->rx_fifo_errors); print_u64(PRINT_JSON, "missed_errors", ((void *)0) , s->rx_missed_errors); if (s->rx_nohandler) print_u64(PRINT_JSON, "nohandler", ((void *)0) , s->rx_nohandler); if (s->rx_otherhost_dropped) print_u64(PRINT_JSON, "otherhost", ((void *)0) , s->rx_otherhost_dropped); } close_json_object(); open_json_object("tx"); print_u64(PRINT_JSON, "bytes", ((void *)0) , s->tx_bytes); print_u64(PRINT_JSON, "packets", ((void *)0) , s->tx_packets); print_u64(PRINT_JSON, "errors", ((void *)0) , s->tx_errors); print_u64(PRINT_JSON, "dropped", ((void *)0) , s->tx_dropped); print_u64(PRINT_JSON, "carrier_errors", ((void *)0) , s->tx_carrier_errors); print_u64(PRINT_JSON, "collisions", ((void *)0) , s->collisions); if (s->tx_compressed) print_u64(PRINT_JSON, "compressed", ((void *)0) , s->tx_compressed); if (show_stats > 1) { print_u64(PRINT_JSON, "aborted_errors", ((void *)0) , s->tx_aborted_errors); print_u64(PRINT_JSON, "fifo_errors", ((void *)0) , s->tx_fifo_errors); print_u64(PRINT_JSON, "window_errors", ((void *)0) , s->tx_window_errors); print_u64(PRINT_JSON, "heartbeat_errors", ((void *)0) , s->tx_heartbeat_errors); if (carrier_changes) print_u64(PRINT_JSON, "carrier_changes", ((void *)0) , rta_getattr_u32(carrier_changes)); } close_json_object(); if (what) close_json_object(); } else { uint64_t zero64 = 0; size_columns(cols, (sizeof(cols) / sizeof((cols)[0])), s->rx_bytes, s->rx_packets, s->rx_errors, s->rx_dropped, s->rx_missed_errors, s->multicast, s->rx_compressed, zero64); if (show_stats > 1) size_columns(cols, (sizeof(cols) / sizeof((cols)[0])), 0, s->rx_length_errors, s->rx_crc_errors, s->rx_frame_errors, s->rx_fifo_errors, s->rx_over_errors, s->rx_nohandler, s->rx_otherhost_dropped); size_columns(cols, (sizeof(cols) / sizeof((cols)[0])), s->tx_bytes, s->tx_packets, s->tx_errors, s->tx_dropped, s->tx_carrier_errors, s->collisions, s->tx_compressed, zero64); if (show_stats > 1) { uint64_t cc = carrier_changes ? rta_getattr_u32(carrier_changes) : 0; size_columns(cols, (sizeof(cols) / sizeof((cols)[0])), 0, 0, s->tx_aborted_errors, s->tx_fifo_errors, s->tx_window_errors, s->tx_heartbeat_errors, cc, zero64); } fprintf(fp, " RX: %*s %*s %*s %*s %*s %*s %*s%s", cols[0] - 4, "bytes", cols[1], "packets", cols[2], "errors", cols[3], "dropped", cols[4], "missed", cols[5], "mcast", cols[6], s->rx_compressed ? "compressed" : "", _SL_); fprintf(fp, " "); print_num(fp, cols[0], s->rx_bytes); print_num(fp, cols[1], s->rx_packets); print_num(fp, cols[2], s->rx_errors); print_num(fp, cols[3], s->rx_dropped); print_num(fp, cols[4], s->rx_missed_errors); print_num(fp, cols[5], s->multicast); if (s->rx_compressed) print_num(fp, cols[6], s->rx_compressed); if (show_stats > 1) { fprintf(fp, "%s", _SL_); fprintf(fp, " RX errors:%*s %*s %*s %*s %*s %*s%*s%*s%s", cols[0] - 10, "", cols[1], "length", cols[2], "crc", cols[3], "frame", cols[4], "fifo", cols[5], "overrun", s->rx_nohandler ? cols[6] + 1 : 0, s->rx_nohandler ? " nohandler" : "", s->rx_otherhost_dropped ? cols[7] + 1 : 0, s->rx_otherhost_dropped ? " otherhost" : "", _SL_); fprintf(fp, "%*s", cols[0] + 5, ""); print_num(fp, cols[1], s->rx_length_errors); print_num(fp, cols[2], s->rx_crc_errors); print_num(fp, cols[3], s->rx_frame_errors); print_num(fp, cols[4], s->rx_fifo_errors); print_num(fp, cols[5], s->rx_over_errors); if (s->rx_nohandler) print_num(fp, cols[6], s->rx_nohandler); if (s->rx_otherhost_dropped) print_num(fp, cols[7], s->rx_otherhost_dropped); } fprintf(fp, "%s", _SL_); fprintf(fp, " TX: %*s %*s %*s %*s %*s %*s %*s%s", cols[0] - 4, "bytes", cols[1], "packets", cols[2], "errors", cols[3], "dropped", cols[4], "carrier", cols[5], "collsns", cols[6], s->tx_compressed ? "compressed" : "", _SL_); fprintf(fp, " "); print_num(fp, cols[0], s->tx_bytes); print_num(fp, cols[1], s->tx_packets); print_num(fp, cols[2], s->tx_errors); print_num(fp, cols[3], s->tx_dropped); print_num(fp, cols[4], s->tx_carrier_errors); print_num(fp, cols[5], s->collisions); if (s->tx_compressed) print_num(fp, cols[6], s->tx_compressed); if (show_stats > 1) { fprintf(fp, "%s", _SL_); fprintf(fp, " TX errors:%*s %*s %*s %*s %*s %*s%s", cols[0] - 10, "", cols[1], "aborted", cols[2], "fifo", cols[3], "window", cols[4], "heartbt", cols[5], carrier_changes ? "transns" : "", _SL_); fprintf(fp, "%*s", cols[0] + 5, ""); print_num(fp, cols[1], s->tx_aborted_errors); print_num(fp, cols[2], s->tx_fifo_errors); print_num(fp, cols[3], s->tx_window_errors); print_num(fp, cols[4], s->tx_heartbeat_errors); if (carrier_changes) print_num(fp, cols[5], rta_getattr_u32(carrier_changes)); } } }
void print_stats64(void* a0, unsigned long long a1[25], unsigned long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5) { unsigned long v0; unsigned long long v1; unsigned long v2; unsigned long long v3; unsigned long v4; unsigned long long v5; unsigned long v6; unsigned long long v7; unsigned long v8; unsigned long long v9; unsigned long v10; unsigned long v11; unsigned long v12; void* v13; unsigned long long v14; void* v15; void* v16; unsigned int v17; unsigned int v18; unsigned int v19; unsigned int v20; unsigned int v21; unsigned int v22; unsigned int v23; unsigned int v24; char v25; void* v27; unsigned long long v28; unsigned long long v29; void* v30; unsigned long long v31; void* v32; unsigned long long v33; unsigned long long v34; unsigned long long *v35; unsigned long long v36; v14 = a2; v17 = strlen("*X errors:"); v18 = strlen("packets"); v19 = strlen("errors"); v20 = strlen("dropped"); v21 = strlen("heartbt"); v22 = strlen("overrun"); v23 = strlen("compressed"); v24 = strlen("otherhost"); if (!is_json_context()) { v15 = 0; v13 = v15; v12 = a1[21]; v11 = a1[8]; v10 = a1[15]; size_columns(&v17, 0x8, a1[2], a1[0], a1[4], a1[6]); if (*(&show_stats) > 1) { v13 = a1[24]; v12 = a1[23]; v11 = a1[11]; v10 = a1[14]; size_columns(&v17, 0x8, 0x0, a1[10], a1[12], a1[13]); } v13 = v15; v12 = a1[22]; v11 = a1[9]; v10 = a1[17]; size_columns(&v17, 0x8, a1[3], a1[1], a1[5], a1[7]); if (*(&show_stats) > 1) { if (!v14) v27 = 0; else v27 = rta_getattr_u32(v14); v16 = v27; v13 = v15; v12 = v16; v11 = a1[19]; v10 = a1[20]; size_columns(&v17, 0x8, 0x0, 0x0, a1[16], a1[18]); } if (a1[21]) v28 = "compressed"; else v28 = &g_408ca2; v12 = _SL_; v11 = v28; v10 = v23; v9 = "mcast"; v8 = v22; v7 = "missed"; v6 = v21; v5 = "dropped"; v4 = v20; v3 = "errors"; v2 = v19; fprintf(a0, " RX: %*s %*s %*s %*s %*s %*s %*s%s", v17 - 4); fprintf(a0, " "); print_num(a0, v17, a1[2]); print_num(a0, v18, a1[0]); print_num(a0, v19, a1[4]); print_num(a0, v20, a1[6]); print_num(a0, v21, a1[15]); print_num(a0, v22, a1[8]); if (a1[21]) print_num(a0, v23, a1[21]); if (*(&show_stats) > 1) { fprintf(a0, "%s", _SL_); if (a1[24]) v29 = " otherhost"; else v29 = &g_408ca2; if (!a1[24]) v30 = 0; else v30 = v24 + 1; if (a1[23]) v31 = " nohandler"; else v31 = &g_408ca2; if (!a1[23]) v32 = 0; else v32 = v23 + 1; v12 = _SL_; v11 = v29; v10 = v30; v9 = v31; v8 = v32; v7 = "overrun"; v6 = v22; v5 = "fifo"; v4 = v21; v3 = "frame"; v2 = v20; v1 = "crc"; v0 = v19; fprintf(a0, " RX errors:%*s %*s %*s %*s %*s %*s%*s%*s%s", v17 - 10); fprintf(a0, "%*s"); print_num(a0, v18, a1[10]); print_num(a0, v19, a1[12]); print_num(a0, v20, a1[13]); print_num(a0, v21, a1[14]); print_num(a0, v22, a1[11]); if (a1[23]) print_num(a0, v23, a1[23]); if (a1[24]) print_num(a0, v24, a1[24]); } fprintf(a0, "%s", _SL_); if (a1[22]) v33 = "compressed"; else v33 = &g_408ca2; v12 = _SL_; v11 = v33; v10 = v23; v9 = "collsns"; v8 = v22; v7 = "carrier"; v6 = v21; v5 = "dropped"; v4 = v20; v3 = "errors"; v2 = v19; fprintf(a0, " TX: %*s %*s %*s %*s %*s %*s %*s%s", v17 - 4); fprintf(a0, " "); print_num(a0, v17, a1[3]); print_num(a0, v18, a1[1]); print_num(a0, v19, a1[5]); print_num(a0, v20, a1[7]); print_num(a0, v21, a1[17]); print_num(a0, v22, a1[9]); if (a1[22]) print_num(a0, v23, a1[22]); if (*(&show_stats) > 1) { fprintf(a0, "%s", _SL_); if (v14) v34 = "transns"; else v34 = &g_408ca2; v12 = _SL_; v11 = v34; v10 = v22; v9 = "heartbt"; v8 = v21; v7 = "window"; v6 = v20; v5 = "fifo"; v4 = v19; fprintf(a0, " TX errors:%*s %*s %*s %*s %*s %*s%s", v17 - 10); fprintf(a0, "%*s"); print_num(a0, v18, a1[16]); print_num(a0, v19, a1[18]); print_num(a0, v20, a1[20]); print_num(a0, v21, a1[19]); if (v14) print_num(a0, v22, rta_getattr_u32(v14)); } } else { if (a3) open_json_object(a3); open_json_object("rx"); print_u64(0x2, "bytes", 0x0, a1[2]); print_u64(0x2, "packets", 0x0, a1[0]); print_u64(0x2, "errors", 0x0, a1[4]); print_u64(0x2, "dropped", 0x0, a1[6]); print_u64(0x2, "over_errors", 0x0, a1[11]); print_u64(0x2, "multicast", 0x0, a1[8]); if (a1[21]) print_u64(0x2, "compressed", 0x0, a1[21]); if (*(&show_stats) > 1) { print_u64(0x2, "length_errors", 0x0, a1[10]); print_u64(0x2, "crc_errors", 0x0, a1[12]); print_u64(0x2, "frame_errors", 0x0, a1[13]); print_u64(0x2, "fifo_errors", 0x0, a1[14]); print_u64(0x2, "missed_errors", 0x0, a1[15]); if (a1[23]) print_u64(0x2, "nohandler", 0x0, a1[23]); if (a1[24]) print_u64(0x2, "otherhost", 0x0, a1[24]); } close_json_object(0x2, a1, 0x0, a3, a4, a5); open_json_object("tx"); print_u64(0x2, "bytes", 0x0, a1[3]); print_u64(0x2, "packets", 0x0, a1[1]); print_u64(0x2, "errors", 0x0, a1[5]); print_u64(0x2, "dropped", 0x0, a1[7]); print_u64(0x2, "carrier_errors", 0x0, a1[17]); print_u64(0x2, "collisions", 0x0, a1[9]); if (a1[22]) print_u64(0x2, "compressed", 0x0, a1[22]); if (*(&show_stats) > 1) { print_u64(0x2, "aborted_errors", 0x0, a1[16]); print_u64(0x2, "fifo_errors", 0x0, a1[18]); print_u64(0x2, "window_errors", 0x0, a1[20]); print_u64(0x2, "heartbeat_errors", 0x0, a1[19]); if (v14) print_u64(0x2, "carrier_changes", 0x0, rta_getattr_u32(v14)); } close_json_object(0x2, a1, 0x0, a3, a4, a5); if (a3) close_json_object(0x2, a1, 0x0, a3, a4, a5); } v36 = *(&v25) ^ v35[5]; return; }
void rl_activate_mark (void) { mark_active = 1; rl_keep_mark_active (); }
void rl_activate_mark(void) { mark_active = 1; rl_keep_mark_active(); return; }
static int bind_permitted(int port, uid_t uid) { if (use_privsep) return 1; if (port < 1024 && uid != 0) return 0; return 1; }
int bind_permitted(unsigned long a0, unsigned long a1) { unsigned int v1; if (use_privsep) { v1 = 1; return v1; } else if (a0 > 1023) { v1 = 1; return v1; } else if (!a1) { v1 = 1; return v1; } else { v1 = 0; return v1; } }
static inline __u32 rta_getattr_u32(const struct rtattr *rta) { return *(__u32 *)((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); }
int rta_getattr_u32(struct_0 *a0) { return a0->field_4; }
static inline char * timetostr (time_t t, char *buf) { return ((! ((time_t) 0 < (time_t) -1)) ? imaxtostr (t, buf) : umaxtostr (t, buf)); }
long timetostr(long a1, long a2) { return imaxtostr(a1, a2); }
int rl_modifying (int start, int end) { if (start > end) { do { int t; t = start; start = end; end = t; } while (0); } if (start != end) { char *temp = rl_copy_text (start, end); rl_begin_undo_group (); rl_add_undo (UNDO_DELETE, start, end, temp); rl_add_undo (UNDO_INSERT, start, end, (char *) ((void *)0) ); rl_end_undo_group (); } return 0; }
long long rl_modifying(unsigned long a0, unsigned long a1) { unsigned int v0; unsigned int v1; unsigned int v2; unsigned long long v3; v1 = a0; v0 = a1; if (v1 > v0) { v2 = v1; v1 = v0; v0 = v2; } if (v1 != v0) { v3 = rl_copy_text(v1, v0, v0); rl_begin_undo_group(); rl_add_undo(0x0, v1, v0, v3); rl_add_undo(0x1, v1, v0, 0x0); rl_end_undo_group(); } return 0; }
static struct addrinfo * resolve_addr(const char *name, int port, char *caddr, size_t clen) { char addr[ 1025 ], strport[ 32 ]; struct addrinfo hints, *res; int gaierr; if (port <= 0) port = default_ssh_port(); snprintf(strport, sizeof strport, "%u", port); memset(&hints, 0, sizeof(hints)); hints.ai_family = options.address_family == -1 ? 0 : options.address_family; hints.ai_socktype = SOCK_STREAM ; hints.ai_flags = 0x0004 | 0x0400 ; if ((gaierr = getaddrinfo(name, strport, &hints, &res)) != 0) { sshlog("ssh.c", __func__, 345, 1, SYSLOG_LEVEL_DEBUG2, ((void *)0) , "could not resolve name %.100s as address: %s", name, ssh_gai_strerror(gaierr)) ; return ((void *)0) ; } if (res == ((void *)0) ) { sshlog("ssh.c", __func__, 350, 1, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "getaddrinfo %.100s returned no addresses", name); return ((void *)0) ; } if (res->ai_next != ((void *)0) ) { sshlog("ssh.c", __func__, 354, 1, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "getaddrinfo %.100s returned multiple addresses", name); goto fail; } if ((gaierr = getnameinfo(res->ai_addr, res->ai_addrlen, addr, sizeof(addr), ((void *)0) , 0, 1 )) != 0) { sshlog("ssh.c", __func__, 359, 1, SYSLOG_LEVEL_DEBUG1, ((void *)0) , "Could not format address for name %.100s: %s", name, ssh_gai_strerror(gaierr)) ; goto fail; } if (strlcpy(caddr, addr, clen) >= clen) { sshlog("ssh.c", __func__, 364, 1, SYSLOG_LEVEL_ERROR, ((void *)0) , "host \"%s\" addr \"%s\" too long (max %lu)", name, addr, (u_long)clen) ; if (clen > 0) *caddr = '\0'; fail: freeaddrinfo(res); return ((void *)0) ; } return res; }
struct addrinfo * resolve_addr(const char *a1, int a2, _BYTE *a3, unsigned long a4) { int v4; const char *v5; const char *v7; unsigned int v10; unsigned int v11; unsigned int v12; struct addrinfo *pai; struct addrinfo req; char s[32]; char host[1032]; unsigned long v17; v10 = a2; v17 = __readfsqword(0x28u); if ( a2 <= 0 ) v10 = default_ssh_port(); snprintf(s, 0x20uLL, "%u", v10); memset(&req, 0, sizeof(req)); if ( options[35] == -1 ) v4 = 0; else v4 = options[35]; req.ai_family = v4; req.ai_socktype = 1; req.ai_flags = 1028; v11 = getaddrinfo(a1, s, &req, &pai); if ( v11 ) { v5 = (const char *)ssh_gai_strerror(v11); sshlog("ssh.c", "resolve_addr", 345LL, 1LL, 6LL, 0LL, "could not resolve name %.100s as address: %s", a1, v5); return 0LL; } if ( !pai ) { sshlog("ssh.c", "resolve_addr", 350LL, 1LL, 5LL, 0LL, "getaddrinfo %.100s returned no addresses", a1); return 0LL; } if ( pai->ai_next ) { sshlog("ssh.c", "resolve_addr", 354LL, 1LL, 5LL, 0LL, "getaddrinfo %.100s returned multiple addresses", a1); LABEL_17: freeaddrinfo(pai); return 0LL; } v12 = getnameinfo(pai->ai_addr, pai->ai_addrlen, host, 0x401u, 0LL, 0, 1); if ( v12 ) { v7 = (const char *)ssh_gai_strerror(v12); sshlog("ssh.c", "resolve_addr", 359LL, 1LL, 5LL, 0LL, "Could not format address for name %.100s: %s", a1, v7); goto LABEL_17; } if ( a4 <= ((long ( *)(_BYTE *, char *, unsigned long))strlcpy)(a3, host, a4) ) { sshlog("ssh.c", "resolve_addr", 364LL, 1LL, 2LL, 0LL, "host \"%s\" addr \"%s\" too long (max %lu)", a1, host, a4); if ( a4 ) *a3 = 0; goto LABEL_17; } return pai; }
void rl_message(const char *format, ...) __attribute__((__format__(__printf__, 1, 2))); void rl_save_prompt(void); void rl_restore_prompt(void); int rl_kill_text(int, int); Keymap rl_get_keymap(void); void rl_set_keymap(Keymap); Keymap rl_make_bare_keymap(void); int rl_generic_bind(int, const char *, const char *, Keymap); int rl_bind_key_in_map(int, rl_command_func_t *, Keymap); int rl_set_key(const char *, rl_command_func_t *, Keymap); void rl_cleanup_after_signal(void); void rl_free_line_state(void); int rl_set_keyboard_input_timeout(int); int rl_abort(int, int); int rl_set_keymap_name(const char *, Keymap); histdata_t free_history_entry(HIST_ENTRY *); void _rl_erase_entire_line(void); typedef struct editline EditLine; typedef struct lineinfo { const char *buffer; const char *cursor; const char *lastchar; } LineInfo;
long long rl_message() { unsigned int v0; unsigned int v1; unsigned long v2; unsigned long v3; char v4; unsigned long v5; char v6; unsigned long v7; unsigned long v8; unsigned long v9; unsigned long v10; unsigned long v11; int v12; int v13; int v14; int v15; int v16; int v17; int v18; int v19; unsigned long v20; unsigned long v21; unsigned long long v22; unsigned long v23; unsigned long v24; unsigned long v25; char v26; int v27; int v28; int v29; int v30; int v31; int v32; int v33; int v34; unsigned long long *v35; char *v36; v7 = v21; v8 = v22; v9 = v23; v10 = v24; v11 = v25; if (v26) { v12 = v27; v13 = v28; v14 = v29; v15 = v30; v16 = v31; v17 = v32; v18 = v33; v19 = v34; } v5 = v35[5]; v0 = 8; v1 = 48; v2 = &v20; v3 = &v6; vsnprintf(&v4, 0xa0, v36, &v0); rl_set_prompt(&v4); rl_forced_update_display(&v4, 0xa0, v22); if (!(v5 ^ v35[5])) return 0; __stack_chk_fail(); }
_Bool pred_true (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) { (void) pathname; (void) stat_buf; (void) pred_ptr; return 1 ; }
undefined8 pred_true(void) { return 1; }
void reset_internal_getopt () { lhead = lcurrent = loptend = (WORD_LIST *) ((void *)0) ; sp = 1; }
long reset_internal_getopt() { long result; loptend = 0LL; lcurrent = 0LL; result = 0LL; lhead = 0LL; dword_708 = 1; return result; }
static char * format_inode (char *buf, size_t buflen, const struct fileinfo *f) { ((void) sizeof (( ((((((sizeof (uintmax_t) * 8) - (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) + 1) <= buflen ) ? 1 : 0), __extension__ ({ if ( ((((((sizeof (uintmax_t) * 8) - (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (uintmax_t)) 0 < (__typeof__ (uintmax_t)) -1))) + 1) <= buflen ) ; else __assert_fail ( "INT_BUFSIZE_BOUND (uintmax_t) <= buflen" , "src/ls.c", 4286, __extension__ __PRETTY_FUNCTION__); })) ; return (f->stat_ok && f->stat.st_ino != NOT_AN_INODE_NUMBER ? umaxtostr (f->stat.st_ino, buf) : (char *) "?"); }
int format_inode(unsigned long long a0, unsigned long a1, struct_0 *a2) { unsigned int v1; if (a1 <= 20) __assert_fail(); if (a2->field_b8 && a2->field_20) v1 = umaxtostr(a2->field_20, a0, a0); if (!a2->field_20 || !a2->field_b8) v1 = &g_40de5a; return v1; }
static char * subst_suffix (char const *str, char const *suffix, char const *newsuffix) { idx_t prefixlen = suffix - str; idx_t newsuffixsize = strlen (newsuffix) + 1; char *r = ximalloc (prefixlen + newsuffixsize); memcpy (r + prefixlen, newsuffix, newsuffixsize); return memcpy (r, str, prefixlen); }
int subst_suffix(void* a0, unsigned long a1, void* a2) { unsigned int v0; unsigned int v1; void* v2; *(&v0) = a1 - a0; *(&v1) = strlen(a2) + 1; v2 = ximalloc(*(&v1) + *(&v0)); memcpy(*(&v0) + v2, a2, *(&v1)); return memcpy(v2, a0, *(&v0)); }
static void cp_option_init (struct cp_options *x) { cp_options_default (x); x->copy_as_regular = 1 ; x->reflink_mode = REFLINK_AUTO; x->dereference = DEREF_ALWAYS; x->unlink_dest_before_opening = 1 ; x->unlink_dest_after_failed_open = 0 ; x->hard_link = 0 ; x->interactive = I_UNSPECIFIED; x->move_mode = 0 ; x->install_mode = 1 ; x->one_file_system = 0 ; x->preserve_ownership = 0 ; x->preserve_links = 0 ; x->preserve_mode = 0 ; x->preserve_timestamps = 0 ; x->explicit_no_preserve_mode = 0 ; x->reduce_diagnostics= 0 ; x->data_copy_required = 1 ; x->require_preserve = 0 ; x->require_preserve_xattr = 0 ; x->recursive = 0 ; x->sparse_mode = SPARSE_AUTO; x->symbolic_link = 0 ; x->backup_type = no_backups; x->set_mode = 1 ; x->mode = 0400 | 0200 ; x->stdin_tty = 0 ; x->open_dangling_dest_symlink = 0 ; x->update = 0 ; x->require_preserve_context = 0 ; x->preserve_security_context = 0 ; x->set_security_context = ((void *)0) ; x->preserve_xattr = 0 ; x->verbose = 0 ; x->dest_info = ((void *)0) ; x->src_info = ((void *)0) ; }
void cp_option_init(struct_0 *a0) { struct_0 *v1; cp_options_default(a0); a0->field_14 = 1; a0->field_44 = 1; a0->field_4 = 4; a0->field_15 = 1; a0->field_16 = 0; a0->field_17 = 0; a0->field_8 = 4; a0->field_18 = 0; a0->field_19 = 1; a0->field_1c = 0; a0->field_1d = 0; a0->field_30 = 0; a0->field_1e = 0; a0->field_1f = 0; a0->field_20 = 0; a0->field_37 = 0; a0->field_31 = 1; a0->field_32 = 0; a0->field_36 = 0; a0->field_38 = 0; a0->field_c = 2; a0->field_3a = 0; a0->field_0 = 0; a0->field_39 = 1; a0->field_10 = 384; a0->field_3d = 0; a0->field_3e = 0; a0->field_3b = 0; a0->field_34 = 0; a0->field_33 = 0; a0->field_28 = 0; a0->field_35 = 0; a0->field_3c = 0; a0->field_48 = 0; v1 = a0; a0->field_50 = 0; return; }
int mbscmp (mbs1, mbs2) const char *mbs1; const char *mbs2; { int len1, len2, mb_cur_max; wchar_t c1, c2; len1 = len2 = 0; (void) mblen ((char *) ((void *)0) , 0); mb_cur_max = (__ctype_get_mb_cur_max ()) ; do { len1 = mbtowc (&c1, mbs1, mb_cur_max); len2 = mbtowc (&c2, mbs2, mb_cur_max); if (len1 == 0) return len2 == 0 ? 0 : -1; else if (len2 == 0) return 1; else if (len1 > 0 && len2 < 0) return -1; else if (len1 < 0 && len2 > 0) return 1; else if (len1 < 0 && len2 < 0) { len1 = strlen (mbs1); len2 = strlen (mbs2); return (len1 == len2 ? memcmp (mbs1, mbs2, len1) : ((len1 < len2) ? (memcmp (mbs1, mbs2, len1) > 0 ? 1 : -1) : (memcmp (mbs1, mbs2, len2) >= 0 ? 1 : -1))); } mbs1 += len1; mbs2 += len2; } while (c1 == c2); return c1 - c2; }
int mbscmp(const char *a1, const char *a2) { wchar_t pwc; wchar_t v6; int v7; int v8; int mb_cur_max; unsigned long v10; v10 = __readfsqword(0x28u); v7 = 0; v8 = 0; mblen(0LL, 0LL); mb_cur_max = _ctype_get_mb_cur_max(); while ( 1 ) { v8 = mbtowc(&pwc, a1, mb_cur_max); v7 = mbtowc(&v6, a2, mb_cur_max); if ( !v8 ) { if ( v7 ) return -1; else return 0; } if ( !v7 ) return 1; if ( v8 > 0 && v7 < 0 ) return -1; if ( v8 < 0 && v7 > 0 ) return 1; if ( v8 < 0 && v7 < 0 ) break; a1 += v8; a2 += v7; if ( pwc != v6 ) return pwc - v6; } v8 = strlen(a1); v7 = strlen(a2); if ( v8 == v7 ) return memcmp(a1, a2, v8); if ( v8 >= v7 ) { if ( memcmp(a1, a2, v7) < 0 ) return -1; else return 1; } else if ( memcmp(a1, a2, v8) <= 0 ) { return -1; } else { return 1; } }
const char *raw_to_string(const unsigned char *raw, size_t raw_size) { static char buf[1024]; size_t i; if (raw_size == 0) return "(empty)"; if (raw_size * 3 + 1 >= sizeof(buf)) return "(too large)"; for (i = 0; i < raw_size; i++) { sprintf(&(buf[i * 3]), "%02X%s", raw[i], (i == raw_size - 1) ? "" : ":"); } buf[sizeof(buf) - 1] = '\0'; return buf; }
const char * raw_to_string(long a1, unsigned long a2) { const char *v3; unsigned long i; if ( !a2 ) return "(empty)"; if ( 3 * a2 + 1 > 0x3FF ) return "(too large)"; for ( i = 0LL; i < a2; ++i ) { if ( i == a2 - 1 ) v3 = (const char *)&unk_467E; else v3 = ":"; sprintf(&buf_11883[3 * i], "%02X%s", *(unsigned char *)(a1 + i), v3); } byte_3D3F = 0; return buf_11883; }
static const char * channel_fwd_bind_addr(struct ssh *ssh, const char *listen_addr, int *wildcardp, int is_client, struct ForwardOptions *fwd_opts) { const char *addr = ((void *)0) ; int wildcard = 0; if (listen_addr == ((void *)0) ) { if (fwd_opts->gateway_ports) wildcard = 1; } else if (fwd_opts->gateway_ports || is_client) { if (((ssh->compat & 0x01000000) && strcmp(listen_addr, "0.0.0.0") == 0 && is_client == 0) || *listen_addr == '\0' || strcmp(listen_addr, "*") == 0 || (!is_client && fwd_opts->gateway_ports == 1)) { wildcard = 1; if (*listen_addr != '\0' && strcmp(listen_addr, "0.0.0.0") != 0 && strcmp(listen_addr, "*") != 0) { ssh_packet_send_debug(ssh, "Forwarding listen address " "\"%s\" overridden by server " "GatewayPorts", listen_addr); } } else if (strcmp(listen_addr, "localhost") != 0 || strcmp(listen_addr, "127.0.0.1") == 0 || strcmp(listen_addr, "::1") == 0) { addr = listen_addr; } } else if (strcmp(listen_addr, "127.0.0.1") == 0 || strcmp(listen_addr, "::1") == 0) { addr = listen_addr; } if (wildcardp != ((void *)0) ) *wildcardp = wildcard; return addr; }
const char * channel_fwd_bind_addr(long a1, const char *a2, _BOOL4 *a3, int a4, _DWORD *a5) { _BOOL4 v9; const char *v10; v10 = 0LL; v9 = 0; if ( a2 ) { if ( *a5 || a4 ) { if ( (*(_DWORD *)(a1 + 2108) & 0x1000000) != 0 && !strcmp(a2, "0.0.0.0") && !a4 || !*a2 || !strcmp(a2, "*") || !a4 && *a5 == 1 ) { v9 = 1; if ( *a2 && strcmp(a2, "0.0.0.0") && strcmp(a2, "*") ) ssh_packet_send_debug(a1, "Forwarding listen address \"%s\" overridden by server GatewayPorts", a2); } else if ( strcmp(a2, "localhost") || !strcmp(a2, "127.0.0.1") || !strcmp(a2, "_1") ) { v10 = a2; } } else if ( !strcmp(a2, "127.0.0.1") || !strcmp(a2, "_1") ) { v10 = a2; } } else { v9 = *a5 != 0; } if ( a3 ) *a3 = v9; return v10; }
static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo) { struct ifla_vf_mac *vf_mac; struct ifla_vf_broadcast *vf_broadcast; struct ifla_vf_tx_rate *vf_tx_rate; struct rtattr *vf[(__IFLA_VF_MAX - 1) + 1] = {}; char b1[64]; if (vfinfo->rta_type != IFLA_VF_INFO) { fprintf( stderr , "BUG: rta type is %d\n", vfinfo->rta_type); return; } (parse_rtattr_flags((vf), ((__IFLA_VF_MAX - 1)), ((void*)(((char*)(vfinfo)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))), ((int)((vfinfo)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))), (1 << 15))); vf_mac = ((void*)(((char*)(vf[IFLA_VF_MAC])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); vf_broadcast = ((void*)(((char*)(vf[IFLA_VF_BROADCAST])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); vf_tx_rate = ((void*)(((char*)(vf[IFLA_VF_TX_RATE])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); print_string(PRINT_FP, ((void *)0) , "%s ", _SL_); print_int(PRINT_ANY, "vf", "vf %d ", vf_mac->vf); print_string(PRINT_ANY, "link_type", " link/%s ", ll_type_n2a(ifi->ifi_type, b1, sizeof(b1))); print_color_string(PRINT_ANY, COLOR_MAC, "address", "%s", ll_addr_n2a((unsigned char *) &vf_mac->mac, ifi->ifi_type == 1 ? 6 : 20, ifi->ifi_type, b1, sizeof(b1))); if (vf[IFLA_VF_BROADCAST]) { if (ifi->ifi_flags&IFF_POINTOPOINT) { print_string(PRINT_FP, ((void *)0) , " peer ", ((void *)0) ); print_bool(PRINT_JSON, "link_pointtopoint", ((void *)0) , 1 ); } else print_string(PRINT_FP, ((void *)0) , " brd ", ((void *)0) ); print_color_string(PRINT_ANY, COLOR_MAC, "broadcast", "%s", ll_addr_n2a((unsigned char *) &vf_broadcast->broadcast, ifi->ifi_type == 1 ? 6 : 20, ifi->ifi_type, b1, sizeof(b1))); } if (vf[IFLA_VF_VLAN_LIST]) { struct rtattr *i, *vfvlanlist = vf[IFLA_VF_VLAN_LIST]; int rem = ((int)((vfvlanlist)->rta_len) - (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0))); open_json_array(PRINT_JSON, "vlan_list"); for (i = ((void*)(((char*)(vfvlanlist)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); ((rem) >= (int)sizeof(struct rtattr) && (i)->rta_len >= sizeof(struct rtattr) && (i)->rta_len <= (rem)); i = ((rem) -= ( (((i)->rta_len)+4U -1) & ~(4U -1) ), (struct rtattr*)(((char*)(i)) + ( (((i)->rta_len)+4U -1) & ~(4U -1) )))) { struct ifla_vf_vlan_info *vf_vlan_info = ((void*)(((char*)(i)) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); char b2[64]; open_json_object( ((void *)0) ); if (vf_vlan_info->vlan) print_int(PRINT_ANY, "vlan", ", vlan %d", vf_vlan_info->vlan); if (vf_vlan_info->qos) print_int(PRINT_ANY, "qos", ", qos %d", vf_vlan_info->qos); if (vf_vlan_info->vlan_proto && vf_vlan_info->vlan_proto != htons(0x8100)) print_string(PRINT_ANY, "protocol", ", vlan protocol %s", ll_proto_n2a( vf_vlan_info->vlan_proto, b2, sizeof(b2))); close_json_object(); } close_json_array(PRINT_JSON, ((void *)0) ); } else { struct ifla_vf_vlan *vf_vlan = ((void*)(((char*)(vf[IFLA_VF_VLAN])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); if (vf_vlan->vlan) print_int(PRINT_ANY, "vlan", ", vlan %d", vf_vlan->vlan); if (vf_vlan->qos) print_int(PRINT_ANY, "qos", ", qos %d", vf_vlan->qos); } if (vf_tx_rate->rate) print_uint(PRINT_ANY, "tx_rate", ", tx rate %u (Mbps)", vf_tx_rate->rate); if (vf[IFLA_VF_RATE]) { struct ifla_vf_rate *vf_rate = ((void*)(((char*)(vf[IFLA_VF_RATE])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); int max_tx = vf_rate->max_tx_rate; int min_tx = vf_rate->min_tx_rate; if (is_json_context()) { open_json_object("rate"); print_uint(PRINT_JSON, "max_tx", ((void *)0) , max_tx); print_uint(PRINT_ANY, "min_tx", ((void *)0) , min_tx); close_json_object(); } else { if (max_tx) fprintf(fp, ", max_tx_rate %uMbps", max_tx); if (min_tx) fprintf(fp, ", min_tx_rate %uMbps", min_tx); } } if (vf[IFLA_VF_SPOOFCHK]) { struct ifla_vf_spoofchk *vf_spoofchk = ((void*)(((char*)(vf[IFLA_VF_SPOOFCHK])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); if (vf_spoofchk->setting != -1) print_bool(PRINT_ANY, "spoofchk", vf_spoofchk->setting ? ", spoof checking on" : ", spoof checking off", vf_spoofchk->setting); } if (vf[IFLA_VF_IB_NODE_GUID]) { struct ifla_vf_guid *guid = ((void*)(((char*)(vf[IFLA_VF_IB_NODE_GUID])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); uint64_t node_guid = ((1==ntohl(1)) ? (guid->guid) : ((uint64_t)ntohl((guid->guid) & 0xFFFFFFFF) << 32) | ntohl((guid->guid) >> 32)); print_string(PRINT_ANY, "node guid", ", NODE_GUID %s", ll_addr_n2a((const unsigned char *)&node_guid, sizeof(node_guid), 32, b1, sizeof(b1))); } if (vf[IFLA_VF_IB_PORT_GUID]) { struct ifla_vf_guid *guid = ((void*)(((char*)(vf[IFLA_VF_IB_PORT_GUID])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); uint64_t port_guid = ((1==ntohl(1)) ? (guid->guid) : ((uint64_t)ntohl((guid->guid) & 0xFFFFFFFF) << 32) | ntohl((guid->guid) >> 32)); print_string(PRINT_ANY, "port guid", ", PORT_GUID %s", ll_addr_n2a((const unsigned char *)&port_guid, sizeof(port_guid), 32, b1, sizeof(b1))); } if (vf[IFLA_VF_LINK_STATE]) { struct ifla_vf_link_state *vf_linkstate = ((void*)(((char*)(vf[IFLA_VF_LINK_STATE])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); if (vf_linkstate->link_state == IFLA_VF_LINK_STATE_AUTO) print_string(PRINT_ANY, "link_state", ", link-state %s", "auto"); else if (vf_linkstate->link_state == IFLA_VF_LINK_STATE_ENABLE) print_string(PRINT_ANY, "link_state", ", link-state %s", "enable"); else print_string(PRINT_ANY, "link_state", ", link-state %s", "disable"); } if (vf[IFLA_VF_TRUST]) { struct ifla_vf_trust *vf_trust = ((void*)(((char*)(vf[IFLA_VF_TRUST])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); if (vf_trust->setting != -1) print_bool(PRINT_ANY, "trust", vf_trust->setting ? ", trust on" : ", trust off", vf_trust->setting); } if (vf[IFLA_VF_RSS_QUERY_EN]) { struct ifla_vf_rss_query_en *rss_query = ((void*)(((char*)(vf[IFLA_VF_RSS_QUERY_EN])) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))); if (rss_query->setting != -1) print_bool(PRINT_ANY, "query_rss_en", rss_query->setting ? ", query_rss on" : ", query_rss off", rss_query->setting); } if (vf[IFLA_VF_STATS] && show_stats) print_vf_stats64(fp, vf[IFLA_VF_STATS]); }
unsigned long print_vfinfo(FILE *a1, long a2, unsigned short *a3) { long v3; long v4; const char *v5; long v6; long v7; const char *v8; const char *v9; long v10; long v11; long v12; long v13; unsigned short v14; long v15; long v16; long v17; long v18; const char *v19; long v20; unsigned long v21; long v22; long v23; unsigned long v24; long v25; const char *v26; const char *v27; int v31; unsigned int v32; unsigned int v33; long v34; unsigned short *i; unsigned int *v36; long v37; long v38; long v39; long v40; unsigned short *v41; long v42; long v43; long v44; long v45; long v46; long v47; long v48; long v49[14]; char v50[64]; char v51[72]; unsigned long v52; v52 = __readfsqword(0x28u); memset(v49, 0, sizeof(v49)); if ( a3[1] == 1 ) { parse_rtattr_flags(v49, 13LL, a3 + 2, (unsigned int)*a3 - 4, 0x8000LL); v36 = (unsigned int *)(v49[1] + 4); v37 = v49[13] + 4; v38 = v49[3] + 4; print_string(1u, 0LL, "%s ", SL_); print_int(4u, (long)"vf", (long)"vf %d ", *v36); v3 = ll_type_n2a(*(unsigned short *)(a2 + 2), v50, 64LL); print_string(4u, (long)"link_type", " link/%s ", v3); if ( *(_WORD *)(a2 + 2) == 1 ) v4 = 6LL; else v4 = 20LL; v5 = (const char *)ll_addr_n2a(v36 + 1, v4, *(unsigned short *)(a2 + 2), v50, 64LL); v6 = 4LL; print_color_string(4LL, 1LL, "address", "%s", v5); if ( v49[13] ) { if ( (*(_DWORD *)(a2 + 8) & 0x10) != 0 ) { print_string(1u, 0LL, " peer ", 0LL); print_bool(2u, (long)"link_pointtopoint", 0LL, 1u); } else { print_string(1u, 0LL, " brd ", 0LL); } if ( *(_WORD *)(a2 + 2) == 1 ) v7 = 6LL; else v7 = 20LL; v8 = (const char *)ll_addr_n2a(v37, v7, *(unsigned short *)(a2 + 2), v50, 64LL); v6 = 4LL; print_color_string(4LL, 1LL, "broadcast", "%s", v8); } if ( v49[12] ) { v40 = v49[12]; v31 = *(unsigned short *)v49[12] - 4; v9 = "vlan_list"; open_json_array(2LL, "vlan_list"); for ( i = (unsigned short *)(v40 + 4); v31 > 3 && *i > 3u && v31 >= *i; i = (unsigned short *)((char *)i + ((*i + 3) & 0xFFFFFFFC)) ) { v41 = i + 2; v10 = 0LL; open_json_object(0LL); if ( *((_DWORD *)i + 2) ) { v9 = "vlan"; v10 = 4LL; print_int(4u, (long)"vlan", (long)", vlan %d", *((_DWORD *)v41 + 1)); } if ( *((_DWORD *)v41 + 2) ) { v9 = "qos"; v10 = 4LL; print_int(4u, (long)"qos", (long)", qos %d", *((_DWORD *)v41 + 2)); } if ( v41[6] ) { v14 = v41[6]; v10 = 33024LL; if ( v14 != htons(0x8100u) ) { v15 = ll_proto_n2a(v41[6], v51, 64LL); v9 = "protocol"; v10 = 4LL; print_string(4u, (long)"protocol", ", vlan protocol %s", v15); } } close_json_object(v10, v9, v11, v12, v13); v31 -= (*i + 3) & 0xFFFFFFFC; } v6 = 2LL; close_json_array(2LL, 0LL); } else { v39 = v49[2] + 4; if ( *(_DWORD *)(v49[2] + 8) ) { v6 = 4LL; print_int(4u, (long)"vlan", (long)", vlan %d", *(_DWORD *)(v39 + 4)); } if ( *(_DWORD *)(v39 + 8) ) { v6 = 4LL; print_int(4u, (long)"qos", (long)", qos %d", *(_DWORD *)(v39 + 8)); } } if ( *(_DWORD *)(v38 + 4) ) { v6 = 4LL; print_uint(4u, (long)"tx_rate", (long)", tx rate %u (Mbps)", *(_DWORD *)(v38 + 4)); } if ( v49[6] ) { v42 = v49[6] + 4; v32 = *(_DWORD *)(v49[6] + 12); v33 = *(_DWORD *)(v49[6] + 8); if ( (unsigned char)is_json_context(v6) ) { open_json_object("rate"); print_uint(2u, (long)"max_tx", 0LL, v32); print_uint(4u, (long)"min_tx", 0LL, v33); close_json_object(4LL, "min_tx", v16, v17, v18); } else { if ( v32 ) fprintf(a1, ", max_tx_rate %uMbps", v32); if ( v33 ) fprintf(a1, ", min_tx_rate %uMbps", v33); } } if ( v49[4] ) { v43 = v49[4] + 4; if ( *(_DWORD *)(v49[4] + 8) != -1 ) { if ( *(_DWORD *)(v43 + 4) ) v19 = ", spoof checking on"; else v19 = ", spoof checking off"; print_bool(4u, (long)"spoofchk", (long)v19, *(_DWORD *)(v43 + 4) != 0); } } if ( v49[10] ) { v44 = v49[10] + 4; if ( ntohl(1u) == 1 ) { v20 = *(_QWORD *)(v44 + 8); } else { v21 = (unsigned long)ntohl(*(_QWORD *)(v44 + 8)) << 32; v20 = v21 | ntohl(HIDWORD(*(_QWORD *)(v44 + 8))); } v34 = v20; v22 = ll_addr_n2a(&v34, 8LL, 32LL, v50, 64LL); print_string(4u, (long)"node guid", ", NODE_GUID %s", v22); } if ( v49[11] ) { v45 = v49[11] + 4; if ( ntohl(1u) == 1 ) { v23 = *(_QWORD *)(v45 + 8); } else { v24 = (unsigned long)ntohl(*(_QWORD *)(v45 + 8)) << 32; v23 = v24 | ntohl(HIDWORD(*(_QWORD *)(v45 + 8))); } v34 = v23; v25 = ll_addr_n2a(&v34, 8LL, 32LL, v50, 64LL); print_string(4u, (long)"port guid", ", PORT_GUID %s", v25); } if ( v49[5] ) { v46 = v49[5] + 4; if ( *(_DWORD *)(v49[5] + 8) ) { if ( *(_DWORD *)(v46 + 4) == 1 ) print_string(4u, (long)"link_state", ", link-state %s", (long)"enable"); else print_string(4u, (long)"link_state", ", link-state %s", (long)"disable"); } else { print_string(4u, (long)"link_state", ", link-state %s", (long)"auto"); } } if ( v49[9] ) { v47 = v49[9] + 4; if ( *(_DWORD *)(v49[9] + 8) != -1 ) { if ( *(_DWORD *)(v47 + 4) ) v26 = ", trust on"; else v26 = ", trust off"; print_bool(4u, (long)"trust", (long)v26, *(_DWORD *)(v47 + 4) != 0); } } if ( v49[7] ) { v48 = v49[7] + 4; if ( *(_DWORD *)(v49[7] + 8) != -1 ) { if ( *(_DWORD *)(v48 + 4) ) v27 = ", query_rss on"; else v27 = ", query_rss off"; print_bool(4u, (long)"query_rss_en", (long)v27, *(_DWORD *)(v48 + 4) != 0); } } if ( v49[8] && show_stats ) print_vf_stats64(a1, (unsigned short *)v49[8]); } else { fprintf(stderr, "BUG: rta type is %d\n", a3[1]); } return __readfsqword(0x28u) ^ v52; }
static void treat_stdin() { if (!force && !list && (presume_input_tty || isatty (decompress ? 0 : 1 ))) { if (! quiet) fprintf ( stderr , ("%s: compressed data not %s a terminal." " Use -f to force %scompression.\n" "For help, type: %s -h\n"), program_name, decompress ? "read from" : "written to", decompress ? "de" : "", program_name); do_exit(1); } if (decompress || !ascii) { ; } if (!test && (!decompress || !ascii)) { ; } strcpy(ifname, "stdin"); strcpy(ofname, "stdout"); if (fstat ( 0 , &istat) != 0) { progerror ("standard input"); do_exit (1); } get_input_size_and_time (); clear_bufs(); to_stdout = 1; part_nb = 0; ifd = 0 ; stdin_was_read = 1 ; if (decompress) { method = get_method(ifd); if (method < 0) { do_exit(exit_code); } } for (;;) { if (work ( 0 , 1 ) != 0) return; if (input_eof ()) break; method = get_method(ifd); if (method < 0) return; bytes_out = 0; } if (list) { do_list (method); return; } if (verbose) { if (test) { fprintf( stderr , " OK\n"); } else if (!decompress) { display_ratio(bytes_in-(bytes_out-header_bytes), bytes_in, stderr ); fprintf( stderr , "\n"); } } }
void treat_stdin(unsigned int a0, unsigned long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5) { unsigned int v1; unsigned long long v3; unsigned long long v4; unsigned long long v5; unsigned long long v6; unsigned long long v7; unsigned long long v8; if (!force && !list) { if (!presume_input_tty && !isatty(!decompress)) goto LABEL_400b26; if (!quiet) { if (!decompress) *(&a2) = &g_404f6f; else *(&a2) = "de"; if (!decompress) v1 = &g_404f7a; else v1 = "read from"; fprintf(*(&stderr), "%s: compressed data not %s a terminal. Use -f to force %scompression.\nFor help, type: %s -h\n", -116028600, v1, a2, -116028600); } do_exit(0x1); } LABEL_400b26: strcpy(&ofname, "stdin"); strcpy(&ofname, "stdout"); if (fstat(0x0, &istat)) { progerror("standard input"); do_exit(0x1); } get_input_size_and_time(0x0, &istat, a2); clear_bufs(0x0, &istat, a2, a3, a4, a5); to_stdout = 1; part_nb = 0; outcnt = 0; stdin_was_read = 1; if (decompress) { method = get_method(0xf9158b48e5894855); if (method < 0) do_exit(exit_code); } while (true) { if (zip(0x0, 0x1)) break; if (!input_eof()) { method = get_method(0xf9158b48e5894855); v3 = method; if (method < 0) break; bytes_out = 0; } else if (list) { v5 = do_list(method); break; } else { v4 = verbose; if (verbose) { if (test) { v7 = fprintf(*(&stderr), " OK\n"); break; } else { v6 = decompress; if (!decompress) { display_ratio(header_bytes, 0x48fffffff9158b48, *(&stderr), header_bytes); v8 = fprintf(*(&stderr), "\n"); break; } } } } } return; }
void rl_free_undo_list (void) { UNDO_LIST *release, *orig_list; orig_list = rl_undo_list; _rl_free_undo_list (rl_undo_list); rl_undo_list = (UNDO_LIST *) ((void *)0) ; _hs_replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *) ((void *)0) ); }
long long rl_free_undo_list() { unsigned long long v0; v0 = rl_undo_list; _rl_free_undo_list(rl_undo_list); rl_undo_list = 0; return _hs_replace_history_data(0xffffffff, v0, 0x0); }
void flush_write (void) { flush_write_ptr (record_size); }
unsigned long flush_write() { unsigned long v1; long v2; unsigned long v3; checkpoint_run(1LL); if ( tape_length_option == 0.0 || *(double *)&bytes_written < tape_length_option ) { if ( dev_null_output ) v1 = record_size; else v1 = sys_write_archive_buffer(); } else { *_errno_location() = 28; v1 = 0LL; } if ( v1 ) { if ( multi_volume_option ) { if ( !inhibit_map ) { v2 = bufmap_locate(v1); if ( v2 ) { v3 = v1 - (*(_QWORD *)(v2 + 8) << 9); *(_QWORD *)(v2 + 40) += v3 >> 9; if ( v3 > *(_QWORD *)(v2 + 32) ) v3 = *(_QWORD *)(v2 + 32); *(_QWORD *)(v2 + 32) -= v3; if ( *(_QWORD *)(v2 + 32) ) bufmap_reset((void **)v2, -*(_QWORD *)(v2 + 8)); else bufmap_reset(*(void ***)v2, -(*(_QWORD *)(v2 + 8) + *(_QWORD *)(v2 + 40))); } } } } return v1; }
static void process_buffered_input_packets(struct ssh *ssh) { ssh_dispatch_run_fatal(ssh, DISPATCH_NONBLOCK, ((void *)0) ); }
void process_buffered_input_packets(unsigned long long a0) { unsigned long long v1; v1 = ssh_dispatch_run_fatal(a0, 0x1, 0x0); return; }
static int mod_cmp(const void *pa, const void *pb) { const struct mod *a = *(const struct mod **)pa; const struct mod *b = *(const struct mod **)pb; return a->sort_idx - b->sort_idx; }
long long mod_cmp(unsigned long long *a0, unsigned long long *a1) { struct_0 *v0; struct_0 *v1; v0 = *(a0); v1 = *(a1); return v0->field_60 - v1->field_60; }
|| (new_flags != old_flags && rpl_fcntl (fd, 4 , new_flags) == -1)) { if ( (((( f[i].mode )) & 0170000) == (0100000)) && (*__errno_location ()) == 1 ) { } else ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), gettext (\"%s: cannot change nonblocking mode\"), quotearg_n_style_colon (0, shell_escape_quoting_style, name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , gettext ("%s: cannot change nonblocking mode"), quotearg_n_style_colon (0, shell_escape_quoting_style, name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , gettext ("%s: cannot change nonblocking mode"), quotearg_n_style_colon (0, shell_escape_quoting_style, name)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; }
(((uVar8 | uVar7) != uVar7 && (iVar9 = rpl_fcntl(iVar10,4,uVar8 | uVar7), iVar9 == -1)))) { if (((*(uint *)(param_2 + local_d8 * 0x60 + 0x30) & 0xf000) != 0x8000) || (piVar15 = __errno_location(), *piVar15 != 1)) { uVar11 = quotearg_n_style_colon(0,3,uVar14); uVar12 = gettext("%s: cannot change nonblocking mode"); piVar15 = __errno_location(); error(1,*piVar15,uVar12,uVar11); } }
int all_digits (string) const char *string; { register const char *s; for (s = string; *s; s++) if (((*s) >= '0' && (*s) <= '9') == 0) return (0); return (1); }
int all_digits(unsigned long long a0) { char *v1; unsigned int v2; unsigned int v3; v1 = a0; while (true) { if (*(v1)) { if (*(v1) > 47 && *(v1) <= 57) v2 = 1; if (*(v1) <= 47 || *(v1) > 57) v2 = 0; if (!v2) { v3 = 0; break; } else { v1 += 1; } } else { v3 = 1; break; } } return v3; }