Changeset d309eb3
- Timestamp:
- Oct 17, 2002, 3:00:57 PM (22 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- e3869df
- Parents:
- aecf3e6
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
raecf3e6 rd309eb3 9 9 Added a workaround for a libzephyr bug that caused zwrites to fail 10 10 if zephyrs were sent just before and just after renewing tickets 11 Fixed a memory bug in getsubs 12 Added receive support for zcrypt messages 13 Added the 'zcrypt' variable which controls whether or not zcrypt 14 messages are decrypted 15 'reply' is disabled for zcrypt until sending zcrypt works 16 Started implementing zcrypt command 11 17 12 18 1.2.6 -
Makefile.in
r601a9e0 rd309eb3 13 13 functions.o zwrite.o viewwin.o help.o filter.o regex.o history.o view.o \ 14 14 dict.o variable.o varstubs.o filterelement.o \ 15 keypress.o keymap.o keybinding.o cmd.o context.o perlglue.o 15 keypress.o keymap.o keybinding.o cmd.o context.o perlglue.o zcrypt.o 16 16 17 17 AUTOGEN=owl_prototypes.h varstubs.c perlglue.c … … 42 42 # Only move owl_prototypes.h into place if the new one is different 43 43 owl_prototypes.h: codelist.pl varstubs.c $(OBJS:.o=.c) 44 perl codelist.pl > owl_prototypes.h.new44 perl codelist.pl | grep -v ZWRITEOPTIONS > owl_prototypes.h.new 45 45 @cmp -s owl_prototypes.h.new owl_prototypes.h || echo 'Interfaces changed!' 46 46 @cmp -s owl_prototypes.h.new owl_prototypes.h || mv -f owl_prototypes.h.new owl_prototypes.h -
commands.c
r2527615 rd309eb3 100 100 "-O opcode\n" 101 101 " Send to the specified opcode\n"), 102 103 /* 104 OWLCMD_ARGS("zcrypt", owl_command_zcrypt, OWL_CTX_INTERACTIVE, 105 "send an encrypted zephyr", 106 "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcde] [-m <message...>]\n", 107 "Behaves like zwrite but uses encryption. Not for use with\n" 108 "personal messages\n"), 109 */ 102 110 103 111 OWLCMD_ARGS("reply", owl_command_reply, OWL_CTX_INTERACTIVE, … … 1302 1310 } 1303 1311 return NULL; 1312 } 1313 1314 char *owl_command_zcrypt(int argc, char **argv, char *buff) { 1315 char *tmpbuff, *pos, *cmd, *msg; 1316 1317 /* check for a zwrite -m */ 1318 for (pos = buff; *pos; pos = skiptokens(pos, 1)) { 1319 if (!strncmp(pos, "-m ", 3)) { 1320 cmd = owl_strdup(buff); 1321 msg = cmd+(pos-buff); 1322 *msg = '\0'; 1323 msg += 3; 1324 owl_zwrite_create_and_send_from_line(cmd, msg); 1325 owl_free(cmd); 1326 return NULL; 1327 } 1328 } 1329 1330 if (argc < 2) { 1331 owl_function_makemsg("Not enough arguments to the zcrypt command."); 1332 } else { 1333 tmpbuff = owl_strdup(buff); 1334 owl_function_zwrite_setup(tmpbuff); 1335 owl_global_set_buffercommand(&g, tmpbuff); 1336 owl_free(tmpbuff); 1337 } 1338 return(NULL); 1304 1339 } 1305 1340 -
functions.c
r8fec514 rd309eb3 122 122 if (ret) { 123 123 owl_function_makemsg("Error in zwrite arugments"); 124 owl_zwrite_free(&z); 125 return; 126 } 127 128 /* send a ping if necessary */ 129 if (owl_global_is_txping(&g)) { 130 owl_zwrite_send_ping(&z); 131 } 132 owl_zwrite_free(&z); 133 134 /* create and setup the editwin */ 135 e=owl_global_get_typwin(&g); 136 owl_editwin_new_style(e, OWL_EDITWIN_STYLE_MULTILINE, owl_global_get_msg_history(&g)); 137 138 if (!owl_global_get_lockout_ctrld(&g)) { 139 owl_function_makemsg("Type your zephyr below. End with ^D or a dot on a line by itself. ^C will quit."); 140 } else { 141 owl_function_makemsg("Type your zephyr below. End with a dot on a line by itself. ^C will quit."); 142 } 143 144 owl_editwin_clear(e); 145 owl_editwin_set_dotsend(e); 146 strcpy(buff, "----> "); 147 strcat(buff, line); 148 strcat(buff, "\n"); 149 owl_editwin_set_locktext(e, buff); 150 151 /* make it active */ 152 owl_global_set_typwin_active(&g); 153 } 154 155 void owl_function_zcrypt_setup(char *line) { 156 owl_editwin *e; 157 char buff[1024]; 158 owl_zwrite z; 159 int ret; 160 161 /* check the arguments */ 162 ret=owl_zwrite_create_from_line(&z, line); 163 if (ret) { 164 owl_function_makemsg("Error in zwrite arugments"); 165 owl_zwrite_free(&z); 166 return; 167 } 168 169 if (owl_zwrite_get_numrecips(&z)>0) { 170 owl_function_makemsg("You may not specifiy a recipient for a zcrypt message"); 124 171 owl_zwrite_free(&z); 125 172 return; … … 1295 1342 1296 1343 buff=owl_malloc(num*500); 1297 tmpbuff=owl_malloc( 2048);1344 tmpbuff=owl_malloc(num*500); 1298 1345 strcpy(buff, ""); 1299 1346 for (i=0; i<num; i++) { … … 1512 1559 return; 1513 1560 } 1561 } 1562 1563 /* for now we disable replies to zcrypt messages, since we can't 1564 support an encrypted reply */ 1565 if (!strcasecmp(owl_message_get_opcode(m), "crypt")) { 1566 owl_function_makemsg("Replies to zcrypt messages are not enabled in this release"); 1567 return; 1514 1568 } 1515 1569 -
message.c
ra3ba748 rd309eb3 401 401 m->body[k]='\0'; 402 402 403 /* if zcrypt is enabled try to decrypt the message */ 404 if (owl_global_is_zcrypt(&g) && !strcasecmp(n->z_opcode, "crypt")) { 405 char *out; 406 407 out=owl_malloc(strlen(m->body)*16+20); 408 zcrypt_decrypt(out, m->body, m->class, m->inst); 409 owl_free(m->body); 410 m->body=out; 411 } 412 403 413 /* save the hostname */ 404 414 owl_function_debugmsg("About to do gethostbyaddr"); … … 547 557 char *body, *indent, *ptr, *zsigbuff, frombuff[LINE]; 548 558 ZNotice_t *n; 549 int len; 550 559 560 n=&(m->notice); 561 551 562 /* get the body */ 552 n=&(m->notice); 553 ptr=(owl_zephyr_get_message(n, &len)); 554 body=owl_malloc(len+20); 555 strncpy(body, ptr, len); 556 body[len]='\0'; 563 body=owl_malloc(strlen(m->body)+30); 564 strcpy(body, m->body); 557 565 558 566 /* add a newline if we need to */ … … 650 658 char *body, *indent, *ptr, *zsigbuff, frombuff[LINE]; 651 659 ZNotice_t *n; 652 int len; 660 661 n=&(m->notice); 653 662 654 663 /* get the body */ 655 n=&(m->notice); 656 ptr=(owl_zephyr_get_message(n, &len)); 657 body=owl_malloc(len+20); 658 strncpy(body, ptr, len); 659 body[len]='\0'; 664 body=owl_malloc(strlen(m->body)+30); 665 strcpy(body, m->body); 660 666 661 667 /* add a newline if we need to */ -
variable.c
r486688f rd309eb3 110 110 "Note that only messages received after this variable\n" 111 111 "is set will be affected." ), 112 113 OWLVAR_BOOL( "zcrypt" /* %OwlVarStub */, 1, 114 "Do automatic zcrypt processing", 115 "" ), 112 116 113 117 OWLVAR_ENUM_FULL( "disable-ctrl-d" /* %OwlVarStub:lockout_ctrld */, 1,
Note: See TracChangeset
for help on using the changeset viewer.