ChangeLog.1 97.7 KB
Newer Older
Niels Möller's avatar
Niels Möller committed
1
1999-12-20  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
2

3
	* src/scm/compiler.scm (split-list-at): New utility function.
Niels Möller's avatar
Niels Möller committed
4 5 6 7
	Fixed spelling of make-application.
	(do-let): Invoke the preprocessor on the value list.
	(make-flat-application): Accept a list of arguments.
	(flatten-application): Handle applications with more than one
8
	argument.
Niels Möller's avatar
Niels Möller committed
9 10 11 12 13 14 15 16 17 18 19
	(reduce-expr): New function to try to reduce expressions, mostly
	for debugging.

	* src/spki_commands.c (RETURN_USERKEYS): New macro.
	(spki_read_acl, spki_read_hostkeys): Use prog1 for proper
	evaluation order.
	(make_spki_read_userkeys): New function.

	* src/spki.c (do_spki_tag_list_match): Bug fix.
	(spki_sexp_to_tag_list): Bug fix.
	(spki_make_verifier): Take an sexp rather than an sexp_iterator as
20 21
	argument.
	(do_spki_lookup): Use the right syntax for public-key-expressions.
Niels Möller's avatar
Niels Möller committed
22 23 24 25 26 27 28 29 30 31 32 33 34

	* src/sexp_streamed_parser.c (do_parse_base64): Less trace info.
	(do_parse_literal_data): -"-

	* src/sexp_parser.c (sexp_parse_list_canonical): Bug fix: Advance
	buffer pointer after closing parenthesis.
	(sexp_parse_advanced, sexp_parse_canonical): Don't advance buffer
	pointer in the default case.

	* src/sexp.c (sexp2string): Bug fix.

	* src/lsh.c (do_options2identities): Bug fixes.

Niels Möller's avatar
Niels Möller committed
35
1999-12-14  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
36 37 38 39 40 41 42

	* src/lshd.c: General cleanup.
	* src/lsh.c: General cleanup.

	* src/client.h (REQUEST_SHELL): New macro.
	(CLIENT_START_IO): New macro.

Niels Möller's avatar
Niels Möller committed
43
1999-12-12  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

	* src/spki.h: Removed old code.
	* src/sexp.h: Removed old code.
	* src/server_session.c: Removed old code.
	* src/server_keyexchange.c: Removed old code.
	* src/resource.h: Removed old code.
	* src/publickey_crypto.h: Removed old code.
	* src/lsh.h: Removed old code.
	* src/lsh.c: Removed old code.
	* src/keyexchange.h: Removed old code.
	* src/keyexchange.c: Removed old code.
	* src/io_commands.c: Removed old code.
	* src/io.c: Removed old code.
	* src/format.h: Removed old code.
	* src/exception.c: Removed old code.
	* src/dsa.c: Removed old code.
	* src/digit_table.c: Removed old code.
	* src/daemon.h: Removed old code.
	* src/daemon.c: Removed old code.
	* src/connection_commands.c: Removed old code.
	* src/command.c: Removed old code.
	* src/channels.c: Removed old code.
	* src/combinators.c: Removed old code.
	* src/client_userauth.c: Removed old code.
68
	* src/client_keyexchange.c (do_init_client_dh): Removed old code.
Niels Möller's avatar
Niels Möller committed
69 70 71 72 73
	* src/client.c: Removed old code.
	* src/channel.c: Removed old code.
	* src/alist.c: Removed old code.

	* configure.in (AC_OUTPUT): Generate contrib/Makefile and
74
	contrib/lsh.spec.
Niels Möller's avatar
Niels Möller committed
75 76 77 78 79 80 81 82 83 84

	* Makefile.am.in (SUBDIRS): Added contrbi directory.

	* contrib/Makefile.am (EXTRA_DIST): Added files.

	* Added rpm spec file and redhat init script from Thayne Harbaugh
	<thayne@northsky.com>

	* configure.in: Bumped version to 0.1.19.

Niels Möller's avatar
Niels Möller committed
85
1999-12-09  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
86 87 88 89 90 91 92 93 94 95 96 97

	* src/testsuite/macros.m4: Various bug fixes.

	* src/testsuite/des-test.m4: Fixed tests.

	* src/testsuite/Makefile.am (EXTRA_DIST): Added .m4 files.

	* src/Makefile.am.in (SUBDIRS): Build testsuite subdir last.

	* make_am (SUBDIRS): Don't recurse on . in SUBDIRS.

	* configure.in (M4): Check for m4, and m4 handling eight-bit quote
98
	characters.
Niels Möller's avatar
Niels Möller committed
99

Niels Möller's avatar
Niels Möller committed
100
1999-12-07  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
101 102 103 104 105 106 107 108 109 110 111

	* configure.in: Generate src/testsuite/Makefile.
	Bumped version to 0.1.18.

	* src/Makefile.am.in (SUBDIRS): Added testsuite.
	(liblsh_a_SOURCES): Added spki_commands.c.
	(liblsh_a_LIBADD): Add @LIBOBJS@ here.
	(LDADD): Removed @LIBOBJS@.

	* src/client_keyexchange.c (do_init_client_dh): Use EXTRA argument
	as a hostkey lookup_verifier. Deleted the association
112
	algorithm->lookup_verifier.
Niels Möller's avatar
Niels Möller committed
113 114 115
	(make_dh_client): Deleted VERIFIERS argument.

	* src/spki_commands.h: Added extern keyword to declarations of
116
	commands.
Niels Möller's avatar
Niels Möller committed
117 118

	* src/spki_commands.c: Use three arguments with for_sexp. Better
119
	tracing.
Niels Möller's avatar
Niels Möller committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137

	* src/spki.h (spki_context): New method add_tuple.

	* src/spki.c (spki_private2public): New command, that replaces the
	private2public command.
	(parse_private_key): Use continuations and exceptions.
	(do_spki_parse_key): Parse c and e on to parse_private_key.
	(spki_parse_private_key_command): New command.
	(spki_add_acl): New function. Replaces spki_read_acls.
	(do_spki_add_tuple): New function.

	* src/sexp_commands.c (for_sexp_command): New command.
	Better trace output.

	* src/server_keyexchange.c (do_init_server_dh): Use the EXTRA
	argument as an alist algorithm->hostkey.
	(make_dh_server): Deleted the KEYS argument.

138
	* src/lshd.c: Adapted to new functions for reading keys and acls.
Niels Möller's avatar
Niels Möller committed
139 140

	* src/lsh_proxy.c: Some (possible broken) changes to get it to
141
	compile.
Niels Möller's avatar
Niels Möller committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162

	* src/lsh.c: Various bugfixes. Seems to work again now.

	* src/keyexchange.c (do_handle_kexinit): Disconnect if there is no
	common host key algorithm. Pass on "extra" to KEYEXCHANGE_INIT().

	* src/keyexchange.h: Added argument "extra" to init-method.
	(make_kexinit_handler): Added "extra" argument.

	* src/io_commands.h (LOG_PEER): New macro.

	* src/exception.h (EXC_ALL): New macro.

	* src/dsa.c (do_dsa_public_key): New function.

	* src/connection_commands.c (do_handshake): Pass "extra" argument
	to make_kexinit_handler.
	(handshake_info): New class.
	(handshake_command): New static command.

	* src/command.c (do_catch_apply): Bugfix for the ignore_value
163
	feature.
Niels Möller's avatar
Niels Möller committed
164 165 166 167 168 169 170
	(do_catch_simple): Initialize the ignore_value flag properly.
	(do_trace_continuation): Better tracing.

	* src/scm/gaba.scm (process-class): Fixed output of meta classes;
	mode #define to the declaration part of the output file.

	* src/lsh_writekey.c: Adapted to new functions for reading and
171
	converting keys.
Niels Möller's avatar
Niels Möller committed
172 173 174 175 176 177 178 179 180 181 182 183 184

	* src/lsh.c: Adapted to new functions for reading keys and acls.
	Not working yet.

	* src/io_commands.c: Use COMMAND_SIMPLE where possible.

	* src/io.c (io_read_file): New function.

	* src/digits.c (simple_decode_hex): New function.

	* src/command.h (COMMAND_SIMPLE): New macro (and renamed the old
	one to COMMAND_SIMPLE_CALL).

185
	* src/command.c (do_catch_apply): New ignore_Value option.
Niels Möller's avatar
Niels Möller committed
186 187 188 189 190 191 192 193 194 195
	Use COMMAND_SIMPLE where possible.

	* src/combinators.c: Use COMMAND_SIMPLE where possible.

	* src/channel.c (connection_service_command): Use COMMAND_SIMPLE.

	* src/abstract_crypto.c (crypt_string): New function.

	* src/spki_commands.c, src/spki_commands.h: New files.

Niels Möller's avatar
Niels Möller committed
196
1999-11-29  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
197 198 199

	* src/client_userauth.h (format_userauth_password,
	make_client_userauth, make_client_password_auth,
200
	make_client_publickey_auth): Moved from userauth.h.
Niels Möller's avatar
Niels Möller committed
201 202 203 204 205 206 207 208 209 210 211

	* src/userauth.h: Moved stuff to server_userauth.h.

	* src/userauth.c (format_userauth_failure,
	format_userauth_success): Moved to server_userauth.c.

	* src/server_session.c (server_connection_service): Removed
	backend attribute.
	(make_server_connection_service): Removed backend argument.

	* src/server_password.c (do_authenticate): Added service
212
	argument.
Niels Möller's avatar
Niels Möller committed
213 214

	* src/server_publickey.c (do_authenticate): Added service
215
	argument.
Niels Möller's avatar
Niels Möller committed
216 217 218 219 220

	* src/connection.h (ssh_connection): Added chain attribute, needed
	for proxying.

	* src/lshd.c (main): Don't pass backend to
221
	make_server_connection_service.
Niels Möller's avatar
Niels Möller committed
222 223 224

	* src/lsh.c: #include client_userauth.h

225
	* src/server_userauth.c (make_userauth_handler): New function.
Niels Möller's avatar
Niels Möller committed
226 227 228 229
	(format_userauth_failure): Moved here.
	(format_userauth_success): Moved here.
	(do_userauth): Use make_userauth_handler().
	(userauth_service): Moved to header file.
230

Niels Möller's avatar
Niels Möller committed
231
	* src/server_userauth.h (userauth_service): Moved from
232 233
	server_userauth.c.
	(userauth): Moved from userauth.h.
Niels Möller's avatar
Niels Möller committed
234 235 236 237 238 239 240

	* src/client_userauth.c (format_userauth_password): Made non-static.

	* src/proxy.c, src/proxy.h, src/proxy_session.c,
	src/proxy_session.h, src/proxy_userauth.h, src/proxy_userauth.c:
	New files (Bazsi)

241
	* src/lsh_proxy.c: New program (Bazsi).
Niels Möller's avatar
Niels Möller committed
242 243 244

	* src/Makefile.am.in (sbin_PROGRAMS): Added lsh_proxy.
	(liblsh_a_SOURCES): Added proxy.c proxy_session.c
245
	and proxy_userauth.c.
Niels Möller's avatar
Niels Möller committed
246 247 248 249 250 251 252

	* configure.in: Bumped version to 0.1.17.

	* AUTHORS: Added Bazsi to the list of authors.

	* src/sexp.c (sexp_assq): Bug fix.

253
	* src/lshd.c (main): Changed invocation of read_spki_key_file.
Niels Möller's avatar
Niels Möller committed
254 255 256 257

	* src/lsh.c (do_client_lookup): Better error messages. Write
	hostname properly in the ACL file.
	(main_argp_parser): Added options --strict, --sloppy and
258
	--capture-to.
Niels Möller's avatar
Niels Möller committed
259

Niels Möller's avatar
Niels Möller committed
260
1999-11-28  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
261

262
	* src/dsa.c (make_dsa_signer): #if:ed out some debug output.
Niels Möller's avatar
Niels Möller committed
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283

	* src/server_authorization.c (do_key_lookup): Some
	simplifications. Use make_ssh_dss_verifier().

	* src/lshd.c (main): Don't pass any signature algorithm to
	make_authorization_db().

	* src/lsh.c (client_host_db): Use SPKI ACL:s for authentication.

	* src/io.h: Removed forward declaration of lsh_fd.

	* src/dsa.c (do_dsa_sign_spki): New function.
	(do_dsa_verify_spki): New function.
	(make_dsa_signer): Use s-expressions for keys.
	(make_dsa_verifier): Use s-expressions for keys.
	(make_ssh_dss_verifier): New function.
	(ssh_dss_public_key): New function.

	* src/connection.h: Removed forward declaration of ssh_connection;
	it's now in the lsh.h.

284
	* src/bignum.c, src/bignum.h: Fewer includes in the header file.
Niels Möller's avatar
Niels Möller committed
285

286
	* src/atoms.in: Added r and s (for spki-style dsa signatures).
Niels Möller's avatar
Niels Möller committed
287 288 289 290 291 292 293 294 295 296

	* src/atoms.c: Use const tables.

	* src/abstract_crypto.h (signer, verifier, signature_algorithm):
	Use s-expressions for keys and signatures.

	* src/abstract_crypto.c (hash_string): New function.

	* src/publickey_crypto.h: Include fewer files.

Niels Möller's avatar
Niels Möller committed
297
1999-11-25  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
298 299

	* src/spki.h (spki_context): Added verifier argument to
300
	the lookup-method.
Niels Möller's avatar
Niels Möller committed
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322

	* src/spki.c (make_ssh_hostkey_tag): New function.
	(dsa_to_spki_public_key): New function.
	(do_spki_hash): Simplified.
	(parse_dsa_private_key): #ifdef'd out.
	(parse_private_key): Use an algorithm alist.
	(read_spki_key_file): Take algorithm alist as argument.
	(make_spki_subject): New function.
	(subject_match_hash): New function.
	(spki_state): New class.
	(spki_subject_by_hash): New function.
	(spki_make_verifier): New function.
	(do_spki_lookup): New function.
	(do_spki_authorize): New function.
	(make_spki_context): New function.

	* src/lsh.h: Forward declare various structs.

	* src/Makefile.am.in (atoms_gperf.c): Changed the flags to gperf,
	to avoid collision between "name" and "none". Allso added -C, to
	make the tables const.

Niels Möller's avatar
Niels Möller committed
323
1999-11-24  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
324 325 326 327

	* src/sexp.c (sexp_assq): Check length.

	* src/spki.h (make_spki_subject, make_spki_context): New
328
	functions.
Niels Möller's avatar
Niels Möller committed
329 330 331

	* src/atoms.in: Added signature and name.

Niels Möller's avatar
Niels Möller committed
332
1999-11-22  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
333

334
	* src/spki.h (spki_subject): New class.
Niels Möller's avatar
Niels Möller committed
335 336 337 338 339 340 341
	(spki_context): New class.

	* src/spki.c (make_spki_5_tuple): New function.
	(spki_acl_entry_to_5_tuple): New function.
	(spki_read_acls): New function.

	* src/sexp_parser.c (sexp_parse_list_canonical): Use
342
	queue_to_list_and_kill().
Niels Möller's avatar
Niels Möller committed
343 344 345 346 347 348 349

	* src/sexp.c (sexp_atom_eq): Bug fix.

	* src/queue.c (queue_to_list_and_kill): New function.

	* src/atoms.in: Added version, entry and propagate.

Niels Möller's avatar
Niels Möller committed
350
1999-11-21  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
351 352 353 354 355 356 357 358 359 360

	* src/spki.c (spki_sexp_to_tag): New function.
	Added classes for representing authorizations or (tag ...)
	expressions, for certificates and acl:s.

	* src/spki.h (spki_tag): New class.

	* src/sexp.c (sexp_atom_eq): New function.

	* src/process_atoms: Handle atoms with "*" in. Quote better, and
361
	output C symbols with sed 's/*/STAR/'.
Niels Möller's avatar
Niels Möller committed
362 363 364

	* src/format.c (lsh_string_prefixp): New function.

365
	* src/atoms.in: Added symbols for ACL:s and certificates.
Niels Möller's avatar
Niels Möller committed
366

Niels Möller's avatar
Niels Möller committed
367
1999-11-18  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
368 369 370 371 372 373 374 375 376 377

	* configure.in (SCHEME_PROGRAM): Use AC_PATH_PROGS, not
	AC_PATH_PROG. Reported by Kalle Olavi Niemitalo.

	* src/xalloc.c (number_of_strings): Global variable to keep track
	of the number of allocated strings.

	* src/blocking_write.c (do_blocking_write): Handle exceptions
	differently.

Niels Möller's avatar
Niels Möller committed
378
1999-11-16  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
379

Niels Möller's avatar
Niels Möller committed
380
	* Changed "Balazs" to "Balázs" in many files.
381 382

	* src/spki.h (spki_5_tuple): New class. Not used for anything yet.
Niels Möller's avatar
Niels Möller committed
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397

	* src/spki.c (spki_check_type): Use sexp_check_type().
	(dsa_private2public): Use sexp_assq().
	(parse_dsa_private_key): Use make_dsa_spki_signer().

	* src/sexp_streamed_parser.c (do_skip_comment): New function.
	(make_parse_comment): New function.
	(make_parse_advanced_sexp: New function. Implements only some
	features of the advanced syntax.

	* src/sexp.c (sexp_check_type): New function.
	(do_cons_assoc): New function.
	(do_cons_left): New function.
	(do_vector_assoc): New function.
	(do_vector_left): New function.
398
	(make_iter_vector): Return SEXP_NIL for empty vectors.
Niels Möller's avatar
Niels Möller committed
399 400 401
	(sexp_eq): New function.
	(sexp_assq): New function.

402
	* src/sexp.h (sexp_iterator): Added methods left and assoc.
Niels Möller's avatar
Niels Möller committed
403 404

	* src/lsh.c (do_sloppy_lookup): Works now (but doesn't save any
405
	keys).
Niels Möller's avatar
Niels Möller committed
406 407
	(main): Call lsh_open_tty.

408
	* src/lookup_verifier.h (lookup_verifier): Added method-argument.
Niels Möller's avatar
Niels Möller committed
409
	* src/server_authorization.c (do_key_lookup): Added method
410
	argument.
Niels Möller's avatar
Niels Möller committed
411 412 413 414 415 416 417
	* src/server_publickey.c (do_authenticate): Pass algorithm to
	lookup function.

	* src/io.c (write_raw_with_poll): Return an exception on error.
	(write_raw): -"-

	* src/format.c (lsh_string_eq, lsh_string_eq_l): Replaces
418
	lsh_string_cmp() and lsh_string_cmp_l().
Niels Möller's avatar
Niels Möller committed
419 420 421 422 423 424 425

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

	* src/interact.h: New file.

	* src/interact.c: New file.

Niels Möller's avatar
Niels Möller committed
426
1999-11-10  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
427 428 429 430 431 432 433

	* src/dsa.c (spki_init_dsa_public): New function.
	(make_dsa_spki_verifier): New function.
	(make_dsa_spki_signer): New function.

	* src/atoms.in: Added "x".

Niels Möller's avatar
Niels Möller committed
434
1999-11-09  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
435 436 437

	* src/dsa.c: Removed dsa_classic functions.

Niels Möller's avatar
Niels Möller committed
438
1999-11-08  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
439

440
	* src/lsh.c (sloppy_host_db): Renamed from fake_host_db.
Niels Möller's avatar
Niels Möller committed
441

442
	* src/Makefile.am.in (liblsh_a_SOURCES): Added sexp_parser again.
Niels Möller's avatar
Niels Möller committed
443 444 445 446 447 448 449 450 451 452

	* src/sexp_parser.c: Cleaned up, updated, and stripped down to
	handle canonical syntax only.

	* src/sexp_parser.h: Obsolete now.

	* src/sexp.h: Removed sexp_handler.
	(sexp_parse_canonical, string_to_sexp): Added prototypes for
	non-streamed parser.

Niels Möller's avatar
Niels Möller committed
453
1999-11-07  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474

	* src/exception.h (EXCEPTION_RAISE): Better tracing.

	* src/atoms.in: Added "md5" and "hash".

	* src/algorithms.c (lookup_hash): New function.

	* src/Makefile.am.in (bin_PROGRAMS): Install sexp_conv.
	(bin_SCRIPTS): Added lsh-authorize.

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

	* src/sha.c (sha1_algorithm): Renamed from sha_algorithm.

	* src/sexp_streamed_parser.c (do_parse_transport_sexp): Ignore
	white space.

	* src/sexp_conv.c (main_options): Added options --spki-hash,
	--raw-hash, --hash and --once. Used by the lsh-authorize script.

	* src/sexp_commands.c: Renamed print_sexp to sexp_print.
475
	(sexp_print_raw_hash): New command.
Niels Möller's avatar
Niels Möller committed
476 477 478 479

	* src/lsh-authorize: New script.

	* src/lsh.c: New option --no-publickey to disable publickey user
480
	authentication.
Niels Möller's avatar
Niels Möller committed
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514

	* configure.in: Bumped version to 0.1.15.

	* src/lsh.c (do_lsh_default_handler): Report i/o exceptions, but
	don't pass them on.

	* src/lshd.c (main): Use sha1 for authorized keys.

	* src/server_userauth.h (user_db): New class (not used for
	anything yet).

	* src/server_userauth.c (do_userauth_continuation): Ignore all
	userauth messages, when we have sent USERAUTH_SUCCESS.

	* src/publickey_crypto.h (keypair): Use int, not UINT32, for key
	type.

	* src/lsh.c: Publickey related bugfixes.

	* src/client_userauth.c (format_userauth_publickey_query): New
	function. (Bazsi)
	(format_userauth_publickey): New function. (Bazsi)
	Incorporated Bazsi's patch, with some reorganization.

	* src/ssh.h (SSH_FIRST_USERAUTH_GENERIC): New constant.
	(SSH_FIRST_USERAUTH_SPECIFIC): -"-
	(SSH_FIRST_CONNECTION_GENERIC): -"-
	(SSH_FIRST_CONNECTION_CHANNELS): -"-
	(SSH_FIRST_RESERVED): -"-
	(SSH_FIRST_LOCAL): -"-

	* src/version.h (SOFTWARE_SERVER_VERSION,
	SOFTWARE_CLIENT_VERSION): Use correct version numbers.

Niels Möller's avatar
Niels Möller committed
515
1999-11-06  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
516 517 518 519

	* src/lsh.c (main_argp_parser): Move reading of ~/.lsh/identity
	here, and check for getenv("HOME") being NULL.

Niels Möller's avatar
Niels Möller committed
520
1999-11-03  Balázs Scheidler  <bazsi@balabit.hu>
Niels Möller's avatar
Niels Möller committed
521

522
	* src/atoms.in: removed ssh-dss-kludge atom,
Niels Möller's avatar
Niels Möller committed
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

	* src/spki.c: spki_parse_key command added, read_spki_key_file() added

	* src/client.c: fixed flow control bug, ssh2 uses an initial
	window size != 0, and this caused problems in lsh client

	* src/client_userauth.c: reorganized, publickey auth added

	* src/connection_commands.c: changed a bug in buggy ssh peer detection

	* src/daemon.c: fixed a memory leak

	* src/lsh.c: added argument parsing for -i (identity)

	* src/lshd.c: lshd uses the new read_spki_key_file() function to read
	the hostkey

	* src/publickey_crypto.h: type field added to keypair

	* src/dsa.c: removed dsa_algorithm_kludge

	* src/server_authorization.c: fixed a few bugs

	* src/server_publickey.c: fixed a few bugs

Niels Möller's avatar
Niels Möller committed
548
1999-11-03  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
549 550

	* doc/NOTES: Added some thought about the client side of user
551
	authentication.
Niels Möller's avatar
Niels Möller committed
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569

	* src/lshd.c (do_read_key): Moved key reading to spki.c. (Bazsi)

	* src/spki.c (parse_dsa_private_key): Moved from lshd.c. (Bazsi)
	(parse_private_key): New function (Bazsi).
	(do_spki_parse_key): New function (Bazsi).
	(make_spki_parse_key): New function (Bazsi).
	(read_spki_key_file): New function (Bazsi).


	* src/server_publickey.c (do_authenticate): Changed the handling
	of PEER_SSH_DSS_KLUDGE. (Bazsi)

	* src/server_keyexchange.c (do_init_server_dh): Handle
	PEER_SSH_DSS_KLUDGE. (Bazsi)

	* src/publickey_crypto.c (make_keypair): Added type argument. (Bazsi)

570
	* src/publickey_crypto.h (keypair): Added type attribute. (Bazsi)
Niels Möller's avatar
Niels Möller committed
571 572 573 574 575 576

	* src/lsh.c (main_options): Added identity argument. (Bazsi)

	* src/keyexchange.c (do_handle_kexinit): Don't use
	ATOM_SSH_DSS_KLUDGE. (Bazsi)

577
	* src/exception.h (EXC_IO_OPEN_READ): New exception type. (Bazsi)
Niels Möller's avatar
Niels Möller committed
578 579 580 581 582 583 584 585 586 587 588 589 590

	* src/connection_commands.c (do_line): Fixed detection of ssh2.

	* src/client_keyexchange.c (dh_client): Added hostkey_algorithm
	attribute. (Bazsi)
	(do_handle_dh_reply): Handle the dss kludge here. (Bazsi)
	(do_init_client_dh): Don't use ATOM_SSH_DSS_KLUDGE. (Bazsi)

	* src/atoms.in: Removed ssh-dss-kludge. (Bazsi)

	* src/lshd.c (main): Deal with pid files after forking and
	daemonization, to get the right pid.

Niels Möller's avatar
Niels Möller committed
591
1999-10-25  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
592 593

	* src/werror.c (set_error_syslog): Call openlog(). Added id
594
	argument.
Niels Möller's avatar
Niels Möller committed
595 596 597 598 599 600 601 602

	* src/lshd.c (main): Daemonization support and options.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added daemon.c.
	(EXTRA_DIST): Removed mempcpy.h and strndup.h.

	* configure.in: Bumped version to 0.1.14.

Niels Möller's avatar
Niels Möller committed
603
1999-10-24  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
604 605 606 607 608 609 610 611 612 613 614 615 616 617 618

	* src/werror.c (werror_vformat): Added %a format specifier.

	* src/tcpforward.c (do_channel_open_direct_tcpip): Use a better
	exception handler.
	(do_channel_open_forwarded_tcpip): -"-

	* src/server_keyexchange.c (do_handle_dh_init): Use trace()
	instead of verbose():

	* src/read_line.c (make_read_line): Added assert().

	* src/lshd.c (main): Handle i/o exceptions.

	* src/io_commands.c (listen_command_callback): Added exception
619
	handler.
Niels Möller's avatar
Niels Möller committed
620 621
	(do_listen_continue): Use the proper exception handler.
	(make_listen_command_callback): Take an exception handler as
622
	argument.
Niels Möller's avatar
Niels Möller committed
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640

	* src/io.c (io_iter): Moved assert.
	(do_buffered_read): Treat unexpected EPIPE as an ordinary I/O
	error.
	(io_listen): Take an exception handler as argument.

	* src/format.c (ssh_vformat_write): Bug fix.

	* src/exception.c (do_report_exception_handler): Add newline at
	end of messages.
	(exception_raise): Fixed format string.

	* src/connection_commands.c (do_connection): Pass the right
	exceptionhandler to the make_ssh_connection constructor, instead
	of passing it to connection_init_io later on. This way,
	make_connection_read_line picks up the right exception handler.

	* src/connection.c (make_ssh_connection): Take an exception
641
	handler argument.
Niels Möller's avatar
Niels Möller committed
642 643 644 645 646 647 648 649 650 651 652 653
	(connection_init_io): Don't install any exception handler here;
	moved to make_ssh_connection instead.

	* src/client_keyexchange.c (do_handle_dh_reply): Use trace() instead
	of verbose():

	* src/channel_commands.c (do_install_global_request_handler):
	Friendlier trace messages.
	(do_install_channel_open_handler): -"-
	(do_install_fix_global_request_handler): -"-
	(do_install_fix_channel_open_handler): -"-

Niels Möller's avatar
Niels Möller committed
654
1999-10-19  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
655 656 657

	* src/mempcpy.c, src/mempcpy.h, src/strndup.c, src/strndup.h:
	Removed (definitions incorporated where needed in the files in
658
	src/argp/)
Niels Möller's avatar
Niels Möller committed
659 660 661 662 663 664 665 666

	* src/server_authorization.c (do_key_lookup): Some cleanup
	(Bazsi). Uses new instance variable index_name to construct the
	file name.
	(make_authorization_db): Added argument index_name (Bazsi).

	* src/server_publickey.c (do_authenticate): Fixed type (Bazsi).
	(do_authenticate): Include session id length field in the
667
	signature data.
Niels Möller's avatar
Niels Möller committed
668 669

	* src/lshd.c (main): Pass "keys_md5" to make_authorization_db().
670
	(Bazsi).
Niels Möller's avatar
Niels Möller committed
671 672 673 674 675

	* src/format.c (format_hex_string): New function (Bazsi).
	(ssh_vformat_length): Added hex 'x' modifier. (Bazsi).
	(ssh_vformat_write): -"-

Niels Möller's avatar
Niels Möller committed
676
1999-10-18  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
677 678 679 680

	* configure.in (AC_CHECK_MEMBER): New macro.
	(AC_CHECK_VAR): New macro.
	Check for program_invocation_name and
681
	program_invocation_short_name.
Niels Möller's avatar
Niels Möller committed
682 683 684 685 686 687 688 689
	Check for thread-safe i/o functions.

	* src/argp/argp.h: Don't include argp-comp.h. lsh-specific
	handling of getopt.h and PRINTF_STYLE.

	* src/argp/argp-help.c (strndup): Defined, if needed.
	(mempcpy): -"-

690
	* src/argp/argp-fmtstream.h: Removed inclusion of argp-comp.h.
Niels Möller's avatar
Niels Möller committed
691 692
	Include argp.h. Use PRINTF_STYLE for prototypes.

693
	* src/argp/Makefile.am (libargp_a_SOURCES): Added arp-pin.c.
Niels Möller's avatar
Niels Möller committed
694 695 696 697

	* acconfig.h: Added HAVE_PROGRAM_INVOCATION_NAME and
	HAVE_PROGRAM_INVOCATION_SHORT_NAME.

698
	* Makefile.am.in (MAKEFILESAM): Removed src/argp/Makefile.am.
Niels Möller's avatar
Niels Möller committed
699

700
1999-10-14  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
701 702 703

	* src/argp/argp-fmtstream.h: #include argp-comp.h.

704
	* configure.in: Check for fwrite_unlocked and fputs_unlocked.
Niels Möller's avatar
Niels Möller committed
705

706
1999-10-13  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
707 708

	* src/argp/argp-comp.h: Added ugly hack for fwrite_unlocked and
709
	fputs_unlocked.
Niels Möller's avatar
Niels Möller committed
710

Niels Möller's avatar
Niels Möller committed
711
1999-10-13  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
712 713 714 715 716 717 718 719 720 721 722 723 724 725

	* src/scm/Makefile.am.in (EXTRA_DIST): Added Makefile.am.in.

	* src/argp/argp.h: Use PRINTF_STYLE() instead of explicit
	__attribute__:s in declarations.

	* src/argp/argp-parse.c (parser_init): Added cast to void * to
	STORAGE macro.
	(__argp_usage, __option_is_short, __option_is_end ): Replicated
	definitons from argp.h.

	* src/argp/argp-help.c (argp_doc): Use strndup() instead of
	__strndup(). I couldn't get preprocessor hackery to work.

726
	* src/Makefile.am.in (EXTRA_DIST): Added mempcpy.h and strndup.h.
Niels Möller's avatar
Niels Möller committed
727

728
	* configure.in (gmp_header_found): Check for mempcpy and strndup.
Niels Möller's avatar
Niels Möller committed
729

730
1999-10-13  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
731 732 733 734 735 736 737 738

	* src/argp/argp.h: #include argp-comp.h.

	* src/argp/argp-parse.c (parser_init): Don't rely on GNU C's
	arithmetic on void *.

	* configure.in: Fix tests for --with-system-argp.

739
1999-10-12  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
740 741 742 743 744 745

	* src/argp/argp-help.c (fill_in_uparams): Use unsigned char.
	(canon_doc_option): Cast to unsigned char before passing
	characters to ctype macros.
	(hol_entry_cmp): Use unsigned char.

Niels Möller's avatar
Niels Möller committed
746
1999-10-11  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
747 748 749 750 751 752 753 754 755 756 757

	* src/argp/Makefile.am.in (libargp_a_SOURCES): Fixed typo (forgot
	the .c suffix).

	* src/sexp_conv.c (main): Pass HANDLER_CONTEXT.

	* src/sexp_commands.c (make_read_sexp_exception_handler): Added
	context argument.
	(do_read_sexp): Pass HANDLER_CONTEXT.

	* src/sexp.c (lookup_sexp_format): Use strcmp rather than
758
	strcasecmp.
Niels Möller's avatar
Niels Möller committed
759
	(sexp_input_argp, sexp_output_argp): Split sexp_argp into two
760
	parsers.
Niels Möller's avatar
Niels Möller committed
761 762

	* src/server_userauth.c (make_exc_userauth_handler): Added context
763
	argument.
Niels Möller's avatar
Niels Möller committed
764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786
	(do_userauth): Pass HANDLER_CONTEXT.

	* src/server_session.c (do_spawn_shell): Pass HANDLER_CONTEXT.

	* src/io.c (io_iter): Poll only on active fd:s.
	(init_file): Pass HANDLER_CONTEXT.
	(make_exc_finish_read_handler): Added context argument.

	* src/exception.h (exception_handler): Added context attribute.
	(HANDLER_CONTEXT): New macro.

	* src/exception.c (make_exception_handler): Added context argument.
	(make_report_exception_handler): -"-
	(exception_raise): New function.

	* src/connection_commands.c (do_connection): Pass HANDLER_CONTEXT.

	* src/connection.c (make_exc_protocol_handler): Added context argument.
	(connection_init_io): Pass HANDLER_CONTEXT.

	* src/command.h: Use DEBUG_TRACE.

	* src/command.c (make_trace): Define only if DEBUG_TRACE is
787
	defined.
Niels Möller's avatar
Niels Möller committed
788 789 790 791 792 793
	(make_catch_handler): Added context argument.
	(do_catch_apply): Pass HANDLER_CONTEXT.

	* src/client.c (do_client_io): Pass HANDLER_CONTEXT.

	* src/channel.c (make_exc_finish_channel_handler): New context
794
	argument.
Niels Möller's avatar
Niels Möller committed
795 796 797 798 799 800 801 802 803 804 805
	(make_channel_io_exception_handler): -"-
	(register_channel): Pass HANDLER_CONTEXT.

	* configure.in: Bumbed version number to 0.1.13.

	* src/sexp_conv.c (main): Make both input and output formats
	configurable.

	* src/lsh.c: Added argp support.
	* src/lshd.c: -"-
	* src/lsh_keygen.c: -"-
806

Niels Möller's avatar
Niels Möller committed
807 808 809 810 811
	* src/algorithms.c (algorithms_argp): Added argp parser.
	(init_algorithms_options): New function.

	* configure.in: Added with-debug-trace option.

Niels Möller's avatar
Niels Möller committed
812
1999-10-10  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
813 814 815

	* src/lsh.c: Use argp instead of getopt.

Niels Möller's avatar
Niels Möller committed
816
1999-10-07  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
817 818 819 820

	* src/lsh_types.h: Use HAVE_GCC_ATTRIBUTE.
	(FUNCTION_NAME): New define.

821
	* src/client.c (do_exit_status): Removed test of CHANNEL_SENT_EOF flag.
Niels Möller's avatar
Niels Möller committed
822 823 824 825
	(do_exit_signal): -"-

	* src/channel.c (do_channel_eof): Removed test of
	CHANNEL_SENT_CLOSE flag.
826 827
	(do_channel_write): Removed test of CHANNEL_SENT_EOF flag.
	(do_channel_write_extended): -"-
Niels Möller's avatar
Niels Möller committed
828 829 830 831 832 833 834

	* src/Makefile.am.in: Added correct path to compiler.scm.
	(SUBDIRS): Added argp sub directory.

	* configure.in: Added --with-system-argp.

	* acconfig.h: Renamed HAVE_ATTRIBUTE to HAVE_GCC_ATTRIBUTE. Added
835
	HAVE_GCC_FUNCTION.
Niels Möller's avatar
Niels Möller committed
836

Niels Möller's avatar
Niels Möller committed
837
1999-10-04  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
838 839

	* src/sexp_conv.c (main): Added argp support.
840
	* src/sexp.c (sexp_argp): -"-
Niels Möller's avatar
Niels Möller committed
841 842
	* src/werror.c (werror_argp): -"-

Niels Möller's avatar
Niels Möller committed
843
1999-10-02  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
844 845 846

	* src/Makefile.am.in (EXTRA_DIST): Removed make_class,
	make_char_classes and compiler.scm (which now live in the scm
847
	subdirectory).
Niels Möller's avatar
Niels Möller committed
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 881 882 883 884 885 886 887 888 889 890

	* src/tcpforward_commands.c (new_tcpip_channel): Register the fd
	on the channel's resources list.

	* configure.in: Bumped version to 0.1.12.

	* src/tcpforward.c (tcpip_channel_start_io): Use
	make_channel_read_close_callback rather than
	make_channel_close_callback. I haven't looked into exception
	handling for i/o errors yet.

	* src/server_session.c (do_alloc_pty): Put the pty on the
	channel's resources list rather than the connection's.

	* src/client.c (do_send_first): Removed this function.
	(do_client_io): Fixed setup of fd:s, and their close-callbacks and
	exception handlers. Also register the fd:s on the channel's
	resources list.

	* src/server_session.c (do_spawn_shell): Fixed close-callbacks and
	exception handlers for stdio. Also registers the fd:s on the
	channel's rather than the connection's resources list.

	* src/read_data.c: Removed all EOF-handling. Perhaps the rest of
	the code should be moved to channel.c?

	* src/channel.c (do_exc_finish_channel_handler): Kill the channel's
	resources when it is closed.
	(register_channel): Register the channel's resources list as an
	item on the connection's.
	(init_channel): Initialize resources list.
	(make_channel_read_close_callback): Renamed from
	make_channel_close_callback, for the same reason.
	(channel_io_exception_handler): Exception handler to close the
	channel on i/o errors. Primarily useful for fd:s the channel
	writes to.
	(make_channel_io_exception_handler): New function.

	* src/channel.c (channel_read_close_callback): Renamed from
	channel_close_callback. The previous behaviour, which used the
	callback for fd:s the channel writes to, was completely bogus.

	* src/channel.c (channel_close): Do nothing if we have already
891
	sent CHANNEL_CLOSE.
Niels Möller's avatar
Niels Möller committed
892 893 894
	(channel_eof): Do nothing if we have already sent CHANNEL_EOF, or
	either sent or received CHANNEL_CLOSE.

895
	* src/channel.h (ssh_channel): Added a resources attribute.
Niels Möller's avatar
Niels Möller committed
896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914

	* src/scm/gaba.scm: Renamed the struct-special type to
	indirect-special, as it is useful for non-structs.

	* src/debug.c (send_debug_message): New function, to
	unconditionally send a DEBUG message.
	(send_debug, send_verbose): Change argument type from struct
	ssh_connection to struct abstract_write.

	* src/resource.h: Made resource_list inherit
	resource. This means that KILL_RESOURCE_LIST is now more or less
	an alias for KILL_RESOURCE. Also made the resource-list behave a
	little like a weak list.

	* src/resource.c: Dead resources are unlinked from the list
	automatically while garbage collecting. This means that references
	from a resource list won't keep a dead resource from being garbage
	collected.

Niels Möller's avatar
Niels Möller committed
915
1999-09-30  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
916 917 918

	* configure.in: If no SCHEME_PROGRAM is found, use false.

Niels Möller's avatar
Niels Möller committed
919
1999-09-27  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
920 921 922 923 924 925 926 927 928

	* src/Makefile.am.in (SUBDIRS): Added scm subdirectory.
	(SCHEME): Added -l flag to load compatibility code for the right
	scheme implementation. Changed rules to use gaba.scm and
	make-char-classes.scm which have moved to the scm subdir.

	* configure.in: Bumped version to 0.1.11. Added --with-scheme
	option to select scheme implementation. Generate src/scm/Makefile.

929
1999-09-22  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
930 931 932 933 934 935 936

	* src/channel.c (channel_close_callback): Check the
 	CHANNEL_SENT_CLOSE flag before calling channel_close().

	* configure.in: Bumped version to 0.1.10.

	* src/server_publickey.c (do_authenticate): Initialize
937
	signature_start.
Niels Möller's avatar
Niels Möller committed
938 939 940 941 942 943

	* src/server.c (format_service_accept_kludge): Made function static.

	* src/spki.c (keyblob2spki): Reorganized a little, and initialize
 	and free the dsa_public struct properly.

944
	* src/lshd.c (do_read_key): Replaced keypair_info with keypair.
Niels Möller's avatar
Niels Möller committed
945 946 947 948 949 950 951

	* src/server_keyexchange.c (do_init_server_dh): -"-

	* src/lsh.c (main): Added trailing zeros in the getopt
 	initializer.

	*src/sexp_conv.c (main): -"-
952

Niels Möller's avatar
Niels Möller committed
953 954 955 956 957 958
	* src/dsa.c (init_dsa_public): New function.
	(make_dsa_signer): Use init_dsa_public.

	* src/exception.c: Use STATIC_EXCEPTION_HANDLER and
	STATIC_EXCEPTION.

959
1999-09-21  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
960 961 962 963

	* src/keyexchange.h: removed keypair_info class.

	* src/keyexchange.c: removed make_keypair_info function..
964

Niels Möller's avatar
Niels Möller committed
965 966 967 968 969 970 971 972 973
	* src/publickey_crypto.h: renamed keypair_info to keypair, and
 	moved here.

	* src/publickey_crypto.c: renamed make_keypair_info
 	renamed to make_keypair, and moved here.

	* src/sexp_streamed_parser.c (make_parse_transport_sexp): Fixed
	error message.

Niels Möller's avatar
Niels Möller committed
974
1999-09-21  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
975 976 977

	* src/read_data.c: Removed the EXC_IO_EOF handler.

Niels Möller's avatar
Niels Möller committed
978
1999-09-19  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
979 980 981 982 983 984 985 986 987 988 989 990 991

	* src/tcpforward_commands.c (forward_remote_port): Added a call to
	prog1, to get things evaluated at the right time.

	* src/server_session.c (do_spawn_shell): Simplified handling of
	exceptions. In particular, removed all handling of EXC_IO_EOF.

	* src/make_class (string-upcase): New function.
	(make-output): Associate any otherwise undefined global with a C
	symbol with the same name, but in uppercase.

	* src/lsh_writekey.c (read_sexp): Use transport syntax.

992
	* src/io.h (callback, callout): New classes.
Niels Möller's avatar
Niels Möller committed
993 994 995

	* src/io.c (do_buffered_read): Close fd on EOF.
	(do_consuming_read): On EOF, pass NULL to the consumer, and close
996
	fd.
Niels Möller's avatar
Niels Möller committed
997 998 999 1000 1001 1002 1003 1004 1005

	* src/exception.h (EXC_IO_EOF): Commented out this constant.

	* src/channel.c (do_channel_write): Handle EOF here.
	(do_channel_write_extended): -"-

	* src/sexp_streamed_parser.c (do_parse_base64): Bugfix: Increase
	done at the start of the loop.

Niels Möller's avatar
Niels Möller committed
1006
1999-09-09  Balázs Scheidler  <bazsi@balabit.hu>
Niels Möller's avatar
Niels Möller committed
1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023

	* src/lsh.c, src/lshd.c, src/sexp_conv.c: added some uninitialized
 	fields to structure inits to avoid warning

	* src/command.c: fixed typo, make_once_continution ->
	make_once_continuation

	* src/server_password.h: removed, contents moved to server_userauth.h

	* src/server_publickey.h: removed, contents moved to server_userauth.h

	* src/server_userauth.h: merged with former server_password.h &
	server_publickey.h

	* src/server_userauth.c: unix account handling funtions moved
	here, userauth_handler class.

Niels Möller's avatar
Niels Möller committed
1024
1999-09-07  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1025 1026 1027 1028 1029 1030 1031 1032

	* abstract_io.h channel.c channel.h channel_commands.c client.c
	command.c gc.c gc.h io.c lsh.c lsh.h lsh_writekey.c lshd.c
	read_data.c read_packet.c server_password.c service.h sexp_conv.c
	sexp_parser.c sexp_streamed_parser.c tcpforward_commands.c
	tcpforward_commands.h werror.c: Cleaned up and deleted old dead
	code.

1033
	* src/Makefile.am.in (liblsh_a_SOURCES): Removed sexp_parser.c
Niels Möller's avatar
Niels Möller committed
1034 1035 1036 1037

	* configure.in: Bumbed version to 0.1.9.

	* src/server_session.c (do_spawn_shell): Use better exception
1038
	handlers.
Niels Möller's avatar
Niels Möller committed
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050

	* src/read_data.c (do_exc_read_eof_channel_handler): Bugfix: Don't
	call channel_close() twice.

	* src/io_commands.c (do_listen): Raise a better exception.

	* src/io.h (close_callback): Changed return type to void.

	* src/exception.h (EXC_IO_LISTEN): New constant.

	* src/exception.c (make_report_exception_handler): New function.

1051
	* src/connection.c (packet_types): Made this table public.
Niels Möller's avatar
Niels Möller committed
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071

	* src/channel_commands.c (do_channel_open_command): Raise a more
	sensible exception.

	* src/channel.c (register_channel): Take a connections as
	argument, in order to install the right exception handler.
	(prepare_channel_open): -"-

	* src/debug.c (do_debug): Display packet type. Don't display
	USERAUTH_REQUEST messages.

	* src/channel.h (ssh_channel): Added a connection argument to
	CHANNEL_SEND.

	* src/client.c (do_send_first): New function, to add stdin to the
	connection's resources.

	* src/userauth.h (authenticate): Added connection argument.

	* src/userauth.c (format_userauth_failure): Moved here (from
1072
	server_userauth.c).
Niels Möller's avatar
Niels Möller committed
1073 1074 1075 1076 1077 1078
	(format_userauth_success): -"-
	(make_userauth_special_exception): New function.

	* src/spki.c: Assorted bug fixes.

	* src/sexp_streamed_parser.c (make_parse_transport_sexp): New
1079
	function.
Niels Möller's avatar
Niels Möller committed
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092
	(make_parse_base64): New function.

	* src/sexp_conv.c (main): Simplified exception handling.

	* src/sexp_commands.c: Commands to read and write s-expressions.

	* src/sexp.c (sexp2string): New function.
	(sexp2atom): New function.

	* src/server_userauth.c (do_exc_userauth_handler): Added handler
	for EXC_USERAUTH_SPECIAL.

	* src/server_password.c (do_authenticate): Added connection
1093
	argument.
Niels Möller's avatar
Niels Möller committed
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104

	* src/server_keyexchange.c (do_handle_dh_init): Make sending of
	debug messages conditional on the peer-flags.

	* src/read_scan.h: Flagged as obsolete.

	* src/lsh_writekey.c (do_write_key): Deleted function. Use the
	appropriate commands instead.
	(main): Adapted to new sexp parser.

	* src/keyexchange.c (invoke_ssh2_dsa_kludge_p): Removed this
1105
	function.
Niels Möller's avatar
Niels Möller committed
1106 1107 1108 1109 1110 1111 1112 1113
	(do_handle_kexinit): Use the connection's peer_flags rather than
	an explicit check of the version string.

	* src/io_commands.c (do_io_write_file, do_io_read_fd): New
	commands to read and write files.
	(make_io_write_file_info): New function.

	* src/io.c (do_buffered_read): Attempt to recover if the handler
1114
	disappears.
Niels Möller's avatar
Niels Möller committed
1115 1116
	(do_exc_io_handler): New exception handler.
	(init_file): Install exception handler to close the file on i/o
1117
	errors.
Niels Möller's avatar
Niels Möller committed
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132
	(io_write_file): New function.

	* src/exception.c (make_exception_handler): New function.

	* src/dsa.c (do_dsa_sign_kludge): Fixed ssh2 compatibility hack.
	(do_dsa_verify_kludge): -"-

	* src/digits.h (BASE64_PARTIAL): New constant.

	* src/digits.c (base64_init): Moved function to this file.
	(base64_decode): -"-

	* src/connection.h (ssh_connection): Added peer_flags field.

	* src/compiler.scm: Added comments describing the combinators
1133
	used.
Niels Möller's avatar
Niels Möller committed
1134 1135 1136 1137 1138 1139 1140 1141

	* src/command.h (PROG1): New global command.

	* src/client_keyexchange.c: instead of a simple verifier, an alist
	of verifiers is passed to make_dh_client(). Removed sending "Key
	exchange successful!" debug message, because it bugs ssh2. (Bazsi)


Niels Möller's avatar
Niels Möller committed
1142
1999-09-06  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1143

1144
	* src/atoms.c: Bugfix: Include <string.h> rather than <strings.h>.
Niels Möller's avatar
Niels Möller committed
1145 1146 1147

	* src/Makefile.am.in (liblsh_a_SOURCES): Added lookup_verifier.c,
	server_authorization.c, server_publickey.c and spki.c. Removed
1148
	read_scan.c.
Niels Möller's avatar
Niels Möller committed
1149 1150 1151

	* src/lshd.c (main): Create an authorization_db class (Bazsi).

Niels Möller's avatar
Niels Möller committed
1152
1999-07-23  Balázs Scheidler  <bazsi@balabit.hu>
Niels Möller's avatar
Niels Möller committed
1153 1154 1155 1156 1157 1158 1159

	* configure.in: merged different DATAFELLOWS workaround defines to
	a simple DATAFELLOWS_WORKAROUNDS, this affects a few files, for a
	list grep for DATAFELLOWS_WORKAROUNDS *.{c,h}

	* src/connection.h: peer_flags added to ssh_connection, workarounds
	and peer features have a flag here, which is then checked at
1160
	appropriate places.
Niels Möller's avatar
Niels Möller committed
1161 1162 1163 1164 1165 1166 1167

	* src/connection_commands.c (do_line): peer_flags is set according
	to the peer version,
	(split_version_string): new function

	* src/dsa.c (parse_dsa_public): made public, moved public key
	mpz_t initialization here. [No, I didn't move the initialization.
1168
	/nisse]
Niels Möller's avatar
Niels Möller committed
1169 1170 1171

	* src/server_authorization.c: new file, some public key checking
	is done
1172

Niels Möller's avatar
Niels Möller committed
1173
1999-07-22  Balázs Scheidler  <bazsi@balabit.hu>
Niels Möller's avatar
Niels Möller committed
1174 1175 1176 1177 1178 1179 1180 1181

	* src/lookup_verifier.{c,h}: new files. moved lookup_verifier
	class from client_keyexchange.h to separate files. It is also used
	by publickey authentication. Added an additional parameter to
	LOOKUP_VERIFIER: keyholder, which determines which host, or which
	user's keys should be checked.

	* src/dsa.c: do_dsa_verify_kludge() cleaned up
1182

Niels Möller's avatar
Niels Möller committed
1183
1999-07-11  Balázs Scheidler  <bazsi@balabit.hu>
Niels Möller's avatar
Niels Möller committed
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195

	* src/client.c: added DataFellows workaround for
	SSH_MSG_SERVICE_ACCEPT, compiled in conditionally if
	DATAFELLOWS_SSH2_SERVICE_ACCEPT_KLUDGE is defined.

	* src/server.c: -"-

	* configure.in: changed --with-ssh-dss-kludge option to
	--with-datafellows-workarounds

	* src/dsa.c: ssh2 dsa kludge fixes, added dsa_kludge_algorithm
	(only creates verifiers!)
1196 1197

	* src/lsh.c: added support for alist maps of lookup verifiers
Niels Möller's avatar
Niels Möller committed
1198 1199 1200 1201 1202 1203 1204

	* src/debug.c: fixed a bug in packet_debug class

	* src/connection.c: added debug messages for sent packets

	* src/server_keyexchange.c: removed "Key exchange successful!"
	[actually, made conditional. /nisse]
1205

Niels Möller's avatar
Niels Möller committed
1206
1999-09-05  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230

	* src/exception.h: Added SPKI-related exceptions.

	* src/atoms.in: Added spki-related names.

	* src/sexp_streamed_parser.c: Rewrote parser to use continuations
	and exceptions. For now, support for any encoding but
	SEXP_CANONICAL is dropped.

	* src/read_packet.c (do_read_packet): Handle available == 0 (EOF).
	* src/read_line.c (do_read_line): Handle available == 0 (EOF).

	* src/exception.h (EXC_SEXP, EXC_SEXP_SYNTAX, EXC_SEXP_EOF): New
	constants.

	* src/command.c: First attempt at a catch-command.

	* src/io.c (io_iter): Check for POLLNVAL.
	(do_buffered_read): Pass EOF to the read handler, rather than
	raising an exception.

	* src/Makefile.am.in: Added sexp_conv, sexp_commands.c.

	* sexp_commands.c, sexp_commands.h, sexp_conv.c, sexp_conv.h: New
1231
	files.
Niels Möller's avatar
Niels Möller committed
1232

Niels Möller's avatar
Niels Möller committed
1233
1999-09-04  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1234 1235

	* src/lsh.c (do_lsh_default_handler): Improved handling of I/O
1236
	exceptions.
Niels Möller's avatar
Niels Möller committed
1237 1238 1239 1240 1241

	* src/io_commands.c (do_connect): Improved exception handling.

	* src/io.c (io_connect): Added an exception_handler argument.

Niels Möller's avatar
Niels Möller committed
1242
1999-08-30  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1243 1244

	* Lots of files: Removed the exception argument from the
1245
	A_WRITE-method.
Niels Möller's avatar
Niels Möller committed
1246 1247 1248

	* src/exception.h (PROTOCOL_ERROR): New macro.

Niels Möller's avatar
Niels Möller committed
1249
1999-08-29  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263

	* src/read_packet.c (do_read_packet): The MAC memcmp test was
	inverted. A real old bug.

	* src/io.c (do_consuming_read): Use CAST_SUBTYPE.
	(do_buffered_read): Stop processing if fd->read is NULL. For
	example, if an exception handler tried to close the file.

	* src/exception.c (do_default_handler): Fixed format string.

	* src/channel.c (alloc_channel): Update in_use table properly. .

	* configure.in: Bumped version to 0.1.8.

Niels Möller's avatar
Niels Möller committed
1264
1999-08-28  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1265 1266 1267

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

Niels Möller's avatar
Niels Möller committed
1268
1999-07-04  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1269 1270 1271 1272 1273

	* src/command.c, src/command.h, src/lsh.c, src/lshd.c: Don't allow
	a NULL continuation. Instead, use discard_continuation to ignore
	the value.

Niels Möller's avatar
Niels Möller committed
1274
1999-07-01  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290

	* src/tcpforward_commands.c (new_tcpip_channel): Don't initialize
	rec_window_size and rec_max_packet hare; let make_tcpip_channel
	handle that.
	(forward_remote_port): Noted that this doesn't work; connect gets
	called too early.

	* src/tcpforward.c (make_tcpip_channel): Initialize
	rec_window_size and rec_max_packet.

	* src/channel.c (prepare_channel_open): Added debug output.

	* configure.in: Bumped version to 0.1.3

	* NEWS: Wrote an entry for 0.1.3

Niels Möller's avatar
Niels Möller committed
1291
1999-06-30  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309

	* src/tcpforward_commands.c (new_tcpip_channel): Initialize
	max_window and rec_window_size.
	(remote_port_install_continuation): Added a port variable.
	Various bug fixes.

	* src/tcpforward.c (make_tcpip_channel): Set the max_window
	attribute.
	(do_tcpip_channel_die): New function.
	(do_open_forwarded_tcpip_continuation): Initialize channel->write,
	and call tcpip_channel_start_io, if the connection was successful.

	* src/sexp_parser.c, src/sexp_streamed_parser.c: Use digits.h
	rather than duplicating code.

	* src/lsh.c (main): Fixed -N flag.

	* src/io_commands.c (connect_with_port): Fixed name. Was
1310
	connect_with_connection.
Niels Möller's avatar
Niels Möller committed
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337

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

	* src/digit_table.c (main): Remove #defines and static
	declarations from output.

	* src/command.h (COMMAND_RETURN): Evaluate the return value even
	if the continuation is NULL.

	* src/command.c (discard_continuation): New continuation.

	* src/channel_commands.c (do_install_global_request_handler):
	fixed format string to trace() call.
	(do_install_channel_open_handler): -"-
	(do_install_fix_global_request_handler): -"-
	(do_install_fix_channel_open_handler): -"-

	* src/digits.h: New file.

	* src/digits.c: New file.

	* src/channel.c (channel_start_receive): New function, to replace
	the LSH_CHANNEL_READY_REC flag.
	(do_channel_open_failure): Clear the open_continuation attribute.
	(do_channel_open_confirm): -"-
	(channel_close_callback): Handle the case reason == 0.

Niels Möller's avatar
Niels Möller committed
1338
1999-06-28  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1339 1340

	* src/tcpforward.h: Bugfix: Declare channel_open_forwarded_tcpip
1341
	extern.
Niels Möller's avatar
Niels Möller committed
1342

1343
	* src/channel.c (do_global_request_success): New function.
Niels Möller's avatar
Niels Möller committed
1344 1345 1346 1347 1348 1349 1350 1351 1352
	(do_global_request_failure): New function.
	(do_connection_service): Install handlers for
	SSH_MSG_REQUEST_SUCCESS and SSH_MSG_REQUEST_FAILURE.

	* src/lsh.c (main): Install a handler for forwarded-tcpip
	requests.

	* src/command.c (trace_command): New command.

Niels Möller's avatar
Niels Möller committed
1353
1999-06-23  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366

	* src/tcpforward_commands.c (forward_local_port): Use
	CAST_SUBTYPE() rather than CAST().

	* src/lsh.c (main): Added -R option.

	* src/io_commands.c (collect_listen): The _first_ argument is the
	callback function.

	* channel_commands.c, combinators.c, connection_commands.c,
	io_commands.c, tcpforward.c, tcpforward_commands.c: In collect_*
	functions, don't assert that info == NULL. It's info->next that
	should be NULL.
1367

Niels Möller's avatar
Niels Möller committed
1368 1369 1370 1371 1372 1373 1374
	* src/channel_commands.h (STATIC_INSTALL_GLOBAL_HANDLER): Bug fix,
	use STATIC_COLLECT_2_FINAL.
	(STATIC_INSTALL_OPEN_HANDLER): -"-

	* doc/TODO: Updated the section on the control language.

	* src/lshd.c (lshd_connection_service): Call connection_service to
1375
	initialize the connection, before logging in.
Niels Möller's avatar
Niels Möller committed
1376 1377 1378 1379 1380 1381

	* src/lsh.c (make_client_connect): Take advantage of
	connection_service being a constant.

	* src/make_class (process-expr): Generate a call to trace().

Niels Möller's avatar
Niels Möller committed
1382
1999-06-22  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1383 1384 1385 1386

	* src/command.h: Never pass a NULL as the first argument of a
	collect_* function.

1387
1999-06-21  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1388 1389 1390 1391 1392

	* src/server_session.c (make_server_connection_service):
	Reorganized the commands to initialize a connection.

	* src/lshd.c: Use the "hook"-mechanism to install handlers on the
1393
	connection.
Niels Möller's avatar
Niels Möller committed
1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414

	* src/lsh.c (main): Don't use the old function
 	make_connection_service.

	* src/io_commands.c (connect_port): Renamed from
	connect_connection.
	(connect_connection): New command.

	* src/connection_commands.c (do_connection_remember): Commented
	out this unused function.

	* src/channel_commands.h (STATIC_INSTALL_GLOBAL_HANDLER): New
	macro. Currently broken.
	(STATIC_INSTALL_OPEN_HANDLER): -"-

	* src/channel_commands.c (make_install_fix_channel_open_handler):
	New function.
	(make_install_fix_global_request_handler): -"-

	* src/channel.c: Keep information about channel_types and
	global_requests in the channel_table, rather than in the packet
1415
	handlers.
Niels Möller's avatar
Niels Möller committed
1416 1417 1418
	(make_connection_service): Removed this function. The command is
	now statically allocated.

Niels Möller's avatar
Niels Möller committed
1419
1999-06-20  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1420 1421 1422 1423 1424

	* src/command.h (STATIC_COLLECT_1_FINAL): Commented out this
	redundant macro.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added
1425
	tcpforward_commands.c.
Niels Möller's avatar
Niels Möller committed
1426

Niels Möller's avatar
Niels Möller committed
1427
1999-06-17  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1428 1429 1430 1431

	* src/tcpforward.c, src/tcpforward_commands.c: Reorganization.
	Keep low-level protocol stuff in tcpforward.c, and move higher
	level functionality in tcpforward_commands.c.
1432

Niels Möller's avatar
Niels Möller committed
1433 1434 1435 1436 1437 1438 1439 1440
	* src/io_commands.c (make_connect_connection): New function.

	* src/connection_commands.c (connection_remember_command): New
	command, currently not used.

	* src/command.h (STATIC_COMMAND): New macro.

	* src/tcpforward_commands.h: New file
1441
	* src/tcpforward_commands.c: New file
Niels Möller's avatar
Niels Möller committed
1442

Niels Möller's avatar
Niels Möller committed
1443
1999-06-15  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1444 1445

	* src/tcpforward.c: Made forwarded_port a super class for
1446
	local_port and remote_port.
Niels Möller's avatar
Niels Möller committed
1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461
	(do_channel_open_direct_tcpip): Free dest_host on failure.
	(make_forward_listen): Added backend parameter.
	(remote_port): New class.
	(make_remote_port): New function.
	(remote_port_install_continuation): New class.
	(make_remote_port_install_continuation): New function.
	(request_tcpip_forward_command): New class.
	(make_request_tcpip_forward_command): New function.
	(remote_listen_value): New class.
	(make_remote_listen_value): New function.
	(start_forwarded_client_io): New command.
	(make_start_forwarded_client_io) New function.
	(make_forward_remote_port): New expression.
	(forward_remote_port): New function.

1462
	* src/lsh.c (main): Pass backend to forward_local_port().
Niels Möller's avatar
Niels Möller committed
1463 1464

	* src/io_commands.c (collect_listen): Use CAST_SUBTYPE rather than
1465
	CAST.
Niels Möller's avatar
Niels Möller committed
1466 1467

	* src/connection.h (ssh_connection): Removed forwarded_pots
1468
	attribute (moved to channel_table).
Niels Möller's avatar
Niels Möller committed
1469 1470 1471 1472

	* src/command.h (STATIC_COLLECT_1_FINAL): New macro.

	* src/channel_commands.c (do_channel_global_command): New
1473
	function.
Niels Möller's avatar
Niels Möller committed
1474 1475 1476 1477 1478 1479 1480

	* src/channel.h (channel_table): Moved information about forwarded
	ports here.

	* src/channel.c (make_channel_table): Initialize queues for
	handling global requests.

Niels Möller's avatar
Niels Möller committed
1481
1999-06-14  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524

	* configure.in: Added option -with-tcp-forward.
	Bumped version to 0.1.2.

	* src/queue.c (object_queue_init): New function.
	(object_queue_is_empty): New function.
	(object_queue_add_head): Update length.
	(object_queue_add_tail): -"-
	(object_queue_remove_head): -"-
	(object_queue_remove_tail): -"-
	(queue_to_list): New function.
	(object_queue_kill): New function.

	* src/queue.h (object_queue): Added length attribute.
	(FOR_OBJECT_QUEUE_REMOVE): Update length.

	* src/read_data.c (do_read_data): When the channel
	is closed because  of a read failure, don't throw away the
	return value from channel_close().

	* src/tcpforward.h (forwarded_port): Don't inherit resource.

	* src/tcpforward.c (do_direct_tcp_server_start_io): Fix flow control.
	(make_tcpip_channel): -"-
	(channel_open_direct_tcpip): Renamed (was open_direct_tcp).
	(do_channel_open_direct_tcpip): Renamed similarly.
	(make_channel_open_direct_tcpip): -"-
	(open_forwarded_tcpip_command): Renamed (was open_tcpip_command).
	(new_forwarded_tcpip_channel): Renamed similarly.
	(make_open_forwarded_tcpip_command): -"-
	(do_forward_start_io): Removed redundant assignment to
	channel->socket.
	(open_direct_tcpip_command): New class.
	(new_direct_tcpip_channel): New function.
	(make_open_direct_tcpip_command): New function.
	(open_direct_tcp): New command.
	(make_forward_local_port): New expression.
	(forward_local_port): New function.

	* src/server_session.c (do_spawn_shell): Fix flow control.

	* src/client.c (make_client_session): Fix flow control.

1525
	* src/channel.h (ssh_channel): Inherit flow_controlled.
Niels Möller's avatar
Niels Möller committed
1526 1527 1528 1529

	* src/channel.c (adjust_rec_window): Adapted for flow control.
	(channel_process_status): On LSH_CHANNEL_READY_REC, call
	prepare_window_adjust and c->write directly, rather than
1530
	adjust_rec_window.
Niels Möller's avatar
Niels Möller committed
1531
	(do_channel_data): Don't call adjust_rec_window.
1532
	(do_channel_extended_data): -"-
Niels Möller's avatar
Niels Möller committed
1533 1534 1535 1536 1537 1538
	(init_channel): Install adjust_rec_window as flow control callback.

	* src/lshd.c (main): Added a --no-forward option.

	* src/lsh.c (make_client_connect): Don't invoke open_session here;
	instead use progn to apply a list of "actions"-commands to the
1539
	connection.
Niels Möller's avatar
Niels Möller committed
1540 1541 1542 1543 1544 1545 1546 1547 1548
	(make_start_session): New command, do open a session and send some
	requests to it.
	(parse_forward_arg): New function, to parse arguments to -L and -R.
	(main): Build a list of "actions" when parsing the options. Added
	options -L, -N, -g.

	* src/write_buffer.h (flow_controlled): New class.
	(write_buffer): Added REPORT attribute.

1549
	* src/write_buffer.c (write_buffer_consume): Do flow control.
Niels Möller's avatar
Niels Möller committed
1550 1551 1552 1553 1554 1555

	* src/publickey_crypto.h (make_dsa_verifier_kludge,
	make_dsa_signer_classic, make_dsa_verifier_classic): New
	functions.

	* src/publickey_crypto.c: Moved the dsa-ralated code to a separate
1556
	file.
Niels Möller's avatar
Niels Möller committed
1557 1558 1559 1560 1561 1562 1563 1564

	* src/io.c (io_iter): Close fd:s that report POLLHUP.

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

	* src/dsa.c: New file. Extracted from publickey_crypto.c. Also
	fixed the dsa signature format to match the latest draft.

Niels Möller's avatar
Niels Möller committed
1565
1999-06-12  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584

	* configure.in: Bump version to lsh-0.1.1

	* src/lsh.c (main): Reset the tty mode before return.

1999-06-12    <nisse@cuckoo.localdomain>

	* src/lsh_keygen.c (main): Use %xn rather than %hn for debug().
	* src/lshd.c (do_read_key): -"-
	* src/publickey_crypto.c (dsa_hash): -"-
	(generic_dsa_sign): -"-
	(do_dsa_verify): -"-

	* src/channel.c (make_channel_table): Initialize
	active_global_requests and pending_global_requests.
	* src/channel.c, src/channel.h: object_queues should be declared
	as structs.
	* src/connection.c, src/connection.h: -"-
	* src/tcpforward.c: -"-
1585

Niels Möller's avatar
Niels Möller committed
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597
1999-06-11    <nisse@cuckoo.localdomain>

	* src/tcpforward.c (direct_tcp_server_start_io): Renamed class,
	and related functions. Was forward_server_start_io.
	(do_forward_start_io): Renamed. Was do_forward_client_io.

	* src/io_commands.h (LISTEN_COMMAND): New define.

	* src/tcpforward.c (do_tcpip_forward_request): Use GLOBAL_REQUEST_CALLBACK().
	(do_tcp_forward_continuation): -"-
	Various bug fixes.

1598
	* src/channel.c (global_request_status): New class.
Niels Möller's avatar
Niels Möller committed
1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
	(make_global_request_status): New function.
	(global_request_response): New class.
	(do_global_request_response): New function.
	(make_global_request_response): New function.
	(do_global_request): Pass a callback object to the handler.

	* src/channel.h (channel_table): New attributes
	active_global_requests and pending_global_requests.
	(global_request_callback): New class.
	(global_request): Let the handler method take a
	global_request_callback as argument.

1611
	* src/channel_commands.h (global_request_command): New class.
Niels Möller's avatar
Niels Möller committed
1612 1613 1614 1615 1616 1617 1618
	(do_channel_global_command): New function (not yet implemented).

	* src/queue.c (lsh_queue_peek_head): New function.
	(lsh_queue_peek_tail): -"-
	(object_queue_peek_head): -"-
	(object_queue_peek_tail): -"-
	(object_queue_get_contents): Cast here, rather than in all calling
1619
	functions.
Niels Möller's avatar
Niels Möller committed
1620 1621 1622 1623 1624 1625

	* src/io_commands.c (listen_connection): Adapted to the needs for
	tcp forwarding.
	(make_listen_command): New function.

	* src/make_class (process-expr): Include the compiler output in a
1626
	comment.
Niels Möller's avatar
Niels Möller committed
1627 1628 1629 1630

1999-06-07    <nisse@cuckoo.localdomain>

	* src/werror.c (werror_vformat): Removed 'h'-modifier. Use 'x'
1631
	instead.
Niels Möller's avatar
Niels Möller committed
1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658

	* src/queue.h (struct object_queue_node): Made this structure public.
	(FOR_OBJECT_QUEUE): Traverse an object_queue (Bazsi).
	(FOR_OBJECT_QUEUE_REMOVE): Somewhat ugly macro to delete the
	current node inside a for-loop.

	* src/lshd.c (main): Added tcpforward support (Bazsi).

	* src/io.h (address_info): Renamed the ADDRESS field. Is now
	called IP.

	* src/io.c (io_iter): When closing a file, always invoke its close
	callback (if it is non-NULL). Previously, the callback was never
	invoked if fd->close_reason was zero.

	(io_iter): Some handling of POLLHUP and POLLPRI.

	* src/format.h (lsh_string_cmp, lsh_string_cmp_l): New functions
	(don't really belong in this file).

1999-06-06    <nisse@cuckoo.streamserve.com>

	* src/dsa_keygen.c (dsa_nist_gen): Bugfix: Removed extra mpz_init().

1999-06-07    <nisse@cuckoo.localdomain>

	* src/connection.h (ssh_connection): New field forwarded_ports
1659
	(Bazsi).
Niels Möller's avatar
Niels Möller committed
1660

1661
1999-05-26  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1662

1663
	* src/client.c: #include signal.h (reported by MArtin Jabobsson).
Niels Möller's avatar
Niels Möller committed
1664

1665
1999-05-12  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1666 1667 1668

	* Configure tests for strerror and strsignal.

1669
1999-05-11  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687

	* src/sexp_test.c (main): Create the fd objects properly (old
	problem).

	* src/server_session.c (do_spawn_shell): Fixed typo.
	(do_send): Handle the case that session->err is NULL.

	* src/server_pty.c: Added a better warning message if opening
 	/dev/ptmx failes.

	* src/keyexchange.c (parse_kexinit): Use the improved
	parse_atom_list() function.

	* src/parse.c (parse_atoms): New function.
	(parse_atom_list): Read length field first, so that callers don't
	have to call parse_sub_buffer() manually.

	* src/client_pty.c (do_pty_continuation, make_pty_request): Moved
1688
	the call of CFMAKERAW (Bazsi).
Niels Möller's avatar
Niels Möller committed
1689 1690 1691 1692 1693 1694 1695

	* src/channel.c (adjust_rec_window): Don't touch the
 	rec_window_size attribute here; that's done in
 	prepare_window_adjust().
	(do_channel_data, do_channel_extended_data): rec_window_size was
 	updated too many times, fixed. (Bazsi).

1696
1999-05-10  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710

	* src/server_session.c (make_pty): Added BASH_WORKAROUND (Bazsi).
	(server_session, do_spawn_shell): Allow the session->err field to
	be NULL. Probably some more functions need updating.

	* src/server_pty.c (pty_check_permissions): New function,
 	extracted from pty_grantpt_uid.
	(pty_allocate): Do some permissions check also on BSD (Bazsi).
	Also disabled the openpty() version.

	* src/crypto.h, src/Makefile.am.in: IDEA support (Bazsi).

	* src/idea.c: New file (Bazsi).

1711
1999-05-09  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1712 1713 1714 1715

	* src/keyexchange.c, src/keyexchange.h (kex_build_secret): New
 	function, implementing the changed session key generation in the
	transport-05 draft (pointed out by Joseph Galbraith).
1716

Niels Möller's avatar
Niels Möller committed
1717 1718 1719 1720 1721 1722 1723 1724
	* src/server_keyexchange.c (do_handle_dh_init): Use
 	kex_build_secret().

	* src/client_keyexchange.c (do_handle_dh_reply): Use
 	kex_build_secret().

	* src/Makefile.am.in (EXTRA_DIST): Added compiler.scm to the dist.

1725
1999-04-25  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752

	* src/channel.c, src/channel.h, src/client.c, src/client.h,
 	src/client_pty.c, src/client_pty.c, src/command.h,
 	src/connection.c, src/keyexchange.c, src/lsh.c, src/lshd.c,
 	src/queue.c, src/resource.c, src/server.h, src/server_password.c,
 	src/server_pty.h, src/server_session.c, src/service.c,
 	src/service.h, src/session.c, src/tcpforward.c,
 	src/write_buffer.c, src/zlib.c: Removed old #if:ed out code.

	* src/server_session.c (do_close): Return a status code, rather
	than void.

	* src/lshd.c (main): Added pty support.

	* src/client_pty.c (make_pty_request): Bugfix: Select raw mode.

	* src/client.c (do_client_session_eof): Renamed the
	close_client_session function.
	(do_client_session_close): New function, to set the PENDING_CLOSED
	flag when the session is closed.
	(make_client_session): Install a close method.

	* src/channel.h (ssh_channel): Let the close method return a
	status value.
	* src/channel.c (channel_process_status): Moved processing of
	LSH_CHANNEL_PENDING_CLOSE after LSH_CHANNEL_FINISHED. This way, it
	is possible for the channels close-callback to return
1753
	LSH_CHANNEL_PENDING_CLOSE.
Niels Möller's avatar
Niels Möller committed
1754

1755
1999-04-20  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1756 1757 1758 1759 1760 1761 1762 1763

	* src/resource.c (do_kill_all): Bugfix (use CAST_SUBTYPE rather
 	than CAST).

	* src/lsh.c (make_client_connect): Added calls die_on_null and
 	init_connection.

	* src/client.c (new_session): Initialize session->write from the
1764
	connection.
Niels Möller's avatar
Niels Möller committed
1765

1766
1999-04-19  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781

	* src/channel.c (do_channel_success, do_channel_failure): Bugfix
 	(use CAST_SUBTYPE rather than CAST).

	* src/lsh.c: Adapted to the command language.

	* src/command.c (do_progn): Bug fix.

	* src/client_pty.c (make_pty_request): New function.

	* src/client.c (do_client_io): Renamed the do_io function, and
	turned it into the client_io command.
	(make_client_session): Removed the requests argument.
	(do_format_shell_request): New function.
	(request_shell): New command.
1782
	#if:ed out a lot of old code. pty handling moved to client_pty.h.
Niels Möller's avatar
Niels Möller committed
1783 1784 1785 1786 1787 1788

	* src/channel_commands.c (do_channel_request_command): Pass
	continuation pointer to the FORMAT_CHANNEL_REQUEST method.

	* src/invert-defs: Don't use echo "\n" (Bazsi).

1789
1999-04-18  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1790 1791 1792 1793 1794