ChangeLog 121 KB
Newer Older
Niels Möller's avatar
Niels Möller committed
1 2 3 4 5
2002-03-20  Niels Mller  <nisse@cuckoo.hack.org>

	* src/io.c (address_info2sockaddr): Zero-terminate the
	default_preferences list.

Niels Möller's avatar
Niels Möller committed
6 7
2002-03-20  Niels Mller  <nisse@lysator.liu.se>

Niels Möller's avatar
Niels Möller committed
8 9 10
	* src/client_session.c (make_client_session_channel): Clear the
	CHANNEL_CLOSE_AT_EOF flag.

Niels Möller's avatar
Niels Möller committed
11 12 13 14 15 16 17 18 19 20
	* src/testsuite/run-tests (test_program): Test the exit status of
	the right process.

	* src/testsuite/fail-test: New, always failing, testcase. For
	testing run-tests.

	* src/testsuite/functions.sh (at_connect): Don't use -- in
	argument list to mini-inetd, appearantly Solaris' getopt
	doesn't handle that. 

Niels Möller's avatar
Niels Möller committed
21 22 23 24 25 26 27
2002-03-19  Niels Mller  <nisse@lysator.liu.se>

	* src/io.c (address_info2sockaddr): Prefer AF_INET addresses over
	AF_INET6 (as it seems common that localhost has an ipv6 address
	that doesn't work). Even better would be to try all addresses, but
	that has to wait for later.

Pontus Freyhult's avatar
Pontus Freyhult committed
28 29 30 31 32 33 34
2002-03-19  Pontus Skld  <pont@docs.uu.se>

	* src/sftp/testsuite/*-test: grep -q is XPG4, which not all
	greps (notably Solaris /bin/grep) are.

	* src/sftp/testsuite/run-tests: Replaced bashims.
	
Pontus Freyhult's avatar
Pontus Freyhult committed
35 36 37 38 39 40 41 42
2002-03-19  Pontus Skld  <pont@it.uu.se>

	* src/testsuite/seed-test: Fixed bashism.

2002-03-19  Pontus Skld  <pont@it.uu.se>

	* src/testsuite/run-tests: Replaced bashims.

Pontus Freyhult's avatar
Pontus Freyhult committed
43 44 45 46 47 48 49
2002-03-19  Pontus Skld  <pont@it.uu.se>

	* src/unix_process.c: Added GETUTXID and UPDWTMPX.
	(do_utmp_cleanup): Write cleared entry to wtmp{,x} with
	updwtmp{,x} if logwtmp is not available.
	(utmp_book_keeping): Likewise.	 

Niels Möller's avatar
Niels Möller committed
50 51 52 53
2002-03-18  Niels Mller  <nisse@lysator.liu.se>

	* src/lsh-pam-checkpw.c: Include stdlib.h.

Niels Möller's avatar
Niels Möller committed
54 55
2002-03-18  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
56 57 58 59 60 61 62 63 64 65 66 67
	* src/testsuite/conv-3-test: New test program.

	* contrib/lshd.debian.init: Check for existance of
	/var/spool/lsh/yarrow-seed-file.
	(restart): New target, which sends SIGHUP to the running lshd and
	then starts a new one.

	* src/testsuite/runtests: Old testscript removed.

	* src/testsuite/Makefile.am (check-some, check-more): Use
	run-tests, not runtests.

Niels Möller's avatar
Niels Möller committed
68 69 70
	* src/io.c (io_run): Check for OOP_ERROR. This means we need at
	least liboop-0.8. 

Niels Möller's avatar
Niels Möller committed
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
	* src/server_userauth.c (do_handle_userauth): Free username on
	failure. 

	* src/server_publickey.c (do_authenticate): Free username and
	keyblob on failure. 

	* src/lshd.c (lshd_options): New field resources, that keeps track
	of resources to be killed at sighup or program exit.
	(make_lshd_options): Create the resource list, and register it
	with the gc.
	(pid_file_resource): New class.
	(sighup_close_callback): New class.
	(do_sighup_close_callback): New SIGHUP handler.
	(make_sighup_close_callback): New function.
	(close_on_sighup): New command.
	(make_lshd_listen): Close listen socket on SIGHUP.
	(do_terminate_callback): Always catch SIGTERM.
	(install_signal_handlers): Renamed the function
	install_terminate_handler. Now installs handlers for both SIGHUP
	and SIGTERM.
	(main): Arrange for the pidfile to be deleted at exit or SIGHUP.

	* src/io.c (nfiles): New global variable.
	(lsh_oop_stop_callback): New function.
	(lsh_oop_stop): New function.
	(lsh_oop_cancel_stop): New function.
	(io_nfiles): New function.
	(close_fd): Decrement nfiles, and call lsh_oop_stop when no files
	are left. 
	(make_lsh_fd): Increment nfiles.

	* src/format.c (ssh_format): Use the format string as the
	debugging "clue" for the string.

	* configure.in (CFLAGS): Don't use -ggdb3, as it seems to be
	broken on sparc.

	* src/unix_process.c: Unified utmp/utmpx code.

Pontus Freyhult's avatar
Pontus Freyhult committed
110 111
2002-03-18  Pontus Skld  <pont@it.uu.se>

Pontus Freyhult's avatar
Pontus Freyhult committed
112 113 114
	* src/unix_process.c: Make certain WTMP_FILE and WTMPX_FILE are
	defined.

Pontus Freyhult's avatar
Pontus Freyhult committed
115 116 117 118
	* configure.in: Can't check for structs with AC_CHECK_MEMBER,
	check for a sub member instead.

	* src/unix_process.c (do_utmp_cleanup): Rewrote to use utmpx if
Niels Möller's avatar
Niels Möller committed
119
	both utmpx and utmp is available. Also, don't search for an
Pontus Freyhult's avatar
Pontus Freyhult committed
120 121 122 123 124 125 126
	existing entry but construct a new one and putut{,x}line it.
	Don't clear fields explicitly (the memset).
	
	(utmp_book_keeping): Prefer utmpx, and don't search for existing
	entries.
	Bugfix: gettimeofday takes two arguments, pass 0 as second (timezone).

Pontus Freyhult's avatar
Pontus Freyhult committed
127 128
2002-03-18  Pontus Skld <pont@it.uu.se>

Pontus Freyhult's avatar
Pontus Freyhult committed
129
	* configure.in: Check for utmpx symmetrically to utmp. Check for
Pontus Freyhult's avatar
Pontus Freyhult committed
130 131
	more members of struct utmp. Check for members of struct utmpx.

Niels Möller's avatar
Niels Möller committed
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
2002-03-18  Niels Mller  <nisse@cuckoo.hack.org>

	* src/lsh-keygen.c (main): Updated to use the rewritten
	rsa_generate_key. 

2002-03-17  Niels Mller  <nisse@cuckoo.hack.org>

	* src/rsa_keygen.c (rsa_generate_key): Rewrote to use nettle's RSA
	key generation. Deleted the argument E.

	* src/lsh-writekey.c (main_argp_parser): Initialize a randomness
	generator only if needed (i.e. if the key is going to be
	encrypted), and let the --server determine which seed-file is
	used. 

	* src/lsh-writekey.c (main): New option --server, that writes the
	output files where the server expects its host key.

	* src/lsh-writekey.c (main): Check that files doesn't exist before
	reading the key, but don't create the files until they are
	actually written to.
	(file_exists): New fucntion.
	(check_file): New function.
	(open_file): New function.
	(open_private_file): Deleted function.
	(open_public_file): Deleted function.

	* src/lsh-keygen.c (do_lsh_keygen_handler): Deleted obsolete
	function.

	* src/lsh-keygen.c (main): New option --server, that uses the
	server's seed-file.

	* src/unix_user.c (safe_close): New function.
	(do_spawn): Avoid close(-1).

168 169 170 171 172 173 174
2002-03-17  Pontus  <pont@it.uu.se>

	* src/unix_process.c (do_utmp_cleanup): Set ut_type to
	USER_PROCESS before calling getutid (neccessary on my Linux
	system, and shouldn't break anything). Make a working copy to
	modify. Do some logging.

Niels Möller's avatar
Niels Möller committed
175 176
2002-03-16  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
	* src/unix_user.c (exec_shell): Bugfix, fixed test for login-mode.

	* src/unix_process.c (do_utmp_cleanup): Compute suitable values
	for ut_line and ut_id.
	(strip_tty_name): Deleted function.
	(do_utmp_cleanup): Modify utmp by setutmp, getutid, pututline.
	(utmp_book_keeping): Likewise.

	* configure.in (SCHEME_NAME): Simple check for gmp.h, don't look
	for gmp2/gmp.h.
	Check for ut_time, ut_tv, ut_pid and ut_exit memebers in struct
	utmp. 
	Check for __gmpz_getlimbn, introduced in gmp-3.1. Dropped support
	for gmp2 (as Nettle doesn't support it anyway).

	* src/unix_user.c (do_chdir_home): Deleted function.
	(change_uid): Deleted function.

	* src/unix_process.c (unix_process_setup): Removed login argument
	again. 
	(utmp_book_keeping): Always create utmp entries as USER_PROCESS,
	not LOGIN_PROCESS.

Niels Möller's avatar
Niels Möller committed
200 201 202 203 204 205 206 207 208 209 210 211 212 213
	* src/unix_user.c (do_fork_process): Deleted function.
	(do_exec_shell): Deleted function.

	* src/userauth.h (USER_CHDIR_HOME): Deleted method.
	(USER_FORK): Deleted method.
	(USER_EXEC): Deleted method.

	* src/unix_user.c (make_process_resource): Deleted old code.

	* src/server_session.c (spawn_process): Deleted old code.
	(shell_request_handler): Likewise.
	(exec_request_handler): Likewise.
	(do_spawn_subsystem): Likewise.

Niels Möller's avatar
Niels Möller committed
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
	* src/server_session.c (format_exit_signal): Removed "Process
	killed by" from the message.
	(spawn_process): Rewrote function, using USER_SPAWN and struct
	spawn_info. Updated the shell_request, exec_request and
	subsystem_request handlers.
	(init_spawn_info): New function.
	(do_spawn_subsystem): Fixed argument list, should be -c <program>. 

	* src/unix_user.c (exec_shell): Added the real login shell to the
	lsh-execuv argument list.
	(do_spawn): Bug fix, don't reference info->pty->tty_name if
	info->pty is NULL.
	(make_unix_user): Initialize the spawn pointer.

	* src/unix_process.c: Added some trace calls.

Niels Möller's avatar
Niels Möller committed
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
2002-03-15  Niels Mller  <nisse@cuckoo.hack.org>

	* src/userauth.h (struct spawn_info): Struct with information for
	the new USER_SPAWN method.
	(USER_SPAWN): New method.

	* src/unix_user.c (chdir_home): New function.
	(exec_shell): New function.
	(do_spawn): New function.
	#if:ed out code that has been moved to unix_process.c.
	(do_lookup_user): Use /bin/sh as login shell if there's no login
	shell in the passwd-database.

	* src/unix_process.c (unix_process_setup): Adding login argument,
	which should be non-zero for a login session.

	* src/reaper.h (reap): Deleted this super class. Updated users.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added unix_process.c.
	(lsh_execuv_LDADD): lsh-execuv need not be linked with liblsh.

	* configure.in: Check for more utmp related functions.

2002-03-14  Niels Mller  <nisse@cuckoo.hack.org>

	* src/unix_process.c: New file, to replace the process stuff in
	unix_user.c

258 259 260 261
2002-03-14  Pontus  <pont@it.uu.se>

	* configure.in: Added check for libpam if PAM is enabled. 

Niels Möller's avatar
Niels Möller committed
262 263
2002-03-14  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
264
	* src/resource.h (REMEMBER_RESOURCE): Deleted method, use an
Niels Möller's avatar
Niels Möller committed
265
	ordinary fucntion remember_resource instead. Updated all callers.
Niels Möller's avatar
Niels Möller committed
266 267 268 269 270

	* src/resource.c (concrete_resource_list): Deleted class, put all
	information directly in the resource_lsit class.
	(remember_resource): New public function.

Niels Möller's avatar
Niels Möller committed
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
	* configure.in: Removed check for 8-bit clean m4.

	* src/channel.c (do_channels_after_keyexchange): New function.
	(init_connection_service): Call connection_after_keyexchange, to
	start reading again after a key exchange.

	* src/gateway_channel.c (do_send_adjust): Call FLOW_CONTROL_REPORT
	only if i > 0.

	* src/handshake.c (handshake_command): Call
	connection_after_keyexchange.

	* src/connection.h (ssh_connection): Renamed established attribute
	to keyexchange_done.

	* src/connection.c (make_ssh_connection): Deleted the continuation
	argument. 
	(connection_after_keyexchange): New function.

	* src/read_data.c (do_read_data_query): Check the connection's
	send_kex_only flag.

	* src/keyexchange.c (keyexchange_finish): Moved invocation of
	connection->established... 
	* src/connection.c (connection_send_kex_end): ...to here.

	* src/resource.c (do_remember_resource): Assert that resource is
	non-NULL.

	* src/keyexchange.c (send_kexinit): Create a new kexinit struct.
	Disable key-expire timer during the key exchange.
	(make_kexinit_handler): Deleted init argument, it's now stored
	with the connection.
	(SESSION_KEY_LIFETIME_CLIENT, SESSION_KEY_LIFETIME_SERVER): New
	constants. 
	(do_handle_newkeys): Install key expire timeout.
	(set_reexchange_timeout): New function.

	* src/io.c (lsh_oop_register_callout, lsh_oop_cancel_callout):
	Added trace call.

	* src/handshake.c (handshake_command): Store the make_kexinit
	object in the connection's kexinit attribute.

	* src/connection.h (ssh_connection): New attribute kexinit, needed
	for initiating keyexchange. 

	* src/algorithms.c (all_crypto_algorithms): Prefer aes256.
	(default_crypto_algorithms): Likewise.

	* src/Makefile.am.in (EXTRA_PROGRAMS): Added lsh-pam-checkpw.

Niels Möller's avatar
Niels Möller committed
323 324
2002-03-13  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
325 326 327 328 329 330
	* src/keyexchange.c (send_kexinit): Renamed from
	initiate_keyexchange. Updated callers. Disable the key re-exchange
	timer.
	(do_handle_kexinit): Call send_kexinit, instead of duplicating
	it. 

Niels Möller's avatar
Niels Möller committed
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
	* src/testsuite/Makefile.am (TS_PROGS): Added parse-config-test.

	* src/string_buffer.c (string_buffer_putc): New constant
	BUFFER_INCREMENT. Code still not used.

	* src/ssh.h (SSH_FIRST_KEYEXCHANGE_SPECIFIC): New constant.

	* src/parse_config.c (parse_setting): Return a status code, to get
	the handling of ignored keywords right. Updated callers.
	(parse_hosts): Return a status code. Updated callers.

	* src/lshg.c (do_lshg_send_ignore): Use C_WRITE_NOW.

	* src/keyexchange.c (initiate_keyexchange): Call
	connection_send_kex_start. Use C_WRITE_NOW.
	(do_handle_kexinit): Likewise.
	(do_handle_newkeys): For uniformity, reset the NEWKEYS handler to
	&connection_fail_handler, even though NULL should work fine.
	(keyexchange_finish): Use C_WRITE_NOW. Call
	connection_send_kex_end. #if:ed out the code sending DEBUG
	messages at this point.

	* src/handshake.c (compat_info): SSH-3.0 still needs the
	PEER_SEND_NO_DEBUG flag. Also updated code to use the the
	peer_flag enum.

	* src/client_keyexchange.c (do_init_client_dh): Use C_WRITE_NOW.
	(do_handle_srp_reply): Likewise.
	(do_init_client_srp): Likewise.
	* src/server_keyexchange.c (do_handle_dh_init): Likewise.
	(do_srp_server_proof_handler): Likewise.
	(do_server_srp_read_verifier): Likewise.

	* src/config_parse.y: Deleted file, use a recursive-descent parser
	instead. 
	
	* src/Makefile.am.in (liblsh_a_SOURCES): Added parse_config.c.
	Removed disconnect.c

	* src/disconnect.c, src/disconnect.h: Deleted files, code moved to
	connection.c.

	* src/debug.c (send_debug_message): Use C_WRITE_NOW.
	(send_debug, send_verbose): #if:ed out fucntions.

	* src/connection.h (enum connection_flag, enum peer_flag, enum
	kex_state): New enum types.
	(C_WRITE_NOW): New macro.

	* src/connection.c (connection_handle_packet): Don't allow random
	messages during key exchange.
	(connection_disconnect_handler, format_disconnect): Moved code
	from disconnect.c.
	(connection_send): New function, queueing messages during key
	exchange. 
	(connection_send_kex_start): New function.
	(connection_send_kex_end): New function.

2002-03-11  Niels Mller  <nisse@cuckoo.hack.org>

	* src/testsuite/testutils.h: Include werror.h.

	* src/testsuite/parse-config-test.c: New file.

	* src/parse_config.c: Work in progress. Added linenumber handling
	and comments.

Niels Möller's avatar
Niels Möller committed
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429
2002-03-05  Niels Mller  <nisse@cuckoo.hack.org>

	Cleaned up the bug compatibility tests.
	* src/handshake.c (compat_peer_flags): New function.
	(do_line): Call compat_peer_flags.

	* src/abstract_crypto.c (hash_string): Declare the input string as
	const. 
	(mac_string): Likewise.

	* src/testsuite/testutils.c (test_hash): New function.
	(test_mac): New function.
	(test_sign): New function.
	(do_bad_random): New function, stupid randomness source for the
	test programs to use.
	(test_spki_match, test_spki_grant, test_spki_deny): New functions.

	* src/testsuite/run-tests: Improved testscript, copied from
	nettle/testsuite. 

	* src/testsuite/testutils.c: Utility functions used by test
	programs. 

	Don't use m4 to generate test programs. Added C files to CVS,
	deleted m4 files. 
	* src/testsuite/Makefile.am: Deleted m4 files and rules.

2002-03-04  Niels Mller  <nisse@cuckoo.hack.org>

	* src/parse_config.c, src/parse_config.h: New files. A lexer and a
	recursive-descent parser for config files.

Niels Möller's avatar
Niels Möller committed
430 431
2002-02-27  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
432 433
	* src/config_parse.y: New file, for parsing config files.

Niels Möller's avatar
Niels Möller committed
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458
	* src/unix_interact.c (do_make_raw): Modify the terminal's VMIN
	and VTIME values.

	* src/io.c (io_callout): Added an argument, the number of seconds
	until the callout should be invoked.

	* src/handshake.c (handshake_command): Make the connection timeout
	if handshake is not completed within 10 minutes.

	* src/gc.c (gc_register): Updated call of io_callout.

	* src/connection.c (connection_set_timeout): New function.
	(connection_clear_timeout): New function.

	* src/channel.c (init_connection_service): Cancel the connection's
	timeout timer. 

2002-02-22  Niels Mller  <nisse@cuckoo.hack.org>

	* src/client.c (init_client_options): Initialize port to NULL, in
	order to get the fallback from "ssh" -> 22 to work. FIXED in 1.2
	branch.
	(client_argp_parser): Fixed port error message not to try printing
	NULL. FIXED in 1.2 branch.

Niels Möller's avatar
Niels Möller committed
459 460 461 462 463 464 465 466 467 468 469
2002-02-21  Niels Mller  <nisse@cuckoo.hack.org>

	* src/server_session.c (make_pty): Simple bugfix, pty->master was
	lost too early.
	(spawn_process): Use an extra pipe for syncronization. The parent
	process won't proceed until the child is finished with it's pty
	processing. This works around a Solaris problem where reading the
	master side of the pty before the slave has been opened results in
	EINVAL. 
	(do_alloc_pty): Bugfix, record the new pty properly.

Niels Möller's avatar
Niels Möller committed
470 471
2002-02-19  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492
	* src/server_session.c (spawn_process): Let the child process open
	the slave side of the pty.
	(do_alloc_pty): Don't open or touch the slave side of the pty,
	just open the master side and store the mode of the client,a nd
	the window dimensions, in the pty_info struct for use later.

	* src/server_pty.c (do_kill_pty_info): Don't touch slave tty (as
	it's not opened yet).
	(pty_open_master): Renamed the pty_allocate function. Now opens
	only the master pty. Opening the slave as well has too many side
	effects, in particular, pushing the pty-related STREAMS modules
	on Solaris have the side effect of making the pty the controlling
	process of the lshd server (if it's running in daemonic mode).
	(pty_open_slave): Renamed function tty_setctty. Now responsible
	also for opening the slave side of the pty, pushing STREAMS
	modules, and setting the tty state.

	* src/server_pty.h: Include tty.h.
	(pty_info)): Deleted slave attribute. Added attributes dims and
	mode. 

Niels Möller's avatar
Niels Möller committed
493 494
	* configure.in (CPPFLAGS): Don't zap old value.

Niels Möller's avatar
Niels Möller committed
495 496 497
	* src/crypto.c (make_aes_cbc_instance): Use aes_set_encrypt_key
	and aes_set_decrypt_key. aes_set_key is obsolete.

Niels Möller's avatar
Niels Möller committed
498 499
2002-02-07  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
500 501
	* src/sftp/.bootstrap: Added -a flag to automake invocation.

Niels Möller's avatar
Niels Möller committed
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604
	* src/sftp/sftp_c.c: Constness fixes.

	* src/sftp/sftp_bind.c (lsftp_open_connection): Bugfix, don't use
	i and i++ in the same expression.
	(lsftp_wait_not_eof): #if:ed out, not used anywhere.
	(lsftp_remove_sftp_cb): Likewise.
	Constness fixes, changed calling conventions not to pass and
	return structs.
	
	* src/sftp/lsftp.c (lsftp_num_commands): Declared function static. 
	(lsftp_interactive_mainloop): Likewise.
	(lsftp_noninteractive_mainloop): Likewise.

	* src/sftp/dc.c (lsftp_dc_free_index): Made function static.
	(lsftp_dc_make_index): Likewise.
	(lsftp_dc_r_sloppy_glob): Likewise.
	(lsftp_dc_path_no_glob): Likewise.
	(lsftp_dc_path_first_glob): Likewise.
	General constification.

	* src/sftp/commands.c: Constification. Fixed warnings for mising
	prototypes and unused arguments. 

	* src/sftp/commands.h (command_func): New typedef.

	* src/sftp/rl.c, src/sftp/rl.h: Fixed prototypes for funtions
	taking no arguments.

	* src/sftp/misc_fun.c (mgetenv): Fixed "valren" typo.
	(lsftp_skip_common): Use const char * for arguments and return
	value. 
	(filename_part): Likewise.

	* src/sftp/str_utils.c (lsftp_unqoute): #if:ed out, this function
	isn't used anywhere.
	Constified, now	uses const char * for most strings.

	* src/sftp/sftp_c.h (struct sftp_mem): Use UINT32, instead of
	signed int.
	(sftp_callback_func): New typedef.
	(struct sftp_callback): Changed prototype for nextfun. Changed
	UINT64 to off_t.
	Changed all prototypes to not pass and return structs without
	using pointers.

	* src/sftp/sftp_c.c: General change of calling conventions. Pass
	struct * and const struct *, instead of passing and returning
	structures "by-value".

	* src/sftp/buffer.c (sftp_packet_size): New function.
	(sftp_read_packet): Call clearerr after checking for error and
	eof.

2002-02-06  Niels Mller  <nisse@cuckoo.hack.org>

	Checked in Pontus Skld's lsftp client.
	* src/sftp/Makefile.am (lsftp_SOURCES): New make variable.
	* src/sftp/commands.c: New file.
	* src/sftp/commands.h: New file.
	* src/sftp/dc.c: New file.
	* src/sftp/dc.h: New file.
	* src/sftp/lsftp.c: New file.
	* src/sftp/lsftp.h: New file.
	* src/sftp/misc_fun.c: New file.
	* src/sftp/misc_fun.h: New file.
	* src/sftp/rl.c: New file.
	* src/sftp/rl.h: New file.
	* src/sftp/sftp_bind.c: New file.
	* src/sftp/sftp_bind.h: New file.
	* src/sftp/sftp_c.c: New file.
	* src/sftp/sftp_c.h: New file.
	* src/sftp/str_utils.c: New file.
	* src/sftp/str_utils.h: New file.
	
2002-02-01  Niels Mller  <nisse@cuckoo.hack.org>

	* src/sftp/sftp-test-client.c: Deleted old code.
	(sftp_client_get_status): New function, for parsing -02 draft
	status messages. Use it everywhere.	

	Applied Pontus Skld's patch to comply with the -02 draft.
	* src/sftp/sftp-server.c (sftp_send_status): Added human-readable
	message and language tag. 
	(sftp_process_mkdir): Get file attributes from the message, and
	honor permission bits, if available.
	(sftp_process_readlink): New function.
	(sftp_process_symlink): New function.
	(main): Added sftp_process_readlink and sftp_process_symlink to
	the dispatch table.

	* src/sftp/sftp.h (SSH_FXP_READLINK, SSH_FXP_SYMLINK): New message
	types. 

2002-01-31  Niels Mller  <nisse@cuckoo.hack.org>

	* src/lsh-pam-checkpw.c: Cosmetic changes.

	* src/Makefile.am.in (sbin_PROGRAMS): Added @PAM_PROGRAM@.

	* configure.in: PAM configuration. Command line option
	--disable-pam, check for security/pam_appl.h, substitution of
	PAM_PROGRAM. 

Niels Möller's avatar
Niels Möller committed
605 606 607 608
2002-01-31  Niels Mller  <nisse@lysator.liu.se>

	* src/lsh-writekey.c (open_public_file): Fixed error message.

Niels Möller's avatar
Niels Möller committed
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627
2002-01-24  Niels Mller  <nisse@cuckoo.hack.org>

	* src/sexp.c (sexp_format): Add a newline at the end of
	expressions in transport syntax.

	* src/sexp-conv.c (process_replace): New function.
	(parse_replace): New function.
	(main_options): New option --replace.
	(main_argp_parser): Handle OPT_REPLACE.
	(main): Call io_init and io_final. Needed to get the callback
	registered by the gc to work.
	(main): Call process_replace.
	(main): Don't add trailing newlines; let sexp_format do that.

	* src/io.c: Added assert checking that source is non-NULL, in
	functions that need it. 

	* src/gc.c (gc): Print a verbose message at the start of gc. 

Niels Möller's avatar
Niels Möller committed
628 629
2002-01-22  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
630 631 632
	* src/unix_interact.c (do_make_raw): Added FIXME: about tty TIME
	and VMIN settings.

Niels Möller's avatar
Niels Möller committed
633 634 635
	* src/scm/gaba.scm (make-class): Added FIXME:-comment about
	offsetof. 

Niels Möller's avatar
Niels Möller committed
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684
2002-01-21  Niels Mller  <nisse@cuckoo.hack.org>

	* src/xalloc.h (NEW_VAR_OBJECT, CLONE_VAR_OBJECT,
	CLONED_VAR_OBJECT): New macros. 

	* src/xalloc.c (lsh_var_alloc): New function.
	(lsh_object_alloc): Use lsh_var_alloc.
	(lsh_var_clone): New function.
	(lsh_object_clone): Use lsh_var_clone.

	* src/list.c (lsh_list_alloc): Moved function here, from xalloc.c.
	Now uses lsh_var_alloc.

2002-01-20  Niels Mller  <nisse@cuckoo.hack.org>

	* src/crypto.c (hash_update, hash_digest, hash_copy, make_hash):
	New functions using struct nettle_hash.
	(make_hmac_algorithm): Reorganized hmac implementation again. Now
	uses struct nettle_hash.
	Updated all users.

	* src/algorithms.c (all_symmetric_algorithms): Changed back to use
	make_hmac_algorithm. 

	* src/abstract_crypto.h (hash_instance): Rewrote, use nettle,
	replaced methods with ordinary functions.
	(mac_instance): New class, before it was just analias for
	hash_instance.

	* src/Makefile.am.in (liblsh_a_SOURCES): Removed md5.c and sha.c. 

2002-01-17  Niels Mller  <nisse@cuckoo.hack.org>

	* src/md5.c, src/sha.c: Deleted files. The wrapper code was moved
	to crypto.c, and now uses struct nettle_hash.

2002-01-16  Niels Mller  <nisse@cuckoo.hack.org>

	* src/pkcs5-test.c (main): Use crypto_hmac_sha1_algorithm.

	* src/lock_file.c (do_lsh_file_lock): Improved error message.

	* src/algorithms.c (all_symmetric_algorithms): Don't use
	make_hmac_algorithm. 

	* src/crypto.c: Rewrote the hmac code to use Nettle.

	* src/hmac.c, src/Makefile.am.in: Deleted file hmac.c.

Niels Möller's avatar
Niels Möller committed
685 686
2002-01-14  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
687 688 689 690
	* src/rsa.c (make_rsa_signer): Take advantage of rsa_public_key
	and rsa_private_key being independent structs now. General cleanup
	and deletion of old code.

Niels Möller's avatar
Niels Möller committed
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725
	* src/spki.c (spki_hash_sexp): Bugfix, don't hash the data once.
	Bug reported by Werner Koch.

	* src/sexp_parser.c (sexp_parse): Added advanced-hex syntax, as an
	alias for the ordinary (but not implemented) advanced syntax.

	* src/sexp.c: Added new format "advanced-hex" that uses hex
	instead of base64.
	(encode_hex): New function.

	* src/rsa_keygen.c (rsa_generate_key): Renamed key type to
	"rsa-pkcs1". 

	* src/rsa.c: Use nettle's rsa implementation. Deleted support for
	rsa-md5. Needs some more cleanup.

	* src/publickey_crypto.h: Moved rsa-related declarations here.

	* src/rsa.h: rsa.h is now obsolete.

	* src/lsh.c (read_user_keys): Added ATOM_RSA_PKCS1.
	* src/server.c (read_host_key): Likewise.

	* src/format.c (format_hex_string): Export this function.

	* src/atoms.in: Added "rsa-pkcs1".

	* src/algorithms.c (all_signature_algorithms): Deleted support for
	rsa-md5. 

2002-01-13  Niels Mller  <nisse@cuckoo.hack.org>

	* configure.in (lsh_cv_c_attribute): Consider __FUNCTION__ broken
	in gcc-3.

Niels Möller's avatar
Niels Möller committed
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745
2002-01-09  Niels Mller  <nisse@cuckoo.hack.org>

	* src/dsa.c (dsa_hash): Don't call sha1_final.
	* src/dsa_keygen.c (hash): Likewise.

	* src/lsh.h (struct lsh_string_header): Empty structs are not
	allowed by ANSI-C, so don't declare this one unless debugging is
	enabled. 

	* src/lsh_proxy.c: Don't use randomness_with_poll.

	* src/lshd.c (main): Pass the correct type to make_simple_kexinit.

	* src/md5.c (do_md5_digest): Don't call md5_final and md5_init. 

	* src/sha.c (do_sha_digest): Don't call sha1_final and sha1_init. 

	* src/rsync/generate.c, src/rsync/receive.c, src/rsync/send.c:
	Removed calls of md5_final.

Niels Möller's avatar
Niels Möller committed
746 747 748 749
2001-12-16  Niels Mller  <nisse@cuckoo.hack.org>

	* Released lsh-1.3.6.

Niels Möller's avatar
Niels Möller committed
750 751 752 753 754 755 756 757 758 759 760
2001-12-16  Niels Mller  <nisse@lysator.liu.se>

	* src/lock_file.c: Include sys/types.h and sys/stat.h, needed on
	Solaris. 

2001-12-14  Niels Mller  <nisse@lysator.liu.se>

	* src/dsa_keygen.c (dsa_generate_key): Fixed declaration and code
	mixup. 
	* src/rsa_keygen.c (rsa_generate_key): Likewise.

Niels Möller's avatar
Niels Möller committed
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843
2001-12-14  Niels Mller  <nisse@cuckoo.hack.org>

	* src/testsuite/Makefile.am (CLEANFILES, DISTCLEANFILES): Added
	fiels generated by the test, in order to make make distcheck
	happy. 

	* src/used_headers: Update for automake-1.5, dependency files are
	now named foo.Po.

	* src/Makefile.am.in: Changed rules for prime_table.h and
	digit_table.h. Now they depend only on the source file, not on the
	executable. 

	* doc/lsh.texinfo (lsh-make-seed): New section.
	(Files and environment variables): Wrote a file list.

2001-12-12  Niels Mller  <nisse@cuckoo.hack.org>

	* doc/lsh.texinfo (Files and environment variables): Documented
	environment variables.

	* misc/make-dist: Deleted the strip_rsa function.

	* src/testsuite/functions.sh (LSH_YARROW_SEED_FILE): Export
	variable. Also create the seed file if needed.

	* src/testsuite/seed-test: Use the -q --sloppy flags when invoking
	lsh-make-seed. 

	* src/sexp.c (sexp_format): Add newline at the end of the
	"advanced" syntax representation. Changed all internal uses of
	sexp_format to use the method SEXP_FORMAT instead.

	* src/sexp-conv.c (main): Deleted code for newline-terminating
	output. 

	* src/rsa.c (make_rsa_signer): Call mpz_init for all bignum
	instance variables.

	* src/lsh-make-seed.c: New option --server.
	(main): If invoked with the quiet option (-q), never ask the user
	to type randomly.

	* src/lock_file.h (LSH_FILE_LOCK): New argument RETRIES.

	* src/lock_file.c (do_lsh_file_lock): If locking fails,
	optionally retry a few times.

	* src/client_x11.c (make_forward_x11): Assert that the randomness
	generator is of "good" quality.
	* src/rsa_keygen.c (rsa_generate_key): Likewise.
	* src/keyexchange.c (make_simple_kexinit): Likewise.
	* src/dsa_keygen.c (dsa_generate_key): Likewise.
	* src/dsa.c (generic_dsa_sign): Likewise.
	* src/dh_exchange.c (make_dh): Likewise.

	* src/Makefile.am.in (sbin_PROGRAMS): Install lsh-krb-checkpw in
	$prefix/sbin, not $prefix/bin.

	* src/randomness.c: Deleted old generators.

	* src/randomness.h: Deleted all classes but randomness. New method
	RANDOM_ADD. 

	* src/unix_random.c: Rewrote to use yarrow. Updated users.

	* src/werror.c (werror_progress): Fixed test of verbose and quite
	flags. 

2001-12-08  Niels Mller  <nisse@cuckoo.hack.org>

	* src/lsh-pam-checkpw.c: New helper program for verifying
	passwords against PAM. Written by Pontus Skld.

2001-12-07  Niels Mller  <nisse@cuckoo.hack.org>

	* src/unix_user.c: Added comments on how to fix use of setuid.

	* src/lsh-make-seed.c: Added option --sloppy.

	* src/lsh-execuv.c: New file. Helper program for securely exec:ing
	user programs. 

Niels Möller's avatar
Niels Möller committed
844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880
2001-12-05  Niels Mller  <nisse@cuckoo.hack.org>

	* src/werror.c (werror_progress): New function.

	* src/ssh-conv: Shortened if-statement.

	* src/lsh-make-seed.c (main_argp_parser): Use the right default
	file name.
	(get_dev_mem): #if:ed out this code, it's dangerous on some
	systems.
	(get_system): Implemented this, including reading some /proc
	files. Implemented
	(get_interact): Implemented.
	(main): Move locking later, until we want to write the file.
	Implemented the actual writing of the seed-file data.

	* src/lsh-authorize: Fixed bash-isms, don't use "if !", use "$HOME"
	rather than "~".

	* src/lock_file.c (do_lsh_file_lock): Initialize info attribute in
	new object.
	(do_lsh_file_lock_p): New function, corresponding to a new method
	for checking if a lock exists, without creating one.

	* src/client_x11.c (make_client_x11_display): Fixed werror format
	string. 

	* src/channel_forward.c: Use CAST_SUBTYPE in channel_forward's
	methods. Needed because it is subclassed as client_x11_channel.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added lock_file.c.

2001-12-02  Niels Mller  <nisse@cuckoo.hack.org>

	* src/lock_file.c, src/lock_file.c: New files. Locking mechanism
	for the seed file.

Niels Möller's avatar
Niels Möller committed
881 882 883 884 885 886 887 888 889 890
2001-11-23  Niels Mller  <nisse@ehand.com>

	* src/sftp/sftp-server.c (sftp_process_readdir): Clear errno
	before calling readdir.

2001-11-22  Niels Mller  <nisse@ehand.com>

	* src/sftp/sftp-server.c (sftp_attrib_from_stat): Bugfix, use |,
	not ||. Noticed by Pontus Skld.

Niels Möller's avatar
Niels Möller committed
891 892 893 894 895 896 897 898
2001-11-20  Niels Mller  <nisse@ehand.com>

	* src/zlib.c (make_zlib_instance): Check return valus from
	inflateInit and deflateInit.

	* src/lsh-make-seed.c (update_zlib): New function.
	(get_dev_mem): Implemented reading of /dev/mem.

Niels Möller's avatar
Niels Möller committed
899 900 901 902 903
2001-11-14  Niels Mller  <nisse@cuckoo.hack.org>

	* src/lsh-make-seed.c (get_dev_random): Implement reading of
	/dev/random.

Niels Möller's avatar
Niels Möller committed
904 905 906 907 908 909 910 911 912
2001-11-14  Niels Mller  <nisse@ehand.com>

	* src/Makefile.am.in (bin_PROGRAMS): Added lsh-make-seed.

	* src/lsh-make-seed.c: New program, for creating the initial seed
	file. 

	* src/testsuite/seed-test: New file, testing lsh-make-seed.

Niels Möller's avatar
Niels Möller committed
913 914 915 916
2001-11-06  Niels Mller  <nisse@cuckoo.hack.org>

	* configure.in: Bumped version to 1.3.6.

Niels Möller's avatar
Niels Möller committed
917 918 919 920 921
2001-11-02  Niels Mller  <nisse@ehand.com>

	* src/server_session.c (do_eof): Use close_fd_write instead of
	close_fd_nicely. 

Niels Möller's avatar
Niels Möller committed
922 923 924 925 926
2001-10-30  Niels Mller  <nisse@lysator.liu.se>

	* src/client_session.c (make_client_session_channel): Added
	fixme-comment. 

Niels Möller's avatar
Niels Möller committed
927 928 929 930 931 932 933 934 935 936 937
2001-10-30  Niels Mller  <nisse@ehand.com>

	* src/channel_forward.c (do_channel_forward_eof): Don't call
	shutdown(), use close_fd_write instead.

	* src/io.c (do_write_callback): Use close_fd_write if buffer is
	closed and becomes empty.
	(close_fd_write): New function.

	* src/rsa.c: Comment fixes.

Niels Möller's avatar
Niels Möller committed
938 939 940 941 942 943
2001-10-29  Niels Mller  <nisse@ehand.com>

	* src/testsuite/Makefile.am (TS_MORE_SH): Added lshg-1-test.

	* src/server_session.c (do_eof): Signal EOF on the process' stdin. 

Niels Möller's avatar
Niels Möller committed
944 945 946 947 948 949 950 951 952 953 954 955
2001-10-26  Niels Mller  <nisse@ehand.com>

	* src/sftp/sftp-server.c (sftp_process_read): Use the same type
	for done as for length, UINT32.

	* src/xauth.c (xauth_lookup): Bugfix for ipv6 addresses.

2001-10-25  Niels Mller  <nisse@ehand.com>

	* src/sftp/buffer.c (READ_UINT64): Use off_t instead of UINT64,
	which isn't defined.

Niels Möller's avatar
Niels Möller committed
956 957 958 959 960 961 962 963 964 965
2001-10-24  Niels Mller  <nisse@ehand.com>

	* src/read_packet.c (do_read_packet): If we get EOF on a packet
	boundary, raise EXC_FINISH_READ, not EXC_PROTOCOL.

	* src/connection.c (do_exc_connection_handler): Added a comment
	for the EXC_FINISH_READ case.

	* configure.in (BASH): Unset BASH if it has the value "/bin/sh".

Niels Möller's avatar
Niels Möller committed
966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983
2001-10-23  Niels Mller  <nisse@cuckoo.hack.org>

	* src/testsuite/lshg-1-test: New test program.

	* src/client.c (make_subsystem_request): New function, contributed
	by Pontus Skld.
	(client_options): New option --subsystem.
	(client_subsystem_session): New function.
	(client_command_session): Don't ask for a pty by default.
	(client_maybe_pty): New argument default_pty.
	(client_argp_parser): Handle subsystem option.

2001-10-22  Niels Mller  <nisse@cuckoo.hack.org>

	* Makefile.am.in (MAINTAINERCLEANFILES): Don't use += for
	assigning this variable.
	* src/Makefile.am.in (MAINTAINERCLEANFILES): Likewise.

Niels Möller's avatar
Niels Möller committed
984 985
2001-10-15  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
986 987
	Released lsh-1.3.5.
	
Niels Möller's avatar
Niels Möller committed
988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026
	* src/testsuite/cast128-test.m4: New cast-128 cbc testcase.

	* src/crypto.c (crypto_cast128_cbc_algorithm): New algorithm,
	replacing the code in cast.c.
	(crypto_serpent256_cbc_algorithm): New algorithm, replacing the
	code in serpent.c

	* src/serpent.c, src/cast.c, src/blowfish.c, src/cbc.c,
	src/cascade.c: Deleted files.

	* src/abstract_crypto.c (crypto_invert): Deleted function.
	(gcd): Deleted function.
	(lcm): Deleted function.

	* src/crypto.c (crypto_serpent256_cbc_algorithm): New algorithm,
	replacing code in serpent.c.

	* src/testsuite/blowfish-test.m4: New testcase for blowfish-128
	cbc. 

	* src/crypto.c (crypto_blowfish_cbc_algorithm): New algorithm,
	replacing the code in blowfish.c.

	* src/Makefile.am.in (liblsh_a_SOURCES): Deleted blowfish.c.

	* src/testsuite/twofish-test.m4: Updated test case to test
	twofish_cbc. 

	* src/testsuite/des-test.m4: Updated test case to test des3_cbc.

	* src/idea.c: Deleted file.

	* src/des.c, src/twofish.c: Deleted files, replaced by code in
	crypto.c. 

	* src/crypto.c (crypto_twofish256_cbc_algorithm): New algorithm,
	replacing the code in twofish.c.
	(make_des3_cbc_instance): Initialize the iv properly.

Niels Möller's avatar
Niels Möller committed
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038
2001-10-14  Niels Mller  <nisse@cuckoo.hack.org>

	* src/crypto.c (crypto_aes256_cbc_algorithm): Renamed, was
	aes256_cbc_algorithm. 
	(crypto_des3_cbc_algorithm): New algorithm, to replace the code in
	des.c. Doesn't quite work yet.

	* src/algorithms.c (all_symmetric_algorithms): Use
	crypto_des3_cbc_algorithm. 

	* src/Makefile.am.in (liblsh_a_SOURCES): Deleted des.c.

Niels Möller's avatar
Niels Möller committed
1039 1040
2001-10-05  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
1041 1042 1043
	* src/arcfour.c, src/rijndael.c: Deleted files. Code moved to
	crypto.c.

Niels Möller's avatar
Niels Möller committed
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054
	* src/testsuite/aes-test.m4: New testcase; NIST:s testcases for
	aes256-cbc. 

	* src/testsuite/macros.m4 (TS_TEST_CRYPTO): Added optional 6:th
	argument for iv.

	* src/testsuite/Makefile.am (TS_PROGS): Added aes-test.

	* src/crypto.h, src/crypto.c: Deleted aes128_cbc_algorithm and
	aes192_cbc_algorithm.

Niels Möller's avatar
Niels Möller committed
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064
2001-10-05  Niels Mller  <nisse@cuckoo.hack.org>

	* src/crypto.c: New file, with glue to Nettle.

	* src/algorithms.c (all_symmetric_algorithms): Replaced references
	to rijndael_algorithm with aes256_cbc_algorithm.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added crypto.c. Deleted
	arcfour.c and rijndael.c.

Niels Möller's avatar
Niels Möller committed
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
2001-10-03  Niels Mller  <nisse@ehand.com>

	* src/Makefile.am.in (liblsh_a_SOURCES): Deleted sexp_commands.c
	and spki_commands.c.

	* src/sexp_commands.c, src/sexp_commands.h, src/spki_commands.c,
	src/spki_commands.h: Deleted obsolete files.

	* src/lshd.c (options2keys): New command, that uses read_host_key,
	and replaces options2keyfile.
	* src/lsh_proxy.c: Likewise.

	* src/server.c (read_host_key): New function replacing
	spki_read_hostkey. 

	* src/spki_commands.c (make_pkcs5_decrypt): Deleted function.
	(do_spki_decrypt): Deleted function.
	(spki_password_decrypt): Deleted class.
	(make_spki_read_userkeys): Deleted function.
	(spki_read_userkeys): Deleted expression.
	(spki_return_userkeys): Deleted command.
	(spki_add_userkey_command): Deleted command.
	(do_spki_add_userkey): Deleted function.
	(spki_read_userkey_context): Deleted class.

	* src/spki.c (spki_sexp_to_signer): Added argument algorithm_name. 
	(spki_pkcs5_decrypt): New function, replacing make_pkcs5_decrypt.

	* src/lsh.c (read_user_keys): New function, replacing
	do_options2identities and make_spki_read_userkeys.

	* src/spki_commands.c (make_spki_read_acls): Deleted function. 
	(spki_read_acl): Deleted expression.
	(do_spki_add_acl): Deleted function.
	(spki_add_acl_command): Deleted command.
	(spki_command): Deleted class.
	(spki_signer2verifier): Deleted command.
	(spki_verifier2public): Deleted command.

	* src/resource.c (do_kill_all): Added trace message.

	* src/lsh.c (read_known_hosts): New function, replacing
	make_spki_read_acls. 
	(do_options2known_hosts): Deleted function.

	* src/client.c (make_client_session): Register the channel's
	resource list with the gc.

	* src/testsuite/lsh-7-test: New test, verifying that connecting,
	without a proper entry in known_hosts, fails.

	* src/testsuite/Makefile.am (TS_MORE_PROGS): Added lsh-7-test.

	* src/sexp_commands.c (make_sexp_print_raw_hash): Deleted
	function. 
	(sexp_print_raw_hash): Deleted command.
	(do_sexp_print): Deleted function.
	(make_sexp_print_command): Deleted function.
	(make_sexp_print_to): Deleted function.

	* src/spki.c (spki_sexp_to_signer): New function.
	(spki_pkcs5_encrypt): New function.

	* src/spki_commands.c (spki_sexp2signer_command): Deleted command,
	replaced with function spki_sexp_to_signer.
	(make_pkcs5_encrypt): Deleted, replaced with spki_pkcs5_encrypt
	function. 

	* src/lsh-writekey.c: Rewrote to use io_read_file_raw and
	write_raw, without using any commands or io_run.
	* src/lsh-decode-key.c: Likewise.

Niels Möller's avatar
Niels Möller committed
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157
2001-10-03  Niels Mller  <nisse@cuckoo.hack.org>

	* src/lsh-export-key.c: No longer needs to include
	sexp_commands.h. 

	* src/server_keyexchange.c (server_srp_read_verifier): Renamed
	class (was srp_init_continuation) and changed super class to
	abstract_write.  
	(do_server_srp_read_verifier): Work with new USER_READ_FILE
	conventions. 
	(do_handle_srp_init): Likewise.

	* src/lsh.h: Forward declare abstract_write.

	* src/unix_user.c (exc_read_user_file_handler): New class.
	(do_read_file): Updated for new USER_READ_FILE conventions. 

	* src/userauth.h (lsh_user): Changed the arguments to
	USER_READ_FILE, now takes an abstract_write that will receive the
	file contents, not command_continuation.

Niels Möller's avatar
Niels Möller committed
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168
2001-10-02  Niels Mller  <nisse@cuckoo.hack.org>

	* src/spki.c (spki_hash_sexp): New function.

	* src/spki_commands.c (make_spki_hash): Deleted function.
	(spki_hash): Deleted class.
	(spki_hash_md5): Deleted command.
	(spki_hash_sha1): Deleted command.

	* src/lsh-decode-key.c (do_decode_key): Free CONTENTS properly.

Niels Möller's avatar
Niels Möller committed
1169 1170 1171 1172
2001-10-02  Niels Mller  <nisse@ehand.com>

	* src/lsh-export-key.c (main): Rewrote to use io_read_file_raw and
	write_raw, without using any commands or io_run.
Niels Möller's avatar
Niels Möller committed
1173
	* src/sexp-conv.c (main): Likewise.
Niels Möller's avatar
Niels Möller committed
1174 1175 1176 1177

	* src/io.c (io_read_file_raw): New function, for reading an entire
	file into a string. Uses string_buffer.

Niels Möller's avatar
Niels Möller committed
1178
	* src/gc.c (gc_final): Check that root_set is non-null before
Niels Möller's avatar
Niels Möller committed
1179 1180
	calling KILL_RESOURCE_LIST.

Niels Möller's avatar
Niels Möller committed
1181 1182 1183 1184 1185 1186 1187 1188 1189
2001-09-30  Niels Mller  <nisse@cuckoo.hack.org>

	* src/io.c (do_write_prepare): Deleted function.
	(do_consuming_read): Deleted old code to deal with fd->hanged_up. 
	(do_write_callback): Call write_buffer_pre_write instead of
	FD_PREPARE.

	* src/io.h (FD_PREPARE): Deleted method.

Niels Möller's avatar
Niels Möller committed
1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211
2001-09-28  Niels Mller  <nisse@cuckoo.hack.org>

	* src/server_session.c (do_eof): Use close_fd_nicely instead of
	write_buffer_close. 
	* src/sexp_test.c (do_close): Likewise.

	* src/io.c (do_write_close): Deleted function.
	(close_fd): Set the flag write_buffer->closed directly, instead of
	calling FD_WRITE_CLOSE.
	(close_fd_nicely): Don't use FD_WRITE_CLOSE, instead, set the
	write_buffer->closed flag, and close the fd if the write_buffer is
	empty. 

	* src/io.h (FD_WRITE_CLOSE): Deleted method.

	* src/write_buffer.c (write_buffer_close): Deleted. The closed
	flag is now set by close_fd and close_fd_nicely. Everybody else
	should be using those functions.

	* src/tcpforward_commands.c (install_forwarded_tcpip_handler):
	Static command deleted, not used anywhere.

Niels Möller's avatar
Niels Möller committed
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224
2001-09-28  Niels Mller  <nisse@ehand.com>

	* src/tty.c (tty_setwinsize): Rows and columns were mixed up.
	Fixed.

	* src/server_session.c (make_pty): Reorganized to be more
	readable.
	(spawn_process): DEleted local variable uses_pty. Instead NULL
	session->pty if no pty is in use.
	(do_window_change_request): Use the fd connected to the process'
	stdin for manipulating the pty.
	(do_alloc_pty): Check that we haven't started a process already.

Niels Möller's avatar
Niels Möller committed
1225 1226
2001-09-27  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
1227 1228 1229 1230 1231 1232
	* src/server_session.h (window_change_request_handler): Declare
	object. 

	* src/lshd.c (main): Install window_change_request_handler for
	session channels.

Niels Möller's avatar
Niels Möller committed
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248
	* src/tcpforward_commands.c: Made some more objects static.

	* src/spki_commands.c (spki_parse_key): Deleted class.
	(spki_sexp2signer_command): Define using DEFINE_COMMAND2.
	(spki_sexp2keypair_command): Likewise.
	
	* src/sexp.c: Use const struct sexp * in more places.

	* src/resource.c (dont_free_live_resource): Check that resource is
	dead. Don't look at gc_final_p.

	* src/lsh-export-key.c (do_ssh2_print_command): Updated for new
	sexp_check_type prototype.
	* src/spki.c: Likewise.
	* src/srp_exchange.c (make_srp_entry): Likewise.

Niels Möller's avatar
Niels Möller committed
1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273
2001-09-27  Niels Mller  <nisse@cuckoo.hack.org>

	* src/resource.c (make_resource_list): Renamed functions, was
	empty_resource_list. Updated all callers.
	(dont_free_live_resource): #if:ed out check of gc_final_p.

	* src/io_commands.c: Deleted old function do_io_read_file.

	* src/io.c: Deleted old backend code.
	(io_run): Check for OOP_ERROR. #if:ed out for now, as it is not
	defined in liboop-0.7. 

	* src/client.c (accept_service_handler): Deleted exception_handler
	attribute.
	(do_accept_service): Use the connection's exception handler for
	raising protocol error.
	(make_accept_service_handler): Deleted exception_handler argument. 

	* src/channel.c (send_channel_request_responses): Deleted
	connection argument. 
	(make_channel_request_response): Likewise.
	(channel_request_exception_handler): Deleted connection attribute. 
	(make_channel_request_exception_handler): Deleted connection
	argument. 

Niels Möller's avatar
Niels Möller committed
1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295
2001-09-26  Niels Mller  <nisse@ehand.com>

	* src/server_session.c (shell_request_handler,
	exec_request_handler): Defined as static objects using
	DEFINE_CHANNEL_REQUEST. Updated users.

	* src/io_commands.c (connect_simple_comand,
	connect_connection_command): New static commands, replacing
	make_simple_connect and make_connect_connection. Updated users.

	* src/client_x11.c (channel_open_x11): Define as a static object
	using DEFINE_CHANNEL_OPEN. Updated users.

	* src/channel.h (DEFINE_CHANNEL_OPEN): New macro.
	(DEFINE_CHANNEL_REQUEST): New macro.

	* src/zlib.c (zlib_deflate): Bugfix: Call deflateEnd, not
	inflateEnd, when deleting a deflate object. FIX copied from 1.2
	branch. 

	* src/sftp/xmalloc.c: Include string.h.

Niels Möller's avatar
Niels Möller committed
1296 1297
2001-09-25  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307
	* src/gc.c (gc_register): Set gc_scheduled flag before creating
	the gc callout.

	* src/io.c (lsh_oop_time_callback): New function.
	(lsh_oop_register_callout): New function.
	(lsh_oop_cancel_callout): New function.
	(do_kill_callout): New function.
	(io_callout): Deleted delay argument, as delays are not currently
	implemented. 

Niels Möller's avatar
Niels Möller committed
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326
	* src/lsh-writekey.c (lsh_writekey_options2private_file): Dup
	string before passing it to make_io_write_file_info.
	(lsh_writekey_options2public_file): Updated call to
	make_io_write_file_info. 

	* src/sexp.c (do_format_sexp_vector): Fixed string leak in
	pretty-printing code.

	* src/io_commands.c (make_io_write_file_info): Changed type of the
	NAME argument. Now a struct lsh_string *.

	* src/io.c (io_final): Call gc_final. That makes sure that all
	callbacks are cancelled. Updated callers to not use gc_final, only
	io_final. 

	* src/gc.c (gc_final): Always define gc_fianl, and kill the
	resources in the root set. Deallocation and checks for leaks is
	still done only when DEBUG_ALLOC is defined.

Niels Möller's avatar
Niels Möller committed
1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337
2001-09-24  Niels Mller  <nisse@cuckoo.hack.org>

	* src/xalloc.c (lsh_object_check): Better message on type error.
	(lsh_object_check_subtype): Likewise.

	* src/lsh-writekey.c (make_writekey): Chenged order of options and
	stdin arguments. Delay call of read_sexp.

	* src/command.c (gaba_apply): Assert that a value has been
	returned.

Niels Möller's avatar
Niels Möller committed
1338 1339
2001-09-24  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
1340 1341 1342 1343 1344 1345 1346 1347 1348
	* src/scm/gaba.scm (process-expr): Handle empty parameter list.

	* src/io.c: Deleted class io_backend. Register signal handlers and
	files with gc_global() instead. Deleted all references to
	io_backend in the rest of the source files. Doesn't quite work yet.

	* src/gc.c (gc_global): New function.
	(root_set): New global variable.

Niels Möller's avatar
Niels Möller committed
1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389
	* Liboop code (without gc) seems to work now. Tagging as
	MILESTONE_LIBOOP_20010924. 

	* src/write_buffer.c (write_buffer_close): Call close_fd if buffer
	is empty. 

	* src/unix_interact.c (window_subscriber): Added attribute
	interact, which points to the corresponding unix_interact.
	(do_kill_window_subscriber): New function, which updates the
	number of subscribers and removes the SIGWINCH handler if there
	are no subscribers left.
	(unix_interact): Added attributes backend, winch_handler and
	nsubscribers. 
	(unix_window_change_subscribe): Keep track of number of
	subscribers, and install the signal handler if it is needed.
	(make_unix_interact): Don't install any signal handler yet.

	* src/lshd.c (main): Changed the behaviour of the --no-syslog
	option. Now --daemon --no-syslog puts the process into the
	background without the rest of the daemonic setup. These option
	names should be changed to something more correct, but it is used
	only be the testsuite.

	* src/io.c (lsh_oop_signal_callback): Better trace message.
	(lsh_oop_signal_callback): Return OOP_CONTINUE.
	(lsh_oop_fd_read_callback): Return OOP_CONTINUE.
	(lsh_oop_register_read_fd): Check want_read, so we don't try to
	register the callback twice.
	(lsh_oop_fd_write_callback): Fixed assertion.
	(lsh_oop_fd_write_callback): Return OOP_CONTINUE.
	(lsh_oop_register_write_fd): Check want_write, so we don't try to
	register the callback twice.
	(io_run): Print a trace message if/when oop_sys_run returns.
	(do_connect_callback): Improved trace messages.
	(io_connect): Initialize fd->write before calling
	lsh_oop_register_write_fd. 
	(io_listen): Initialize fd->read before calling
	lsh_oop_register_read_fd. 
	(close_fd): Call lsh_oop_cancel_read_fd and
	lsh_oop_cancel_write_fd before clearing the alive flag.

Niels Möller's avatar
Niels Möller committed
1390 1391 1392 1393 1394 1395
2001-09-23  Niels Mller  <nisse@cuckoo.hack.org>

	* src/io.c: Added trace messages to liboop-related functions.

	* src/write_buffer.c: Include io.h.

Niels Möller's avatar
Niels Möller committed
1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423
2001-09-21  Niels Mller  <nisse@ehand.com>

	* configure.in: Check for liboop.

	* src/io.c (make_io_backend): Call new function io_init().
	(lsh_oop_register_read_fd): Updated the want_read flag. Changed
	most functions to call this function instead of updating the flag
	directly. 
	(lsh_oop_cancel_read_fd): Likewise.
	(lsh_oop_register_write_fd): Analogous changes for the want_write flag.
	(lsh_oop_cancel_write_fd): Likewise.
	(do_exc_finish_read_handler): Use lsh_oop_register_read_fd and
	lsh_oop_cancel_read_fd.  

	* src/write_buffer.c (make_write_buffer): Added fd argument.
	(do_write): Call lsh_oop_register_write_fd when buffer gets
	non-empty. 

	* src/reaper.c (make_reaper): Adapted to new io_signal_handler
	behaviour. 
	* src/unix_interact.c (make_unix_interact): Likewise.

	* src/channel_forward.c (do_channel_forward_send_adjust): Use
	lsh_oop_register_read_fd. 
	* src/client_session.c (do_send_adjust): Likewise.
	(do_client_io): Likewise.
	* src/server_session.c (do_send_adjust): Likewise.

Niels Möller's avatar
Niels Möller committed
1424 1425 1426 1427 1428
2001-09-19  Niels Mller  <nisse@ehand.com>

	* src/server_keyexchange.c (do_init_server_dh): Fixed bug in the
	PEER_SSH_DSS_KLUDGE workaround. FIX copied from 1.2 branch.

Niels Möller's avatar
Niels Möller committed
1429 1430 1431 1432 1433 1434 1435 1436
2001-09-18  Niels Mller  <nisse@ehand.com>

	* src/io.c (lsh_oop_cancel_signal): New function.
	(do_write_callback): Call FD_PREPARE.
	(close_fd): Call lsh_oop_cancel_fd.
	(close_fd_nicely): Likewise.
	(close_fd_read): Likewise.

Niels Möller's avatar
Niels Möller committed
1437 1438 1439 1440 1441 1442 1443 1444 1445
2001-09-18  Niels Mller  <nisse@cuckoo.hack.org>

	* src/io.c (lsh_oop_glue): New class.
	(make_lsh_oop_glue): New function.
	(lsh_oop_signal_callback): New function.
	(lsh_oop_register_signal): New function.
	(lsh_oop_fd_callback): New function.
	(lsh_oop_register_fd): New function.

Niels Möller's avatar
Niels Möller committed
1446 1447 1448 1449
2001-09-17  Niels Mller  <nisse@ehand.com>

	* src/io.c: Started experimental conversion to use liboop.

Niels Möller's avatar
Niels Möller committed
1450 1451
2001-09-16  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
1452 1453
	* doc/lsh.texinfo: Moved table of contents first.

Niels Möller's avatar
Niels Möller committed
1454 1455 1456
	* src/dsa.c (do_dsa_sign): Display any unexpected algorithm atom
	before crashing.

Niels Möller's avatar
Niels Möller committed
1457 1458 1459 1460 1461 1462 1463 1464 1465 1466
2001-09-13  Niels Mller  <nisse@ehand.com>

	* src/io.c (address_info2sockaddr): Fixed debug invocation. FIX
	copied from 1.2 branch.

2001-09-12  Niels Mller  <nisse@ehand.com>

	* src/werror.c (werror_vformat): Don't crash if %a gets a zero
	argument. FIXED in 1.2 branch.

Niels Möller's avatar
Niels Möller committed
1467 1468 1469 1470 1471
2001-09-09  Niels Mller  <nisse@cuckoo.hack.org>

	* src/des.c (make_des_instance): Use the des_fix_parity function
	in nettle.

Niels Möller's avatar
Niels Möller committed
1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483
2001-09-05  Niels Mller  <nisse@ehand.com>

	* src/crypto.h: Deleted last traces of idea support.
	* src/atoms.in: Likewise.
	* src/algorithms.c: Likewise.
	* src/Makefile.am.in: Likewise.

	* src/testsuite/lsh-6-test: New test, exercising the various -c
	options. 

	* configure.in: Bumped version to 1.3.5.

Niels Möller's avatar
Niels Möller committed
1484 1485 1486 1487
2001-09-04  Niels Mller  <nisse@cuckoo.hack.org>

	* Released lsh-1.3.4.

Niels Möller's avatar
Niels Möller committed
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497
2001-09-04  Niels Mller  <nisse@ehand.com>

	* doc/lsh.texinfo: Updated for 1.3.4. In particular, added doc on
	X forwarding, -x, -B, and --log-file options, and encrypted
	private keys. Deleted the paragraph about the obsolete --userauth
	option. 

	* src/client.c (client_command_session): Ask for a pty also for
	(supposedly non-interactive) exec sessions.

Niels Möller's avatar
Niels Möller committed
1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510
2001-09-03  Niels Mller  <nisse@cuckoo.hack.org>

	* src/xauth.c (xauth_process): New function, using XauReadAuth.
	(xauth_lookup): Use xauth_process instead of XauGetAuthByAddr.

	* src/client_x11.c (make_client_x11_display): Initialize the fake
	cookie properly.

	* src/xauth.h: New file with the xauth_lookup prototype.

	* src/xauth.c (xauth_lookup): Deleted address_length argument. Bug
	fixes. 

Niels Möller's avatar
Niels Möller committed
1511 1512
2001-09-03  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525
	* src/xauth.c: Rewrote to use libXau.

	* src/client_x11.c (client_x11_auth_info): Deleted class; merged
	with client_x11_display.
	(parse_display): Take a client_x11_display as argument. Do xauth lookup.
	(get_client_x11_auth_info): Deleted function.

	* src/client.c (DEFINE_CALLBACK): Declare self argument as UNUSED.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added xauth.c.

	* configure.in: Check for X, libXau and XauGetAuthByAddr.

Niels Möller's avatar
Niels Möller committed
1526 1527 1528 1529 1530 1531 1532 1533 1534
	* src/client_x11.c (client_x11_channel): New fields auth_length
	and name_length, for recording the decoded lengths in the setup
	message.  
	(X11_SETUP_MAX_LENGTH): Defined as 48, which is the size of a message
	with a 16 octet cookie.
	Updated description of the X11 connection setup message.
	(LE_READ_UINT16, LE_WRITE_UINT16): New macros. 
	(do_client_channel_x11_receive): Bug fixes, seems to work now.

Niels Möller's avatar
Niels Möller committed
1535 1536 1537
	* src/suspend.h: Declare suspend_callback as extern. Noticed by
	Jean-Pierre. 

Niels Möller's avatar
Niels Möller committed
1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559
2001-09-03  Niels Mller  <nisse@cuckoo.hack.org>

	* src/client_x11.c: Added comment about observed X11 packets (that
	seem contrary to the documentation in RFC 1013.
	(do_client_channel_x11_receive): Print received cookie, for
	debugging purposes.
	(make_forward_x11): Print generated fake cookie, for debugging
	purposes. 
	(parse_display): Fixed ssh_format invocation creating the local
	socket name.
	(do_channel_open_x11): Fixed invocation of verbose().
	(do_format_request_x11_forward): Get the connection from the
	channel, now that the connection pointer is available there.
	(do_format_request_x11_forward): Hex encode the cookie. That's
	ugly, but needed for compatibility.

	* src/client_pty.c: Dropped lsh:-prefix on messages, it's added
	automatically in werror.c.

	* src/client.c (client_maybe_x11): Write a message if DISPLAY not
	set or it's value doesn't make sense.

Niels Möller's avatar
Niels Möller committed
1560 1561
2001-09-02  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
1562 1563 1564 1565 1566
	* src/client.c (make_client_session): Added escape sequences q, v
	and d, for controlling the verbosity flags.
	(client_argp_parser): Look at used_x11 after setting up the shell
	session. 

Niels Möller's avatar
Niels Möller committed
1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579
	* src/lshg.c (make_options): Pass NULL random to
	init_client_options. 

	* src/client_x11.c (make_client_x11_display): Free the fake cookie
	if we fail.
	(make_forward_x11): Make up a random cookie.

	* src/client.c (init_client_options): New argument RANDOM.
	(client_maybe_x11): Pass on RANDOM to make_forward_x11.

	* src/client.h (client_options): Moved RANDOM attribute here, from
	lsh_options. 

Niels Möller's avatar
Niels Möller committed
1580 1581
2001-09-01  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
1582 1583 1584 1585 1586 1587 1588 1589 1590
	* src/client.c: Moved -x option to lsh.c.

	* src/channel.c (register_channel): Deleted connection argument.

	* src/channel.h (ssh_channel): Replaced the write pointer with a
	pointer to the connection.
	(channel_request): Deleted connection argument.
	* src/channel.h (CHANNEL_REQUEST): Likewise.

Niels Möller's avatar
Niels Möller committed
1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611
	* src/resource.c (init_resource): Renamed from resource_init, for
	consistency. Updated all callers.

	* src/lsh.h (struct client_x11_display): Forward declare.

	* src/client_x11.h: Deleted, prototypes moved to client.h.

	* src/client.h (client_options): New attributes with_x11 and
	used_x11.

	* src/client.c (client_maybe_pty): New function.
	(client_maybe_x11): New function.
	(client_shell_session): Use client_maybe_pty and client_maybe_x11.
	(client_command_session): Use client_maybe_x11.
	(client_argp_parser): --x11-forward should be a modifier option,
	not an action.

	* src/channel.h (channel_table): Added attribute x11_display.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added client_x11.c.

Niels Möller's avatar
Niels Möller committed
1612 1613 1614 1615
2001-08-31  Niels Mller  <nisse@ehand.com>

	* src/client.c (client_argp_parser): Implemented -X flag.

Niels Möller's avatar
Niels Möller committed
1616 1617 1618 1619 1620 1621 1622 1623 1624 1625
2001-08-30  Niels Mller  <nisse@cuckoo.hack.org>

	* src/xauth.c: New file.

	* src/client_x11.c: Work in progress.
	(client_x11_auth_info): New class.

	* src/channel_forward.c (init_channel_forward): New function,
	extracted from make_channel_forward.

Niels Möller's avatar
Niels Möller committed
1626 1627 1628 1629
2001-08-30  Niels Mller  <nisse@ehand.com>

	* configure.in: Bumped version to 1.3.4.

Niels Möller's avatar
Niels Möller committed
1630 1631 1632 1633
2001-08-29  Niels Mller  <nisse@cuckoo.hack.org>

	* Released lsh-1.3.3.

Niels Möller's avatar
Niels Möller committed
1634 1635
2001-08-29  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
1636 1637
	* src/sftp/testsuite: Fixed scripts to work outside of $srcdir.

Niels Möller's avatar
Niels Möller committed
1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648
	* src/sftp/buffer.c, src/sftp/client.c: Include string.h.

	* src/algorithms.c (all_symmetric_algorithms): Use aes256-cbc as
	an alias for rijndael. 
	(lookup_crypto): Recognize aes256-cbc, aes-cbc and aes.

2001-08-23  Niels Mller  <nisse@ehand.com>

	* src/connection.c (do_exc_connection_handler): Display exception
	message. Suggested by Jonas Bofjll. XXX: Fix in 1.2 branch.

Niels Möller's avatar
Niels Möller committed
1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664
2001-08-28  Niels Mller  <nisse@cuckoo.hack.org>

	* src/sftp/testsuite/run-tests: Use srcdir when starting scripts.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added channel_forward.c.

	* src/channel_forward.h: Renamed the tcpip_channel to
	channel_forward, and moved it to a separate file. It's not really
	tcpip-forwarding specific, and can be reused for x11-forwarding.

	* src/lsh_types.h (READ_UINT16): Fixed shift count. XXX: Fix in
	1.2 branch.

	* src/parse.c (parse_uint16): New function.
	(parse_string16): New function.

Niels Möller's avatar
Niels Möller committed
1665 1666
2001-08-27  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
1667 1668 1669 1670 1671 1672
	* src/sftp/testsuite/Makefile.am (EXTRA_DIST): Use EXTRA_DIST, not
	DISTFILES. cd to $srcdir when running the tests.

	* src/sftp/Makefile.am (EXTRA_DIST): Include header files in the
	dist. 

Niels Möller's avatar
Niels Möller committed
1673 1674
	* buffer.c, buffer.h, client.c, client.h: Added copyright notices. 

Niels Möller's avatar
Niels Möller committed
1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699
	* src/sftp/testsuite/Makefile.am: New file.

	* src/sftp/sftp-server.c (struct sftp_file): New struct with fd
	and position.
	(enum struct sftp_handle_type): Renamed constants to
	HANDLE_TYPE_FILE and HANDLE_TYPE_DIRECTORY.
	(handle_t): Deleted typedef.
	(HANDLE_FILE): New macro replacing HANDLE_FD.
	(sftp_read): New function. Keep track of position, and use
	seek/pread only when appropriate.
	(sftp_write): Likewise.

	* src/sftp/configure.in (AC_OUTPUT): Generate testsuite/Makefile. 

	* src/sftp/client.c: Minor fixes; deleted unused variables, static
	declared functions. 

	* src/sftp/Makefile.am (SUBDIRS): Added testsuite.

	* src/Makefile.am.in (SUBDIRS): Added sftp.

	* misc/bootstrap.sh: Bootstrap the src/sftp subdirectory.

	* configure.in: Configure the src/sftp subdirectory. 

Niels Möller's avatar
Niels Möller committed
1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718
2001-08-26  Niels Mller  <nisse@cuckoo.hack.org>

	* src/testsuite/export-1-test: Don't use $srcdir for finding
	lsh-export-key. 

	* src/zlib.c (do_zlib): Don't print any message if Z_BUF_ERROR
	happens with avail_in = 0.

	* src/lshd.c (main_options): New experimental option --subsystems.
	(parse_subsystem_list): New function.
	(main_argp_parser): Handle --subsystems.
	(main): Install a subsystems handler, if appropriate.

	* src/server_session.c (shell_request): Deleted unused reaper
	attribute. 
	(lookup_subsystem): New function.
	(do_spawn_subsystem): New function.
	(make_subsystem_handler): New function.

Niels Möller's avatar
Niels Möller committed
1719 1720
2001-08-21  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
1721 1722 1723
	* src/client_userauth.c (make_client_publickey_auth): Initialize
	TYPE attribute properly.

Niels Möller's avatar
Niels Möller committed
1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749
	* src/server_userauth.c (server_userauth_none): New authentication
	method. 

	* src/lshd.c (main_argp_parser): Install a handler for the "none"
	authentication method. 
	(main): Always require user authentication (used to allow clients
	to start the ssh-connection service directly, under the same
	restrictions as for "none" authentication).

	* src/lsh.c (main_options): Deleted options --userauth and
	--no-userauth. 
	(lsh_login_command): Try the "none" authentication method.

	* src/handshake.c (handshake_command): Use CAST_SUBTYPE.

	* src/connection_commands.c (connection_if_srp): Deleted command.

	* src/command.c (do_command_4): Use CAST_SUBTYPE, in case
	command_4 is inherited.
	(do_command_3): Use CAST_SUBTYPE, in case command_3 is inherited.
	(do_command_2): Use CAST_SUBTYPE, command_2 is inherited by
	sexp_print_command. 

	* src/client_userauth.c (format_userauth_none): New function.
	(make_client_none_auth): New function.

Niels Möller's avatar
Niels Möller committed
1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765
2001-08-12  Niels Mller  <nisse@cuckoo.hack.org>

	* src/client.c (do_exit): New callback function.
	(make_client_session): Bind the sequence <escape> . to exit. 
	(client_options): New action option -B, --background.
	(background_process): New command.
	(client_argp_parser): Implement -B.

	* src/lshg.c (main_argp_parser): Check that make_gateway_address
	doesn't return NULL. XXX: Fix in 1.2 branch.
	(options2info): Use self->gateway. XXX: Fix in 1.2 branch.

2001-07-30  Niels Mller  <nisse@cuckoo.hack.org>

	* src/testsuite/export-1-test: Fixed invocation of compare_output. 

Niels Möller's avatar
Niels Möller committed
1766 1767
2001-07-06  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801
	* src/io_commands.c (io_write_file_command): Bugfix.

	* src/command.h (command_simple): Deleted class.
	(STATIC_COMMAND_SIMPLE): Deleted macro.
	(DEFINE_COMMAND_SIMPLE): Deleted macro.
	(catch_command): Inherit command, not command_simple.

	* src/command.c (do_call_simple_command): Deleted.
	(catch_collect_body): Inherit command, not command_simple.

	* src/sexp_commands.h (sexp_print_command): Inherit command_2.

	* src/lsh_proxy.c (proxy_destination): Use DEFINE_COMMAND2.

	* src/lsh-writekey.c: Don't use DEFINE_COMMAND_SIMPLE.
	* src/lsh.c: Likewise.
	* src/lshd.c: Likewise.
	* src/lshg.c: Likewise.
	* src/proxy.c: Likewise.
	* src/spki_commands.c: Likewise.

	* src/keyexchange.c (kexinit_filter): Redefined using
	DEFINE_COMMAND2. 

	* src/io_commands.c (io_write_file_command): Use DEFINE_COMMAND.
	(connect_local_command): Likewise.
	(io_log_peer_command): Likewise.
	
	* src/gateway_commands.c (gateway_setup_command): Use
	DEFINE_COMMAND.  
	(gateway_accept): Use DEFINE_COMMAND2. 

	* src/lsh-writekey.c: Don't use command_simple.

Niels Möller's avatar
Niels Möller committed
1802 1803 1804 1805 1806 1807 1808 1809
	* src/connection_commands.c (connection_remember): Redefined using
	DEFINE_COMMAND2.

	* src/channel.c (connection_service_command): Use DEFINE_COMMAND,
	not DEFINE_COMMAND_SIMPLE.
	* src/client.c (client_options2remote): Likewise.
	(client_options2actions) Likewise.

Niels Möller's avatar
Niels Möller committed
1810 1811 1812 1813 1814
2001-07-05  Niels Mller  <nisse@cuckoo.hack.org>

	* src/testsuite/Makefile.am (TS_SH): Added export-1-test.

	* src/lsh-export-key.c (ssh2_print_command): Inherit command_2.
Niels Möller's avatar
Niels Möller committed
1815
	Don't use command_simple.
Niels Möller's avatar
Niels Möller committed
1816

Niels Möller's avatar
Niels Möller committed
1817 1818
2001-07-04  Niels Mller  <nisse@cuckoo.hack.org>

Niels Möller's avatar
Niels Möller committed
1819 1820 1821 1822 1823 1824 1825
	* src/command.c (collect_state_1): Deleted class.
	(collect_state_1): Deleted class.
	(collect_state_2): Deleted class.
	(collect_state_3): Deleted class.
	(make_collect_state_1): Deleted function.
	(make_collect_state_2): Deleted function.

Niels Möller's avatar
Niels Möller committed
1826 1827 1828
	* src/command.h (command_2): Made invoke a method, not a function
	pointer. Updated users.
	(COMMAND_2_INVOKE): New macro.
Niels Möller's avatar
Niels Möller committed
1829 1830 1831 1832 1833 1834 1835
	(collect_info_3): Deleted class.
	(collect_info_2): Deleted class.
	(collect_info_1): Deleted class.
	(STATIC_COLLECT_1): Deleted macro.
	(STATIC_COLLECT_2): Deleted macro.
	(STATIC_COLLECT_2_FINAL): Deleted macro.
	(STATIC_COLLECT_3_FINAL): Deleted macro.
Niels Möller's avatar
Niels Möller committed
1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875

	* src/channel_commands.h (install_info): Inherit command_2,
	instead of collect_info_2.

	* src/testsuite/functions.sh (spawn_lshd): Pass --no-syslog to
	lshd, not --log-file.

	* src/tcpforward_commands.c (open_forwarded_tcpip): Redefined
	using DEFINE_COMMAND2.
	(open_direct_tcpip): Likewise.
	(remote_listen_command): Likewise.
	(make_request_tcpip_forward_command): Deleted function. Moved code
	to remote_listen_command.
	(make_direct_tcpip_handler): Redefined using DEFINE_COMMAND.
	(make_tcpip_forward_handler): Likewise.
	
	* src/sexp_commands.c (sexp_print_raw_hash): Redefined using
	DEFINE_COMMAND3. 

	* src/proxy.c (chain_connections): Redefined using DEFINE_COMMAND3.

	* src/command.c (do_trace_continuation): Use trace(... %t ...).

	* src/werror.c (logfile_flag): Deleted global variable.
	(werror_vformat): Added %t, for printing the object type.

	* src/lshd.c: New option --no-syslog.

	* src/io_commands.c (listen_with_callback): Redefined using
	DEFINE_COMMAND3.

	* src/handshake.c (handshake_command): Redefined using
	DEFINE_COMMAND4. 

	* src/connection_commands.c (connection_if_srp): Redefined using
	DEFINE_COMMAND3. 
	(make_connection_if_srp): Use make_command_3_invoke_2.

	* src/combinators.c (command_Cp): Bugfix, changed argument order.

Niels Möller's avatar
Niels Möller committed
1876 1877
2001-07-03  Niels Mller  <nisse@ehand.com>

Niels Möller's avatar
Niels Möller committed
1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896
	* src/testsuite/runtests (srcdir): By default, use `pwd`, not ".". 

	* src/testsuite/functions.sh: Don't set srcdir here.
	(spawn_lshd): Send messages to lshd.log.

	* src/werror.c (logfile_flag): New global variable.
	(syslog_flag): Deleted.
	(werror_argp_parser): Set logfile_flag of a log file option is
	encountered. 

	* src/lshd.c (main): Don't use syslog if the user provided an
	explicit log-file option.

	* src/combinators.c (command_C): Redefined using DEFINE_COMMAND3.
	(command_Cp): Redefined using DEFINE_COMMAND4, but disabled the
	new version as it doesn't quite work.
	
	* src/testsuite/macros.m4: Include string.h.

Niels Möller's avatar
Niels Möller committed
1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916
	* src/combinators.c (command_Sp): Redefined using
	DEFINE_COMMAND4.
	(command_B): Redefined using DEFINE_COMMAND3.
	(command_Bp): Redefined using
	DEFINE_COMMAND4.

	* src/command.c (command_4_invoke_3): New class.
	(make_command_4_invoke_3): New function.
	(command_4_invoke_2): New class.
	(make_command_4_invoke_2): New function.
	(command_4_invoke): New class.
	(make_command_4_invoke): New function.

	* src/command.h (command_4): New class.
	(DEFINE_COMMAND4): New macro.

	* src/gateway_commands.c: Include string.h.

	* configure.in: Bumped version to 1.3.3.

Niels Möller's avatar
Niels Möller committed
1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950
2001-07-02  Niels Mller  <nisse@cuckoo.hack.org>

	* src/combinators.c (command_I): Redefined using DEFINE_COMMAND.
	Updated users as the type was changed in the process.
	(command_K): Redefined using DEFINE_COMMAND2.
	(command_S): Redefined using DEFINE_COMMAND3.

	* src/command.c: New class.
	(make_command_2_invoke): New function.
	(command_3_invoke_2): New class.
	(make_command_3_invoke_2): New function.
	(command_3_invoke): New class.
	(make_command_3_invoke): New function.
	(progn_command): Use DEFINE_COMMAND isntead of
	DEFINE_COMMAND_SIMPLE. 

	* src/command.h: Started replacing command_simple and the
	collect_info_n classes with simpler schemes.
	(command_2): New class.
	(DEFINE_COMMAND2): New macro.
	(command_3): New class.
	(DEFINE_COMMAND3): New macro.

	* src/connection_commands.c (connection_require_userauth): Changed
	invocation of DEFINE_COMMAND.
	* src/gateway_commands.c (gateway_init): Likewise.

	* src/command.h (DEFINE_COMMAND): Changed macro to not take the
	function arguments as arguments.

	* src/command.c (gaba_apply): Rewrote to not use
	COMMAND_SIMPLE_CALL. 
	(do_command_unimplemented): Deleted function.

Niels Möller's avatar
Niels Möller committed
1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981
2001-06-27  Niels Mller  <nisse@cuckoo.hack.org>

	* acinclude.m4: Added template for socklen_t definition.

	* acconfig.h: Deleted definitions, use AH_TEMPLATE in configure.in
	instead. Can this file be removed completely now?

	* configure.in: Added AH_TEMPLATE calls. Deleted test for
	offsetof. 

	* src/client_escape.c (newlinep): New function.
	Treat NL and CR equivalently.
	(scan_escape): Simplified. Also doesn't use memchr anymore. 

	* src/io.c (io_listen_local): Use plain offsetof.
	(io_connect_local): Likewise.

	* src/lsh_types.h (OFFSET_OF): Deleted definition, simply trust
	stddef.h. 

	* src/server_userauth.c (do_exc_userauth_handler): Let the
	connection's exception handler deal with EXC_PROTOCOL (fixed
	somewhat differently in the 1.2.x branch).

2001-06-26  Niels Mller  <nisse@cuckoo.hack.org>

	* configure.in: Deleted IDEA support.

	* src/process_atoms (atom2define): Changed invocation of tr to be
	compatible with the Solaris 8 tr.

Niels Möller's avatar
Niels Möller committed
1982 1983 1984 1985 1986 1987 1988 1989 1990
2001-06-26  Niels Mller  <nisse@ehand.com>

	* src/client_escape.c (NEWLINE): New macro.
	(do_escape_handler): Reset state to GOT_NONE appropriately.

	* src/client.c (client_argp_parser): Added empty statement after
	label. 
	(make_client_session): Bind ^Z to suspend.

Niels Möller's avatar
Niels Möller committed
1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007
2001-06-24  Niels Mller  <nisse@cuckoo.hack.org>

	* src/xalloc.h (CHECK_TYPE) [DEBUG_ALLOC]: Added parentheses.
	* src/xalloc.h (CHECK_SUBTYPE) [DEBUG_ALLOC]: Likewise.

	* src/werror.c (werror_vformat): Implemented the 'p' (paranoia)
	modifier for %c.

	* src/client_escape.c (escape_dispatch): Use %pc with werror.

	* src/client.c (make_client_session): Check if stdin is a tty,
	when deciding on the default for escape char handling. 

2001-06-20  Niels Mller  <nisse@cuckoo.hack.org>

	* src/client_escape.c (do_escape_handler): Fixed the EOF case.