freeradius.git
11 years agoUnlock mutex when we find a matching connection
Alan T. DeKok [Mon, 18 Feb 2013 18:28:12 +0000 (13:28 -0500)]
Unlock mutex when we find a matching connection

11 years agoFree newfd on error
Alan T. DeKok [Mon, 18 Feb 2013 18:26:54 +0000 (13:26 -0500)]
Free newfd on error

11 years agoFree correct VP
Alan T. DeKok [Mon, 18 Feb 2013 18:26:03 +0000 (13:26 -0500)]
Free correct VP

11 years agoOne more check for size > 253
Alan T. DeKok [Mon, 18 Feb 2013 18:23:18 +0000 (13:23 -0500)]
One more check for size > 253

11 years agoAdd empty field to struct
Alan T. DeKok [Mon, 18 Feb 2013 18:18:06 +0000 (13:18 -0500)]
Add empty field to struct

11 years agoFix for coverity (missed mutex free)
Arran Cudbard-Bell [Mon, 18 Feb 2013 18:03:56 +0000 (13:03 -0500)]
Fix for coverity (missed mutex free)

11 years agoMore debug macros
Alan T. DeKok [Mon, 18 Feb 2013 17:16:22 +0000 (12:16 -0500)]
More debug macros

DEBUGE, DEBUGW, for errors / warnings.  RDEBUG*, too.

This lets the errors and warnings have a common format, so that
the messages don't need to use an explicit "WARNING" string.

It also means that they are now colorized:
warning = bold + yellow
error = bold + red

This should hopefully help people who have issues reading the
debug output

11 years agoTurn colorize off only if it was one
Alan T. DeKok [Mon, 18 Feb 2013 16:32:23 +0000 (11:32 -0500)]
Turn colorize off only if it was one

11 years agoCheck return code of pairmark_xlat
Arran Cudbard-Bell [Mon, 18 Feb 2013 16:45:22 +0000 (11:45 -0500)]
Check return code of pairmark_xlat

11 years agoWhitespace fixes
Arran Cudbard-Bell [Mon, 18 Feb 2013 16:45:07 +0000 (11:45 -0500)]
Whitespace fixes

11 years agovalue.xlat should be set to NULL after being freed
Arran Cudbard-Bell [Mon, 18 Feb 2013 16:33:47 +0000 (11:33 -0500)]
value.xlat should be set to NULL after being freed

11 years agoSimplify copying of xlat value
Alan T. DeKok [Mon, 18 Feb 2013 16:24:39 +0000 (11:24 -0500)]
Simplify copying of xlat value

11 years agoRemove L_CONS
Alan T. DeKok [Mon, 18 Feb 2013 16:17:07 +0000 (11:17 -0500)]
Remove L_CONS

11 years agoRemove redundant checks for colourisation
Arran Cudbard-Bell [Mon, 18 Feb 2013 16:29:50 +0000 (11:29 -0500)]
Remove redundant checks for colourisation

11 years agoCheck whether it's appropriate to output colourised log messages
Arran Cudbard-Bell [Mon, 18 Feb 2013 15:42:09 +0000 (10:42 -0500)]
Check whether it's appropriate to output colourised log messages

11 years agoQuick hack for colourising log output to stderr/stdout
Arran Cudbard-Bell [Mon, 18 Feb 2013 07:50:49 +0000 (02:50 -0500)]
Quick hack for colourising log output to stderr/stdout

11 years agoWrite newline on buffer truncation too
Arran Cudbard-Bell [Mon, 18 Feb 2013 07:49:51 +0000 (02:49 -0500)]
Write newline on buffer truncation too

11 years agoBe explicit about why were not building rlm_rest
Arran Cudbard-Bell [Sun, 17 Feb 2013 20:55:11 +0000 (15:55 -0500)]
Be explicit about why were not building rlm_rest

11 years agoUpdate autoconf.h.in
Arran Cudbard-Bell [Sun, 17 Feb 2013 20:44:59 +0000 (15:44 -0500)]
Update autoconf.h.in

11 years agoCheck for libcurl >= 17.9.1
Arran Cudbard-Bell [Sun, 17 Feb 2013 20:42:48 +0000 (15:42 -0500)]
Check for libcurl >= 17.9.1

Disable definitions for ancient code depending on libcurl

11 years agodir can't be NULL
Alan T. DeKok [Sun, 17 Feb 2013 20:38:52 +0000 (15:38 -0500)]
dir can't be NULL

11 years agoCheck pointers before using them
Alan T. DeKok [Sun, 17 Feb 2013 20:37:32 +0000 (15:37 -0500)]
Check pointers before using them

11 years agoCheck length of ascend secrets
Alan T. DeKok [Sun, 17 Feb 2013 20:35:22 +0000 (15:35 -0500)]
Check length of ascend secrets

11 years agoRemove finger functionality from radwho. No one uses it (or should)
Alan T. DeKok [Sun, 17 Feb 2013 20:22:30 +0000 (15:22 -0500)]
Remove finger functionality from radwho.  No one uses it (or should)

11 years agoCheck for NULL before incrementing
Alan T. DeKok [Sun, 17 Feb 2013 20:19:03 +0000 (15:19 -0500)]
Check for NULL before incrementing

11 years agoCheck array[0], not array
Alan T. DeKok [Sun, 17 Feb 2013 20:16:18 +0000 (15:16 -0500)]
Check array[0], not array

11 years agoError if the dictionaries weren't initialized
Alan T. DeKok [Sun, 17 Feb 2013 20:15:25 +0000 (15:15 -0500)]
Error if the dictionaries weren't initialized

11 years agoCorrect args to memset
Alan T. DeKok [Sun, 17 Feb 2013 20:14:22 +0000 (15:14 -0500)]
Correct args to memset

11 years agoUse strlcpy instead of strcpy
Alan T. DeKok [Sun, 17 Feb 2013 20:13:19 +0000 (15:13 -0500)]
Use strlcpy instead of strcpy

11 years agoUse sizeof instead of strlen
Alan T. DeKok [Sun, 17 Feb 2013 20:12:32 +0000 (15:12 -0500)]
Use sizeof instead of strlen

11 years agoReturn on error
Alan T. DeKok [Sun, 17 Feb 2013 20:11:31 +0000 (15:11 -0500)]
Return on error

11 years agoEOL is EOL
Alan T. DeKok [Sun, 17 Feb 2013 20:09:16 +0000 (15:09 -0500)]
EOL is EOL

11 years agoEOL is EOL
Alan T. DeKok [Sun, 17 Feb 2013 20:06:49 +0000 (15:06 -0500)]
EOL is EOL

11 years agoFix build error
Alan T. DeKok [Sun, 17 Feb 2013 20:00:15 +0000 (15:00 -0500)]
Fix build error

11 years agod_namlen is BSD, not posix
Alan T. DeKok [Sun, 17 Feb 2013 19:51:50 +0000 (14:51 -0500)]
d_namlen is BSD, not posix

11 years agoFix for coverity (printf of non null terminated string)
Arran Cudbard-Bell [Sun, 17 Feb 2013 19:40:56 +0000 (14:40 -0500)]
Fix for coverity (printf of non null terminated string)

11 years agoClean up and sanitize pairread()
Alan T. DeKok [Sun, 17 Feb 2013 19:36:32 +0000 (14:36 -0500)]
Clean up and sanitize pairread()

Should fix a number of coverity issues

11 years agoFix for coverity (potential buffer overflow in radlog_request)
Arran Cudbard-Bell [Sun, 17 Feb 2013 18:39:41 +0000 (13:39 -0500)]
Fix for coverity (potential buffer overflow in radlog_request)

11 years agoFix race condition in conf file
Alan T. DeKok [Sun, 17 Feb 2013 18:32:03 +0000 (13:32 -0500)]
Fix race condition in conf file

Closes Coverity #720457

11 years agoFix typo
Alan T. DeKok [Sun, 17 Feb 2013 18:30:39 +0000 (13:30 -0500)]
Fix typo

11 years agoCheck for =~ and !~
Alan T. DeKok [Sun, 17 Feb 2013 18:24:10 +0000 (13:24 -0500)]
Check for =~ and !~

Fixes Coverity #982075

11 years agoCheck for no challenge/response in packet
Alan T. DeKok [Sun, 17 Feb 2013 18:22:15 +0000 (13:22 -0500)]
Check for no challenge/response in packet

Closes Coverity #720480

11 years agoRemove unused variables
Alan T. DeKok [Sun, 17 Feb 2013 18:20:24 +0000 (13:20 -0500)]
Remove unused variables

11 years agoRemove unused variable
Alan T. DeKok [Sun, 17 Feb 2013 18:17:59 +0000 (13:17 -0500)]
Remove unused variable

11 years agoFix for coverity (redundant default statement)
Arran Cudbard-Bell [Sun, 17 Feb 2013 18:12:52 +0000 (13:12 -0500)]
Fix for coverity (redundant default statement)

11 years agoFix for coverity (redundant condition)
Arran Cudbard-Bell [Sun, 17 Feb 2013 18:10:36 +0000 (13:10 -0500)]
Fix for coverity (redundant condition)

11 years agoFix for coverity (duplicate case statements)
Arran Cudbard-Bell [Sun, 17 Feb 2013 18:07:38 +0000 (13:07 -0500)]
Fix for coverity (duplicate case statements)

11 years agoFix for coverity (remove redundant default statement)
Arran Cudbard-Bell [Sun, 17 Feb 2013 18:04:15 +0000 (13:04 -0500)]
Fix for coverity (remove redundant default statement)

11 years agoOutput proper error messages for prthread_setspecific failure in rlm_perl.c and lib...
Arran Cudbard-Bell [Sun, 17 Feb 2013 18:02:59 +0000 (13:02 -0500)]
Output proper error messages for prthread_setspecific failure in rlm_perl.c and lib/log.c

11 years agoFix for coverity (verify we parsed the proxy config section ok)
Arran Cudbard-Bell [Sun, 17 Feb 2013 17:53:50 +0000 (12:53 -0500)]
Fix for coverity (verify we parsed the proxy config section ok)

11 years agoFix for covertiy
Arran Cudbard-Bell [Sun, 17 Feb 2013 17:49:57 +0000 (12:49 -0500)]
Fix for covertiy

11 years agoFix for coverity (check setsockopt in listen.c)
Arran Cudbard-Bell [Sun, 17 Feb 2013 17:48:31 +0000 (12:48 -0500)]
Fix for coverity (check setsockopt in listen.c)

11 years agoFix for coverity (check return of ip_hton in detail.c)
Arran Cudbard-Bell [Sun, 17 Feb 2013 17:40:50 +0000 (12:40 -0500)]
Fix for coverity (check return of ip_hton in detail.c)

11 years agoCheck return code of dup()
Alan T. DeKok [Sun, 17 Feb 2013 17:19:30 +0000 (12:19 -0500)]
Check return code of dup()

Closes Coverity #720380, 81, 82

11 years agoDon't check array for existence.
Alan T. DeKok [Sun, 17 Feb 2013 17:15:56 +0000 (12:15 -0500)]
Don't check array for existence.

Closes Coverity #720384

11 years agoDon't check an array for existence
Alan T. DeKok [Sun, 17 Feb 2013 17:14:43 +0000 (12:14 -0500)]
Don't check an array for existence

Closes Coverity #720389

11 years agoFix for coverity (bail if we can't stat the file in detail_recv)
Arran Cudbard-Bell [Sun, 17 Feb 2013 17:17:26 +0000 (12:17 -0500)]
Fix for coverity (bail if we can't stat the file in detail_recv)

11 years agoFix for coverity (more radrecv stuff)
Arran Cudbard-Bell [Sun, 17 Feb 2013 17:13:29 +0000 (12:13 -0500)]
Fix for coverity (more radrecv stuff)

11 years agoFix for coverity
Arran Cudbard-Bell [Sun, 17 Feb 2013 17:09:04 +0000 (12:09 -0500)]
Fix for coverity

11 years agoUse strlcpy, and check sizeof module name
Alan T. DeKok [Sun, 17 Feb 2013 17:12:08 +0000 (12:12 -0500)]
Use strlcpy, and check sizeof module name

Closes Covierty #720447

11 years agoUse strlcpy
Alan T. DeKok [Sun, 17 Feb 2013 17:09:46 +0000 (12:09 -0500)]
Use strlcpy

11 years agoFail safely if the directory exists in rad_mkdir
Alan T. DeKok [Sun, 17 Feb 2013 17:08:15 +0000 (12:08 -0500)]
Fail safely if the directory exists in rad_mkdir

Maybe another thread is making the directory.  If so, it's OK

Closes Coverity #720459

11 years agoInitialize IPaddr
Alan T. DeKok [Sun, 17 Feb 2013 17:01:40 +0000 (12:01 -0500)]
Initialize IPaddr

Closes Coverity #720462

11 years agoSign error
Alan T. DeKok [Sun, 17 Feb 2013 16:56:54 +0000 (11:56 -0500)]
Sign error

Closes Coverity #720436

11 years agoClear memory using correct size
Alan T. DeKok [Sun, 17 Feb 2013 16:53:57 +0000 (11:53 -0500)]
Clear memory using correct size

Closes Coverity #720439, 40, 41

11 years agoDon't expand variables if cs==NULL
Alan T. DeKok [Sun, 17 Feb 2013 16:45:43 +0000 (11:45 -0500)]
Don't expand variables if cs==NULL

Closes Coverity #720373

11 years agoFix for coverity (don't need to check recvfrom return in rad_recv_discard)
Arran Cudbard-Bell [Sun, 17 Feb 2013 17:06:27 +0000 (12:06 -0500)]
Fix for coverity (don't need to check recvfrom return in rad_recv_discard)

11 years agoFix for coverity (check return value of setsockopt)
Arran Cudbard-Bell [Sun, 17 Feb 2013 16:59:55 +0000 (11:59 -0500)]
Fix for coverity (check return value of setsockopt)

11 years agoFix for coverity
Arran Cudbard-Bell [Sun, 17 Feb 2013 16:51:50 +0000 (11:51 -0500)]
Fix for coverity

11 years agoRemove dead code
Alan T. DeKok [Sun, 17 Feb 2013 16:38:53 +0000 (11:38 -0500)]
Remove dead code

Closes Coverity #982076

11 years agoRemove dead code.
Alan T. DeKok [Sun, 17 Feb 2013 16:37:34 +0000 (11:37 -0500)]
Remove dead code.

Closes Coverity #982077

11 years agoUse correct flag for check
Alan T. DeKok [Sun, 17 Feb 2013 16:35:38 +0000 (11:35 -0500)]
Use correct flag for check

Closes Coverity #982078

11 years agoDon't free data returned from gdbm_fetch
Alan T. DeKok [Sun, 17 Feb 2013 16:28:29 +0000 (11:28 -0500)]
Don't free data returned from gdbm_fetch

Closes Coverity #982067, 982068, 982069

11 years agoRemove dead code.
Alan T. DeKok [Sun, 17 Feb 2013 16:22:44 +0000 (11:22 -0500)]
Remove dead code.

Closes Coverity #982080, 982079

11 years agoCheck for NULL da. Only if dictionary files are broken.
Alan T. DeKok [Sun, 17 Feb 2013 16:13:51 +0000 (11:13 -0500)]
Check for NULL da.  Only if dictionary files are broken.

Closes Coverity #982081

11 years agovalue may be NULL. Only for admin mistake.
Alan T. DeKok [Sun, 17 Feb 2013 16:11:50 +0000 (11:11 -0500)]
value may be NULL.  Only for admin mistake.

Closes Coverity #982082

11 years agoCheck for NULL.
Alan T. DeKok [Sun, 17 Feb 2013 16:09:14 +0000 (11:09 -0500)]
Check for NULL.

Closes Coverity #982083 (false positive)

11 years agoLimit attrlen to 128K.
Alan T. DeKok [Sun, 17 Feb 2013 16:01:24 +0000 (11:01 -0500)]
Limit attrlen to 128K.

Closes Coverity #982085

11 years agoFix for coverity
Arran Cudbard-Bell [Sun, 17 Feb 2013 16:39:09 +0000 (11:39 -0500)]
Fix for coverity

11 years agoFix for coverity
Arran Cudbard-Bell [Sun, 17 Feb 2013 16:35:40 +0000 (11:35 -0500)]
Fix for coverity

11 years agoFix for coverity
Arran Cudbard-Bell [Sun, 17 Feb 2013 16:27:01 +0000 (11:27 -0500)]
Fix for coverity

11 years agoFix for coverity
Arran Cudbard-Bell [Sun, 17 Feb 2013 16:23:09 +0000 (11:23 -0500)]
Fix for coverity

11 years agoFix for coverity (don't segv if the ruby function returns an array during intiialisation)
Arran Cudbard-Bell [Sun, 17 Feb 2013 16:17:12 +0000 (11:17 -0500)]
Fix for coverity (don't segv if the ruby function returns an array during intiialisation)

11 years agoFix for coverity (assign return from recvfrom to a local signed variable so we can...
Arran Cudbard-Bell [Sun, 17 Feb 2013 15:56:36 +0000 (10:56 -0500)]
Fix for coverity (assign return from recvfrom to a local signed variable so we can check for error conditions)

11 years agoUnlock on error
Alan T. DeKok [Sun, 17 Feb 2013 02:40:12 +0000 (21:40 -0500)]
Unlock on error

Closes Coverity #982086

11 years agoAdd missing break
Alan T. DeKok [Sun, 17 Feb 2013 02:38:17 +0000 (21:38 -0500)]
Add missing break

Closes Coverity #982087

11 years agoAdd missing break
Alan T. DeKok [Sun, 17 Feb 2013 02:37:28 +0000 (21:37 -0500)]
Add missing break

Closes Coverity #982088

11 years agoNote fall-through
Alan T. DeKok [Sun, 17 Feb 2013 02:36:24 +0000 (21:36 -0500)]
Note fall-through

Closes Coverity #982089

11 years agoAdd missing break
Alan T. DeKok [Sun, 17 Feb 2013 02:35:11 +0000 (21:35 -0500)]
Add missing break

closes Coverity #982090

11 years agoRemove unnecessary check
Alan T. DeKok [Sun, 17 Feb 2013 02:32:19 +0000 (21:32 -0500)]
Remove unnecessary check

Closes Coverity #982093

11 years agoUse sizeof(struct) not sizeof(*struct)
Alan T. DeKok [Sun, 17 Feb 2013 02:29:32 +0000 (21:29 -0500)]
Use sizeof(struct) not sizeof(*struct)

Closes Coverity #982094

11 years agoThere's no need to memset data to zero
Alan T. DeKok [Sun, 17 Feb 2013 02:28:25 +0000 (21:28 -0500)]
There's no need to memset data to zero

Closes Coverity #982095

11 years agoCheck size of raw attributes in TTLS
Alan T. DeKok [Sun, 17 Feb 2013 02:22:37 +0000 (21:22 -0500)]
Check size of raw attributes in TTLS

Closes Coverity #982096

11 years agoFree vp on error
Alan T. DeKok [Sun, 17 Feb 2013 02:15:49 +0000 (21:15 -0500)]
Free vp on error

Closes Coverity #982097

11 years agoFix for coverity (check return value of cf_section_parse)
Arran Cudbard-Bell [Sun, 17 Feb 2013 04:15:17 +0000 (23:15 -0500)]
Fix for coverity (check return value of cf_section_parse)

11 years agoFix for coverity (potential segv for very long libpaths in run_mode)
Arran Cudbard-Bell [Sun, 17 Feb 2013 04:06:58 +0000 (23:06 -0500)]
Fix for coverity (potential segv for very long libpaths in run_mode)

11 years agoFix for coverity (potential segv for argument names over 49 bytes in jlibtool)
Arran Cudbard-Bell [Sun, 17 Feb 2013 04:01:53 +0000 (23:01 -0500)]
Fix for coverity (potential segv for argument names over 49 bytes in jlibtool)

11 years agoFix for coverity (fix potential buffer overflow in cleanup_tmp_dir)
Arran Cudbard-Bell [Sun, 17 Feb 2013 03:58:28 +0000 (22:58 -0500)]
Fix for coverity (fix potential buffer overflow in cleanup_tmp_dir)

11 years agoFix for coverity (zero out sizeof(*fi) not sizeof(fi) in fr_fifo_free)
Arran Cudbard-Bell [Sun, 17 Feb 2013 03:49:08 +0000 (22:49 -0500)]
Fix for coverity (zero out sizeof(*fi) not sizeof(fi) in fr_fifo_free)

11 years agoFix for coverity (zero out sizeof(*packet) not sizeof(packet) in fr_dhcp_rcv)
Arran Cudbard-Bell [Sun, 17 Feb 2013 03:47:17 +0000 (22:47 -0500)]
Fix for coverity (zero out sizeof(*packet) not sizeof(packet) in fr_dhcp_rcv)