Wayne Davison
bf011fedfc
Made the code a little cleaner by having gen_challenge() return
...
the challenge string base64-encoded (instead of forcing the caller
to handle this). Also improved a couple comments.
2005-04-10 17:09:10 +00:00
Wayne Davison
5037cf3adf
- Use the MD4_SUM_LENGTH define in place of some hard-wired values.
...
- Pass the hostname in to auth_server().
- Generate a unique error for each failure type in auth_server() so
that the log-file contains why the authorization failed.
- Don't use sscanf() to parse the client's auth-challenge response.
2005-04-09 18:11:23 +00:00
Wayne Davison
4875d6b64d
Adding more calls to safe_fname().
2005-02-07 20:36:43 +00:00
Wayne Davison
30c041f9ad
Changed the errors concerning the secrets file to output with FLOG
...
instead of FERROR.
2004-09-24 17:04:05 +00:00
Wayne Davison
ba582f753a
Changed sum_init() to take a seed value as an arg instead of always
...
using checksum_init. This fixes an authentication problem in server
mode (as pointed out by Craig Barratt).
2004-05-21 08:27:04 +00:00
Wayne Davison
18cc8c7ef1
Improved a comment and got rid of some trailing whitespace.
2004-05-08 19:37:28 +00:00
Wayne Davison
58c9b4b7f6
Tweaked the sizeof syntax and some multi-statement lines.
2004-05-08 19:26:53 +00:00
Wayne Davison
38cab94d9a
- Improved the get_secret()'s function comments, made it accept a line
...
that doesn't end with a newline, and optimized it a bit.
- Improved getpassf() to work if the line does not end with a newline.
2004-05-08 18:18:42 +00:00
Wayne Davison
4b2f6a7c37
Decided to use "nobody" instead of "guest".
2004-04-01 18:05:40 +00:00
Wayne Davison
ef383c0d32
The auth_client function must not return without outputting something
...
on the socket, so a NULL or empty username now defaults to "guest".
2004-03-31 18:52:38 +00:00
Wayne Davison
57385128c3
Made base64_encode() non-static.
2004-01-03 08:53:36 +00:00
Wayne Davison
fe332038c6
Call wildmatch(), not fnmatch().
2003-07-30 06:12:27 +00:00
Martin Pool
908f5a9f9f
Add a comment about using getpassphrase() or readpassphrase() rather
...
than getpass(). No code change.
2003-06-17 04:46:32 +00:00
Wayne Davison
73ff720972
File I/O already handles '\r', so we can remove the O_TEXT flags.
2003-01-26 19:37:54 +00:00
David Dykstra
536b84680b
Open config files in text mode when O_TEXT is defined. This helps on
...
Cygwin when the config files are on a filesystem that is mounted in
binary mode. Patch from Ville Herva.
2003-01-26 03:46:54 +00:00
Wayne Davison
973007daac
Changed auth_server() to take two fds (for the daemon via remote-shell
...
support).
2002-08-01 00:36:54 +00:00
Martin Pool
707de53457
Another harmless size_t warning.
2002-01-24 02:33:45 +00:00
Martin Pool
64bd756832
Add comment: cyeoh says that getpass is deprecated, because it may
...
return a truncated password on some systems, and it is not in the LSB.
2001-08-29 07:23:30 +00:00
Andrew Tridgell
5d78a10232
allow shell wildcards in auth users lines
2001-06-22 10:16:04 +00:00
Martin Pool
4a13b9d57a
Print strerror when a system error occurs; add a new function rsyserr
...
to do this. This is not used in every case yet -- I've just changed a
few cases that were causing trouble. Please convert others as you see them.
2000-10-26 07:31:29 +00:00
Martin Pool
a039749b4c
Print strerror when a system error occurs; add a new function rsyserr
...
to do this. This is not used in every case yet -- I've just changed a
few cases that were causing trouble. Please convert others as you see them.
2000-10-26 07:24:18 +00:00
Andrew Tridgell
ae682c3e11
got rid of some unused variables
2000-08-19 15:25:05 +00:00
Andrew Tridgell
3060d4aa1d
handle systems that don't take a 2nd argument to gettimeofday()
2000-01-23 02:16:51 +00:00
David Dykstra
3ca8e68f58
Added "strict modes" option. When set false (default is true), it allows
...
the secrets file to be readable by other users. Added to support the Windows
port under cygwin. Problem reported by Martin Krumpolec krumpo@pobox.sk
1999-02-09 19:27:15 +00:00
Andrew Tridgell
379e689dac
fixed bug where strtok() could return NULL in getpassf().
1999-01-08 10:42:29 +00:00
Andrew Tridgell
65575e9670
added --password-file patch from Alex Schlessinger <alex@inconnect.com>
...
(yes, I know I'm not supposed to be doing rsync work at the moment!
only four weeks to go ...)
1999-01-08 10:32:56 +00:00
David Dykstra
d1be231290
Make sure secrets file is not other-accessible, and owned by root if the
...
daemon is running as root. Suggested by
Mike Richardson <mike@quaking.demon.co.uk >
1998-11-24 19:52:35 +00:00
Andrew Tridgell
37f9805dab
changed strlcat() and strlcpy() to have the same semantics as the
...
OpenBSD functions of the same name.
changed slprintf() to take buffer length rather than buffer length -1
1998-11-14 23:31:58 +00:00
Andrew Tridgell
6e4fb64e61
added finddead target, removed dead code and made some functions
...
static
1998-09-09 05:57:34 +00:00
Andrew Tridgell
d0d56395c8
for authenticated access record the authenticated username in the logs
1998-05-16 07:45:26 +00:00
Andrew Tridgell
1a016bfdec
- changed the log messages to show the requested path
...
- some more paranoid buffer size checks
- separate open syslog call
- handle systems without LOG_NDELAY
1998-05-15 10:34:07 +00:00
Andrew Tridgell
e42c9458c2
use strlcat() strlcpy() and slprintf() whenever possible to avoid any
...
chance of a buffer overflow
1998-05-15 09:26:01 +00:00
Andrew Tridgell
c8e78d87ad
improved the authentication and in particular the error reporting
1998-05-13 12:21:10 +00:00
Andrew Tridgell
bcb7e50250
first working version of challenge response authentication. needs
...
testing.
1998-05-13 11:49:05 +00:00
Andrew Tridgell
31593dd610
improved max connections code. Now use fcntl instead of flock.
...
also started on authentication code (I'm doing a challenge response
system initially)
1998-05-13 09:38:54 +00:00