Commit Graph

23 Commits (master)

Author SHA1 Message Date
cinap_lenrek 874e71c8dc libauth: re-implement procsetuser() to use /proc instead of #c/user 2020-12-23 13:10:30 +01:00
cinap_lenrek fc5070c600 libauth: add procsetuser() function to change user id of the calling process
Provide a central function to change the user id
of the calling process.

This is mostly used by programs to become the none
user, followed by a call to newns().
2020-12-19 17:46:55 +01:00
cinap_lenrek eb3d055eb3 backout OCEXEC changes when potentially opening /srv files
Opening a /srv file sets the close-on-exec flag on the
shared channel breaking the exportfs openmount() hack.

The devsrv tries to prevent posting a channel with the
close-on-exec or remove-on-close flags. but nothing
currently prevents this poisoning on open.

Until this gets fixed in eigther exportfs or devsrv,
i'll back out the changes that could have potential side
effects like this.
2020-12-09 01:04:03 +01:00
cinap_lenrek f433f1426b libauth: open internal file-descriptors with OCEXEC flag 2020-12-07 16:46:34 +01:00
cinap_lenrek ac88ce4f7f make bind(2) error handling consistent
The mount() and bind() syscalls return -1 on error,
and the mountid sequence number on success.

The manpage states that the mountid sequence number
is a positive integer, but the kernels implementation
currently uses a unsigned 32-bit integer and does not
guarantee that the mountid will not become negative.

Most code just cares about the error, so test for
the -1 error value only.
2020-05-02 17:32:01 +02:00
cinap_lenrek 675870f9b1 libauth: do not set errstr in auth_rpc() for ARdone result (thanks majiru) 2019-08-02 19:06:23 +02:00
cinap_lenrek 6e19d19285 separate MSCHAP(v2) and NTLM(v2) authentication
due to linux omiting the final Z(4) in the NTLMv2 reply, and
the need for the windom for LMv2 authentication, here is a new
AuthNTLM ticket request now with length and dom fields.
2018-05-20 22:49:24 +02:00
cinap_lenrek 3004f058f6 libauth: add auth_respondAI() function to get AuthInfo for mschap/mschapv2 2018-01-21 22:37:45 +01:00
cinap_lenrek 77ad456b31 libauth: simplify _attrfmt() using fmtprint() avoiding stack buffer 2018-01-02 04:47:42 +01:00
cinap_lenrek e1ca49d625 libauth: remove auth_wep() function, and non-existing httpauth() declaration 2018-01-02 04:31:21 +01:00
cinap_lenrek 4edc761024 libauth: fix out of bounds memory access in _parseattr()
empty token would read ""[-1] accidentally in the AttrQuery case.
2018-01-01 23:23:55 +01:00
cinap_lenrek 554fb43df5 libauth: replace proto=p9cr with new proto=dp9ik/p9sk1 role=login for auth_userpasswd() 2017-12-03 05:14:33 +01:00
cinap_lenrek 1ebcdca4ba libauth: don't attempt to mount when opening mount srv file fails in nsop()
making newnsdebug error messages more usefull...
2016-12-22 01:56:19 +01:00
cinap_lenrek b540a22eb0 libauth: fix mount file-descriptor leak in auth_chuid() 2016-08-04 11:48:19 +02:00
cinap_lenrek a158c4bdb9 remove support for import command in namespace files 2016-05-04 16:35:25 +02:00
cinap_lenrek d71cf7ff1b libauth: remove unneeded includes for authsrv.h, avoid pulling in dependency for rerrstr() 2016-04-10 20:24:20 +02:00
cinap_lenrek 2dae1ed53a auth: release dp9ik implementation and reentrant factotum 2016-01-06 03:09:00 +01:00
cinap_lenrek 02cfcfeab4 libauthsrv: generalize ticket service, not hardcoding ticket format and DES encryption
this is in preparation for replacing DES ticket encryption with
something better. but first need to make the code stop making
assumptions.

the wire encoding of the Ticket might be variable length
with TICKETLEN just giving an upper bound. the details will be
handled by libauthsrv _asgetticket() and _asgetresp() funciotns.

the Authenticator and Passwordreq structures are encrypted
with the random ticket key. The encryption schmeme will depend
on the Ticket format used, so we pass the Ticket* structure
instead of the DES key.

introduce Authkey structure that will hold all the required
cryptographic keys instead of passing DES key.
2015-08-19 21:06:17 +02:00
cinap_lenrek ea480e74bb libauth: dont print blobs in auth_proxy error strings 2014-05-24 19:49:54 +02:00
cinap_lenrek b5aab82488 libauth: add sanity check for auth_proxy write size 2013-09-16 03:56:53 +02:00
cinap_lenrek b8397a3c2c libauth: auth_chuid empty (from sources)
instead of an "i/o count too small", detect a missing capability (empty, null string)
before the write, and diagnose it as such.
2013-04-11 13:45:11 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00