wok-next rev 19404

Up openssh (7.3p1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 09 12:06:28 2016 +0200 (2016-09-09)
parents fd3dadf90ba9
children e7f6a9ed326c
files memtest/stuff/pack memtest/stuff/unpack.S openssh-pam/receipt openssh/receipt sftp-server/receipt
line diff
     1.1 --- a/memtest/stuff/pack	Mon Sep 05 18:15:15 2016 +0200
     1.2 +++ b/memtest/stuff/pack	Fri Sep 09 12:06:28 2016 +0200
     1.3 @@ -3,17 +3,22 @@
     1.4  	set -- ${2:-bootloader.bin} ${3:-unpack.bin}
     1.5  	x=$(grep -s packed_syssize$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
     1.6  	[ -n "$x" ] && sed -i "s/XXXP/$((513+0x$x))/" $0 || sed -i "/XXXP$/d" $0
     1.7 -	x=$(grep -s original_syssize$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
     1.8 -	[ -n "$x" ] && sed -i "s/XXXO/$((513+0x$x))/" $0 || sed -i "/XXXO$/d" $0
     1.9 -	x=$(grep -s original_setupsize$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
    1.10 -	[ -n "$x" ] && sed -i "s/XXXS/$((516+0x$x))/" $0 || sed -i "/XXXS$/d" $0
    1.11 -	grep -q 83C60D ${3/.bin/.lst} && sed -i 's/ | dd bs=1 skip=13//' $0
    1.12 +	x=$(grep -s setup_byte$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
    1.13 +	[ -n "$x" ] && sed -i "s/XXXSB/$((513+0x$x))/" $0 || sed -i "/XXXSB/d" $0
    1.14 +	x=$(grep -s setup_word$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
    1.15 +	[ -n "$x" ] && sed -i "s/XXXSW/$((514+0x$x))/" $0 || sed -i "/XXXSW/d" $0
    1.16 +	x=$(grep -s setup_para$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
    1.17 +	[ -n "$x" ] && sed -i "s/XXXSP/$((514+0x$x))/" $0 || sed -i "/XXXSP/d" $0
    1.18 +	x=$(grep -s setup_seg$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
    1.19 +	[ -n "$x" ] && sed -i "s/XXXSS/$((513+0x$x))/" $0 || sed -i "/XXXSS/d" $0
    1.20 +	grep -q BFF401 ${2/.bin/.lst} && sed -i 's/512 skip/500 skip/;s/1000 -/&32 - /' $0
    1.21 +	grep -q 83C60D ${2/.bin/.lst} && sed -i 's/ | dd bs=1 skip=13//' $0
    1.22  	helpmsg=$(sed '/helpmsg:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d')
    1.23  	helpend=$(sed '/helpend:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d')
    1.24  	sed -i "s/YYY/$((0x$helpmsg))/" $0
    1.25  	sed -i "s/ZZZ/$((0x$helpend-0x$helpmsg-1))/" $0
    1.26  	cat >> $0 <<EOM
    1.27 -$(dd if=$1 bs=512 count=1 conv=sync | cat - $2 | gzip -9 | uuencode -m -)
    1.28 +$(dd if=$1 bs=512 count=1 conv=sync 2> /dev/null | cat - $2 | gzip -9 | uuencode -m -)
    1.29  EOT
    1.30  EOM
    1.31  	sed -i '/--build/,/^fi/d' $0
    1.32 @@ -42,12 +47,13 @@
    1.33  	[ $setup -eq 0 ] && setup=4
    1.34  	syssize="$(echo $(od -j 500 -N 2 -dAn $1))"
    1.35  	[ $syssize -eq 0 ] && syssize=$((($(stat -c %s $1) + 15 - 512*($setup + 1))/16))
    1.36 -	store $syssize $2 XXXO
    1.37 -	store $setup $2 XXXS 1
    1.38 -	dd if=$1 bs=512 count=$setup skip=1 | compress >>$2
    1.39 -	dd if=$1 bs=16 count=$syssize skip=$((32*(1+$setup))) | compress >>$2
    1.40 +	store $setup $2 XXXSB 1
    1.41 +	store $setup $2 XXXSW 1
    1.42 +	store $((32 * $setup)) $2 XXXSP
    1.43 +	store $((0x1000 - 32*$setup)) $2 XXXSS 
    1.44 +	dd if=$1 bs=512 skip=1 | compress >>$2
    1.45  	size=$(stat -c %s $2)
    1.46 -	store $((($size-2560+15)/16)) $2 XXXP
    1.47 +	store $((($size-2560+15)/16 + 0x1000)) $2 XXXP
    1.48  	store $((($size-2560+15)/16)) $2 500
    1.49  	store 4 $2 497 1
    1.50  	store $((($size+511)/512)) $2 4
     2.1 --- a/memtest/stuff/unpack.S	Mon Sep 05 18:15:15 2016 +0200
     2.2 +++ b/memtest/stuff/unpack.S	Fri Sep 09 12:06:28 2016 +0200
     2.3 @@ -1,17 +1,16 @@
     2.4  #define TOP		(0x90000+_start-end)
     2.5  #define SYSTEM		0x10000
     2.6 -#define SETUP		4
     2.7 +#define SETUP		14
     2.8  #define SYSSIZE		0x1F4
     2.9  #define SETUPSIZE	0x1F1
    2.10  
    2.11 -#define CHANGE_STACK		0
    2.12  #define LINUX_HEADER		0
    2.13  #define UPDATE_SYSSIZE		1
    2.14  #define HARDCODED_SYSSIZE	1
    2.15  #define HARDCODED_SETUPSIZE	1
    2.16 -#define HARDCODED_IP		1
    2.17  #define FLAT16			1
    2.18  //#define FLAT16OUT		0
    2.19 +#define SAVEREGS		0 
    2.20  
    2.21  	.text
    2.22  	.code16
    2.23 @@ -35,173 +34,176 @@
    2.24  	.long	0		// 220 bootsect_kludge
    2.25  start2:
    2.26  #endif
    2.27 -	pushf
    2.28 +#if SAVEREGS
    2.29 +	pushfw
    2.30  	pushw	%cs
    2.31 -#if HARDCODED_IP
    2.32  	pushw	$0
    2.33 +	pushal
    2.34 +	pushw	%ds
    2.35  #else
    2.36 -	call	getip
    2.37 -getip:
    2.38 +	pushw	%cs
    2.39 +	pushw	$0
    2.40  #endif
    2.41 -	pushal
    2.42 -#if !FLAT16
    2.43 -#undef FLAT16
    2.44 -#if HARDCODED_SYSSIZE
    2.45 -packed_syssize:
    2.46 -	movw	$0, %bx		// system size
    2.47 +#if UPDATE_SYSSIZE
    2.48 +	pushw	%ds
    2.49  #else
    2.50 -	movw	SYSSIZE, %bx
    2.51 +	pushw	%es
    2.52 +	pushw	%cs
    2.53  #endif
    2.54 -#endif
    2.55 -#if HARDCODED_SETUPSIZE == 0
    2.56 -	xorw	%dx, %dx
    2.57 -	movb	SETUPSIZE, %dh
    2.58 -#endif
    2.59 -#if HARDCODED_IP
    2.60 +	cld
    2.61 +#if FLAT16
    2.62 +# 1- move 9020..9020+stp -> 8000
    2.63 +# if HARDCODED_SETUPSIZE
    2.64 +setup_word:
    2.65 +	movw	$SETUP*256, %cx
    2.66 +# else
    2.67 +	xorw	%cx, %cx
    2.68 +	movb	SETUPSIZE, %ch
    2.69 +	movw	%cx, %dx
    2.70 +# endif
    2.71 +	pushw	%cx
    2.72 +	pushw	$0x8000
    2.73 +	popw	%es
    2.74  	xorw	%si, %si
    2.75 -#else
    2.76 -	movw	%sp, %bp
    2.77 -#define START_IP	32(%bp)
    2.78 -	subw	$getip-_start, START_IP
    2.79 -	movw	START_IP, %si
    2.80 -#endif
    2.81 -	pushw	%ds
    2.82 +	xorw	%di, %di
    2.83 +	rep
    2.84 +	  movsw	%cs:(%si),%es:(%di)
    2.85  	pushw	%es
    2.86 -
    2.87 -	cld
    2.88 -
    2.89 -#if FLAT16
    2.90 -flat16mv:
    2.91 -#if CHANGE_STACK
    2.92 -STKSZ=0x9000-0x0990
    2.93 -	pushw	$(TOP-STKSZ)/16-0x1000
    2.94 -#else
    2.95 -	pushw	$TOP/16-0x1000
    2.96 -#endif
    2.97 -	popw	%es
    2.98 -	pushw	%es			// moved
    2.99 -	.byte	0x6A, moved-_start	//   unpack code
   2.100 -	pushw	%cs
   2.101 -	popw	%ds	
   2.102 -	xorw	%di, %di
   2.103 -#if HARDCODED_SETUPSIZE
   2.104 -	movw	$SETUP*256, %cx
   2.105 -#else
   2.106 -	xorw	%cx, %cx
   2.107 -	movw	SETUPSIZE, %ch
   2.108 -#endif
   2.109 -	pushw	%si
   2.110 -	rep
   2.111 -	movsw			// move header part
   2.112 -	movw	$0x1000, %bp
   2.113 -	movw	%bp, %ds
   2.114 +	// pushw	$cont
   2.115 +	.byte	0x6A, cont
   2.116 +	lret
   2.117 +cont:
   2.118 +# 2- move 1000..1000+sys -> 8000+stp
   2.119 +	pushw	$0x1000
   2.120 +	popw	%ds
   2.121  	xorw	%si, %si
   2.122  	subw	%di, %cx
   2.123  	rep
   2.124 -	movsb			// move system part
   2.125 -	popw	%di
   2.126 -	movw	$end-_start, %si
   2.127 -#else	
   2.128 -#if CHANGE_STACK
   2.129 -STKSZ=0x9000-0x0990
   2.130 -	movw	$(TOP-STKSZ)/16, %ax
   2.131 +	  movsb
   2.132 +# 3- unlz(8000+stp:end, 1000-stp:0)
   2.133 +	pushw	%es
   2.134 +# if HARDCODED_SETUPSIZE
   2.135 +setup_seg:
   2.136 +#  if UPDATE_SYSSIZE
   2.137 +	pushw	$0x1000-(SETUP*32)-32
   2.138 +#  else
   2.139 +	pushw	$0x1000-(SETUP*32)
   2.140 +#  endif
   2.141 +	popw	%es
   2.142 +# else
   2.143 +#  if UPDATE_SYSSIZE
   2.144 +	incb	%dh
   2.145 +#  endif
   2.146 +	shrw	$3, %dx
   2.147 +	movw	%ds, %ax
   2.148 +	subw	%dx, %ax
   2.149 +	movw	%ax, %es
   2.150 +# endif
   2.151  #else
   2.152 -	movw	$TOP/16, %ax
   2.153 -#endif
   2.154 -	movw	%ax, %es
   2.155 -	pushw	%es			// moved
   2.156 -	.byte	0x6A, moved-_start	//   unpack code
   2.157 -	pushw	%cs
   2.158 -	popw	%ds	
   2.159 +# 1- move 1000..1000+sys -> 9000-sys
   2.160 +# if HARDCODED_SYSSIZE
   2.161 +packed_syssize:
   2.162 +	movw	$0x1000+0, %ax
   2.163 +# else
   2.164 +	movw	SYSSIZE, %ax
   2.165 +	addw	$0x1000, %ax
   2.166 +# endif
   2.167 +	movw	%ds, %dx
   2.168 +mvsys:
   2.169 +	decw	%ax
   2.170 +	decw	%dx
   2.171 +	movw	%ax, %ds
   2.172 +	movw	%dx, %es
   2.173 +	xorw	%si, %si
   2.174 +	xorw	%di, %di
   2.175 +	movw	$8, %cx
   2.176 +	rep
   2.177 +	  movsw
   2.178 +	cmpw	$0x1000, %ax
   2.179 +	jne	mvsys
   2.180 +# 2- move 9020..9020+stp -> 9000-sys-stp
   2.181 +	
   2.182 +# if HARDCODED_SETUPSIZE
   2.183 +setup_byte:
   2.184 +	movb	$SETUP, %ch
   2.185 +setup_para:
   2.186 +	subw	$SETUP*32, %dx
   2.187 +# else
   2.188 +	movb	%ss:SETUPSIZE, %ch
   2.189 +	movw	%cx, %ax
   2.190 +	shrw	$3, %ax
   2.191 +	subw	%ax, %dx
   2.192 +# endif
   2.193 +	pushw	%cx
   2.194 +	movw	%dx, %es
   2.195 +	xorw	%si, %si
   2.196 +	xorw	%di, %di
   2.197 +	rep
   2.198 +	  movsw	%cs:(%si),%es:(%di)
   2.199 +	pushw	%es
   2.200 +# 3- reloc itself in 0x7C00
   2.201 +	pushw	$0x07C0
   2.202 +	popw	%es
   2.203 +	xorw	%si, %si
   2.204  	xorw	%di, %di
   2.205  	movw	$end-_start, %cx
   2.206 -	pushw	%cx
   2.207 -	pushw	%si
   2.208  	rep
   2.209 -	movsb			// move upack code to $TOP
   2.210 -
   2.211 -	leaw	SYSTEM/16(%bx), %bp
   2.212 -movlp:
   2.213 -	decw	%bp
   2.214 -	movw	%bp, %ds
   2.215 -	decw	%ax
   2.216 +	  movsb	%cs:(%si),%es:(%di)
   2.217 +	pushw	%es
   2.218 +	// pushw	$cont
   2.219 +	.byte	0x6A, cont
   2.220 +	lret
   2.221 +cont:
   2.222 +# 4- unlz(9000-sys-stp:end, 1000-stp:0)
   2.223 +# if HARDCODED_SETUPSIZE
   2.224 +setup_seg:
   2.225 +#  if UPDATE_SYSSIZE
   2.226 +	pushw	$0x1000-(SETUP*32)-32
   2.227 +#  else
   2.228 +	pushw	$0x1000-(SETUP*32)
   2.229 +#  endif
   2.230 +	popw	%es
   2.231 +# else
   2.232 +	negw	%ax
   2.233 +#  if UPDATE_SYSSIZE
   2.234 +	addw	$0x1000-32, %ax
   2.235 +#  else
   2.236 +	addw	$0x1000, %ax
   2.237 +#  endif
   2.238  	movw	%ax, %es
   2.239 -	xorw	%si, %si
   2.240 +# endif
   2.241 +#endif
   2.242 +	popw	%ds
   2.243 +	movw	$end-_start, %si
   2.244 +#if UPDATE_SYSSIZE
   2.245 +	movw	$SYSSIZE, %di
   2.246 +#else
   2.247  	xorw	%di, %di
   2.248 -	movb	$8, %cl
   2.249 -	rep
   2.250 -	movsw			// move system part
   2.251 -	decw	%bx
   2.252 -	jnz	movlp
   2.253 -
   2.254 -	pushw	%cs
   2.255 +#endif
   2.256 +	pushw	%di
   2.257 +	pushw	%es
   2.258 +	call	unpack
   2.259  	popw	%ds
   2.260  	popw	%si
   2.261 -	xorw	%di, %di
   2.262 -#if HARDCODED_SETUPSIZE
   2.263 -	movb	$SETUP, %ch
   2.264 -	subw	$SETUP*32, %ax
   2.265 -#else
   2.266 -	movb	%dh, %ch
   2.267 -	shrw	$3, %dx
   2.268 -	subw	%dx, %ax
   2.269 -#endif
   2.270 -	movw	%ax, %es
   2.271 -	pushw	%si
   2.272 -	rep
   2.273 -	movsw			// move header part
   2.274 -	popw	%di
   2.275 -	popw	%si
   2.276 -#endif
   2.277 -	pushw	%es
   2.278 -	popw	%ds
   2.279 -	pushw	%cs
   2.280 -	popw	%es		// restore setup seg
   2.281 -	retf
   2.282 -
   2.283 -moved:
   2.284 -#if CHANGE_STACK
   2.285 -	movw	$STKSZ, %ax	// trick: %ss = %sp
   2.286 -	movw	%ss, %bx
   2.287 -	pushw	%ax
   2.288 -	popw	%ss
   2.289 -	xchgw	%ax, %sp
   2.290 -	pushw	%bx		// %ss
   2.291 -	pushw	%ax		// %sp
   2.292 -#endif
   2.293 -	pushw	%bp		// SYSTEM/16
   2.294 -	call	unpack		// unpack setup
   2.295 -	popw	%es
   2.296 -	xorw	%di,%di
   2.297 -	call	unpack		// unpack system
   2.298 -#if CHANGE_STACK
   2.299 -	popw	%ax		// %sp
   2.300 -	popw	%ss
   2.301 -	xchgw	%ax, %sp
   2.302 -#endif
   2.303 +	movw	%si, %di
   2.304 +	popw	%cx
   2.305  #if UPDATE_SYSSIZE
   2.306 -# if HARDCODED_SYSSIZE
   2.307 -original_syssize:
   2.308 -	movw	$0, %ax
   2.309 -# else
   2.310 -	addw	$15, %di
   2.311 -	shrw	$4, %di
   2.312 -	movw	%es, %ax
   2.313 -	addw	%di, %ax
   2.314 -	subw	$SYSTEM/16, %ax
   2.315 -# endif
   2.316 +// not need with memtest	movb	$(512-SYSSIZE)/2, %cl
   2.317  #endif
   2.318  	popw	%es
   2.319 +# 5- move 1000-stp..1000 -> 9020
   2.320 +	rep
   2.321 +	  movsw
   2.322 +#if UPDATE_SYSSIZE == 0
   2.323 +	popw	%es
   2.324 +#endif
   2.325 +#if SAVEREGS
   2.326  	popw	%ds
   2.327 -#if UPDATE_SYSSIZE
   2.328 -	movw	%ax, SYSSIZE
   2.329 -# if HARDCODED_SETUPSIZE
   2.330 -original_setupsize:
   2.331 -	movb	$4, SETUPSIZE
   2.332 -# endif
   2.333 -#endif
   2.334  	popal
   2.335  	iret
   2.336 +#else
   2.337 +	lret
   2.338 +#endif
   2.339  
   2.340  unpack:
   2.341  #define NO_LZMA_HEADER
     3.1 --- a/openssh-pam/receipt	Mon Sep 05 18:15:15 2016 +0200
     3.2 +++ b/openssh-pam/receipt	Fri Sep 09 12:06:28 2016 +0200
     3.3 @@ -1,7 +1,7 @@
     3.4  # SliTaz package receipt.
     3.5  
     3.6  PACKAGE="openssh-pam"
     3.7 -VERSION="7.1p2"
     3.8 +VERSION="7.3p1"
     3.9  CATEGORY="security"
    3.10  SHORT_DESC="Openbsd Secure Shell using PAM."
    3.11  MAINTAINER="pascal.bellard@slitaz.org"
     4.1 --- a/openssh/receipt	Mon Sep 05 18:15:15 2016 +0200
     4.2 +++ b/openssh/receipt	Fri Sep 09 12:06:28 2016 +0200
     4.3 @@ -1,7 +1,7 @@
     4.4  # SliTaz package receipt.
     4.5  
     4.6  PACKAGE="openssh"
     4.7 -VERSION="7.2p2"
     4.8 +VERSION="7.3p1"
     4.9  CATEGORY="security"
    4.10  SHORT_DESC="Openbsd Secure Shell."
    4.11  MAINTAINER="pascal.bellard@slitaz.org"
     5.1 --- a/sftp-server/receipt	Mon Sep 05 18:15:15 2016 +0200
     5.2 +++ b/sftp-server/receipt	Fri Sep 09 12:06:28 2016 +0200
     5.3 @@ -1,7 +1,7 @@
     5.4  # SliTaz package receipt.
     5.5  
     5.6  PACKAGE="sftp-server"
     5.7 -VERSION="7.2p2"
     5.8 +VERSION="7.3p1"
     5.9  CATEGORY="security"
    5.10  SHORT_DESC="Openbsd Secure FTP server."
    5.11  MAINTAINER="pascal.bellard@slitaz.org"