# HG changeset patch # User Pascal Bellard # Date 1492614368 -7200 # Node ID a0df590cdf14ec597b1ddd0f72d3ba0ca8f82886 # Parent b537b345646460f6e3789d3ecb02f2e6e1c6a32d dropbear/sshx: add proxy ssh support diff -r b537b3456464 -r a0df590cdf14 dropbear/stuff/sshx --- a/dropbear/stuff/sshx Sun Apr 16 11:52:13 2017 +0200 +++ b/dropbear/stuff/sshx Wed Apr 19 17:06:08 2017 +0200 @@ -6,19 +6,25 @@ svr=${DISPLAY#*:} n=$((10+($RANDOM % 90))); dpy=localhost:$n scr=${DISPLAY/${DISPLAY%.*}/$dpy} - r="" + r="" ; p="22"; k="" while true; do a="$1" r="$r $1"; shift case "$a" in + -p) p=$1 ;; + -i) k="$k-i $1 " ;; + esac + case "$a" in -[piIlLRWKBJ]) r="$r $1"; shift;; -*) ;; *) break ;; esac done xhost +localhost > /dev/null 2>&1 + pxypass="${DBPROXY_PASSWORD:+export DROPBEAR_PASSWORD=$DBPROXY_PASSWORD; }" [ -n "$1" ] || set -- "${TERM:-xterm} -ls || ${TERM:-sakura} -l || xterm -ls" exec dbclient -f -R $((6000+$n)):localhost:$((6000+${svr%.*})) $r \ + ${DBPROXY:+-J "sh -c '${pxypass}dbclient ${k}-B ${a#*@}:$p $DBPROXY'"} \ "xauth add $dpy $data; export DISPLAY=$scr; $@ ; xauth remove $dpy" \ /dev/null } diff -r b537b3456464 -r a0df590cdf14 linld/stuff/src/VCPI.ASM --- a/linld/stuff/src/VCPI.ASM Sun Apr 16 11:52:13 2017 +0200 +++ b/linld/stuff/src/VCPI.ASM Wed Apr 19 17:06:08 2017 +0200 @@ -145,52 +145,44 @@ ;push bx ;push ax prepare_vcpi: - ;push esi - ;push es ;Calculate pagedir/page0 addrs, initialize cr3 and pagedir[0] xor eax,eax ; heap_top = prepare_vcpi(malloc_or_die(8*1024+4)); mov cx,8*1024+4 extrn malloc_or_die:near - call malloc_or_die + call malloc_or_die ;keep cx - mov cl,4 mov edx,cs shl edx,cl ;edx = linear addr of CS mov si,offset gdt_vcpi ; Fix up base of some gdt descriptors ; Note: 'add [dword xx.base0],edx' actually updates 24 bit quantity! ; Do NOT replace with mov! - mov bx,-28h + mov ebx,10000h-28h add [dword bx+si+sw2pm_idtr_ptr-gdt_vcpi+28h],edx @@fixup: add [dword bx+si+(gdt_code.base0)-gdt_vcpi+28h],edx - add bl,8 + add bx,8 js @@fixup + mov bh,10h add eax,edx - dec eax - shr eax,cl - inc ah - mov al,0 ;eax = 4k aligned linear addr of pagebuf - mov es,ax ;es:0->page0,es:1000h->pagedir - shl eax,cl ;eax=page0 linear addr + and ax,0f000h ;eax = 4k aligned linear addr of pagebuf + add eax,ebx ;eax=page0 linear addr add [si+sw2pm_cr3-gdt_vcpi],eax - mov di,ax + mov edi,eax + sub edi,edx mov al,3 ;add present+writable bits - mov [es:1000h],eax ;stuff it into pagedir[0] + mov [bx+di],eax ;stuff it into pagedir[0] push ds - pop es - sub di,dx ;ES:DI => page0 + pop es ;es:di->page0,es:di+1000h->pagedir ;page directory will use only one entry (4 bytes): ;cr3 => pagedir => page0 => ######## ; (1 entry) (1024 => # 4M # ; entries)=> # page # ; => ######## ; Return - ;pop es - ;pop esi - lea ax,[di+1004h] + lea ax,[bx+di+4] extrn _heap_top:word mov [_heap_top],ax ;ret