Commit Graph

288 Commits (master)
 

Author SHA1 Message Date
Michael Santos 8a132c4565 build: cleanup: remove unused target 5 months ago
Michael Santos 4a94cab3b2 termux/android: seccomp: allow prctl(2) 5 months ago
Michael Santos 73e1f03625 termux/android: stdin: remove call to fcntl()
Remove an unnecessary call to put stdin into non-blocking mode. On
termux/android, xmppipe is aborted when the fd capability set is
changed:

```
FORTIFY: fcntl(F_SETFD) passed non-FD_CLOEXEC flag: 0x800
libc: FORTIFY: fcntl(F_SETFD) passed non-FD_CLOEXEC flag: 0x800
libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 32292
(xmppipe), pid 32292 (<unknown>)
libc: failed to spawn debuggerd dispatch thread: Try again
```
5 months ago
Michael Santos bcb3cc20b6 0.16.0 6 months ago
Michael Santos 56424a335a --format=csv: increase default buffer size
Input is percent-encoded when colon separated values mode is
enabled. Account for the percent encoding overhead (each character is
encoded as 3 characters) in the default buffer size.

Work around for message boundary bugs in csv mode, e.g.,
* only the first lihe delimited value is read: multiple lines may be in
  the buffer
* a buffer may contain a partial message
6 months ago
Michael Santos 9ac4867fe4 stream: run handlers if sm is disabled 6 months ago
Michael Santos 091baaf1fa ping: remove variable reinitialization 6 months ago
Michael Santos 49133ef253 ping: use a constant stanza ID 6 months ago
Michael Santos 93dcf31d91 discovery: fix: use generated UUID 6 months ago
Michael Santos 197b901fef discovery: generate stanza id 6 months ago
Michael Santos 1471e463a2 chat: send disco
Fix http upload for 1 to 1 chat sessions.
6 months ago
Michael Santos f763e31ffd muc,send: constify 6 months ago
Michael Santos 449099958a chat: fix bare domain name
TIL XMPP JIDs can be bare domain names:

    xmppipe --chat example.com

xmppipe parses that as: example.com@yourdomain.com

As a hacky workaround, for chats only, check if the JID contains a
period. JIDs containing a period such as firstname.lastname need to use
the full JID:

    xmppipe --chat firstname.lastname@example.com
6 months ago
Michael Santos f8db1cbd99 util: constify 6 months ago
Michael Santos 18ddc176c7 iq: remove variable reinitialization 6 months ago
Michael Santos 027b7fe957 message: remove variable reinitialization 6 months ago
Michael Santos 40fe4a04cf muc: remove variable reinitialization 6 months ago
Michael Santos 8474c17322 null: remove variable reinitialization 6 months ago
Michael Santos 6d1f732c1f presence: remove variable reinitialization 6 months ago
Michael Santos 45de19f346 capsicum: remove variable reinitialization 6 months ago
Michael Santos 44b9a967e6 rlimit: remove variable reinitializations 6 months ago
Michael Santos 61c624d1e6 stream management: remove variable reinitializations 6 months ago
Michael Santos 7554e6c1c5 version: remove variable reinitializations 6 months ago
Michael Santos 018662c2ef send: remove variable reinitializations 7 months ago
Michael Santos 0bcbd72f86 fmt: remove variable reinitializations 7 months ago
Michael Santos 2181666812 conn, event: remove variable reinitializations 7 months ago
Michael Santos f987fd95e7 cleanup: variable reinitializations 7 months ago
Michael Santos 56ef393916 cleanup: remove variable reinitialization 7 months ago
Michael Santos 2a22204ff2 cleanup: duplicate variable initialization 7 months ago
Michael Santos 21e7da86b4 cleanup: strtonum: error check 7 months ago
Michael Santos 1da079b53d capsicum: close any unknown fd's 7 months ago
Michael Santos 4d79bddf56 ping: install a pong handler
Respond to server pings:

https://xmpp.org/extensions/xep-0199.html#s2c

```
xmpp DEBUG RECV: <iq id="rr-1694698253331-17375542133555098656-wf3J7kbG6j8Ft5Vx0cMY99txsW8=-55238004" type="get" to="msantos@example.com/110052433108464573191602" from="example.com"><ping xmlns="urn:xmpp:ping"/></iq>
conn DEBUG SENT: <iq id="rr-1694698253331-17375542133555098656-wf3J7kbG6j8Ft5Vx0cMY99txsW8=-55238004" to="example.com" type="result" from="msantos@example.com/110052433108464573191602"/>
```

Thanks @jessiehowell !

Fixes https://github.com/msantos/xmppipe/issues/9
8 months ago
Michael Santos 78807f1b15 build: enable warnings 9 months ago
Michael Santos 24b5a81456 Replace ctype usage
The ctype functions are error prone. The argument is an int which must
be in the range of an unsigned char and is interpreted based on the
locale:

    These functions check whether c, which must have the value of
    an unsigned char or EOF, falls into a certain character class
    according to the  specified  locale. The  functions without the
    "_l" suffix perform the check based on the current locale.
10 months ago
Michael Santos ff574f6412 capsicum: disable fs writes
Use RLIMIT_FSIZE to disable writes to the filesystem when stdout is not
a regular file.
11 months ago
Michael Santos 1a180c7655 rlimit: test if stdout is a file
Fix rlimit process restriction in commit 29d29f21:
* fd 1 is opened by the parent: enforce restrictions at startup
* enable RLIMIT_FSIZE if fd 2 is not a regular file
* fix compile error
11 months ago
Michael Santos 29d29f21c7 rlimit: disable fs writes
Use RLIMIT_FSIZE to disable writes to the filesystem when stdout is not
a regular file.
11 months ago
Michael Santos 1b9986edcc seccomp: remove duplicates, allow mremap in stdin mode 1 year ago
Michael Santos 42d524be45 README: reformat, cleanup 1 year ago
Michael Santos f6c1fd34ca 0.14.7: strophe 0.12: fix exit 1 on disconnect
With strophe 0.12, xmppipe printed an error "handle_connection:
disconnected" and exited with status 1 when the connection to the server
is closed.
1 year ago
Michael Santos d8a6890873 0.14.6: disable strophe stream management
libstrophe 0.12 supports (and enables by default) stream management. The
xmppipe session disconnects when strophe and xmppipe both try to handle
the stream acknowledgement.

* disable strophe stream management
* TODO: if strophe SM is available, disable xmppipe SM
1 year ago
Michael Santos 548a1590f5 Fix function declarations without prototypes 1 year ago
Michael Santos 8e25057316 Fix typo in comment 1 year ago
Michael Santos f58742d7e0 examples: cleanup: use coproc 2 years ago
Michael Santos 11d854f9e7 0.14.5: fix usage 2 years ago
Michael Santos 840ef08251 0.14.4: standardize exit status
* 2: usage errors
* 0: usage (-h)
2 years ago
Michael Santos 771822da1a 0.14.3: seccomp: add syscalls
Add syscalls for Ubuntu 22.04.
2 years ago
Michael Santos fc84ad2e9b seccomp: allow clock_gettime64
xmppipe aborts with bad system call on raspbian 11 (debian bullseye).

Possibly fixes https://github.com/msantos/xmppipe/issues/7
2 years ago
Michael Santos 7bbf51567b 0.14.2
Tag release for https://github.com/msantos/xmppipe/issues/6

Thanks @anjandev!
2 years ago
Michael Santos a3a29bbba6 cleanup: move common operation to function 2 years ago