[Home]

Summary:ASTERISK-11493: Cannot setup an empty database password
Reporter:Jakub Fedyczak (bukaj)Labels:
Date Opened:2008-02-21 20:47:38.000-0600Date Closed:2008-02-24 06:17:20.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_config_pgsql
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20080222__bug12048.diff.txt
Description:Due to field length checking, one cannot setup an empty database password (which is perfectly correct with postgres). Furthermore, setting empty password in res_pgsql.conf leads to very confusing debug message: PostgreSQL RealTime: Everything is fine.



****** ADDITIONAL INFORMATION ******

The problem is with the condition in res_pgsql_conf.c: line 915 (1.6.0beta3!) in psql_reconnect function:

if ((!pgsqlConn) && (!ast_strlen_zero(dbhost) || !ast_strlen_zero(dbsock)) && !ast_strlen_zero(dbuser) && !ast_strlen_zero(dbpass) && !ast_strlen_zero(my_database)) {
...
} else {
ast_debug(1, "PostgreSQL RealTime: Everything is fine.\n");
return 1;
}

IMHO the !ast_strlen_zero(dbpass) should be removed.
Comments:By: Tilghman Lesher (tilghman) 2008-02-22 00:02:45.000-0600

Patch uploaded.  Please test and verify.

By: Jakub Fedyczak (bukaj) 2008-02-22 03:06:03.000-0600

It now accepts empty password correctly.

By: Digium Subversion (svnbot) 2008-02-22 16:35:52.000-0600

Repository: asterisk
Revision: 104036

U   trunk/res/res_config_pgsql.c

------------------------------------------------------------------------
r104036 | tilghman | 2008-02-22 16:35:51 -0600 (Fri, 22 Feb 2008) | 7 lines

Allow database password to be NULL and several other cleanups.
(closes issue ASTERISK-11493)
Reported by: bukaj
Patches:
      20080222__bug12048.diff.txt uploaded by Corydon76 (license 14)
Tested by: bukaj

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=104036

By: Digium Subversion (svnbot) 2008-02-23 20:39:59.000-0600

Repository: asterisk
Revision: 104075

_U  team/murf/bug11210/
U   team/murf/bug11210/CHANGES
U   team/murf/bug11210/UPGRADE.txt
U   team/murf/bug11210/channels/chan_sip.c
U   team/murf/bug11210/channels/chan_zap.c
U   team/murf/bug11210/configure
U   team/murf/bug11210/configure.ac
U   team/murf/bug11210/doc/manager_1_1.txt
U   team/murf/bug11210/include/asterisk/manager.h
U   team/murf/bug11210/main/manager.c
U   team/murf/bug11210/res/res_config_pgsql.c

------------------------------------------------------------------------
r104075 | murf | 2008-02-23 20:39:58 -0600 (Sat, 23 Feb 2008) | 46 lines

Merged revisions 104031,104036,104038-104039,104045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r104031 | russell | 2008-02-21 14:27:24 -0700 (Thu, 21 Feb 2008) | 1 line

fix a typo
................
r104036 | tilghman | 2008-02-22 15:39:21 -0700 (Fri, 22 Feb 2008) | 7 lines

Allow database password to be NULL and several other cleanups.
(closes issue ASTERISK-11493)
Reported by: bukaj
Patches:
      20080222__bug12048.diff.txt uploaded by Corydon76 (license 14)
Tested by: bukaj

................
r104038 | tilghman | 2008-02-22 15:48:18 -0700 (Fri, 22 Feb 2008) | 14 lines

Merged revisions 104037 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104037 | tilghman | 2008-02-22 16:45:14 -0600 (Fri, 22 Feb 2008) | 6 lines

Backwards debug message.
(closes issue ASTERISK-11496)
Reported by: flefoll
Patches:
      chan_sip.c.br14.patch_found-notfound uploaded by flefoll (license 244)

........

................
r104039 | tilghman | 2008-02-22 15:55:35 -0700 (Fri, 22 Feb 2008) | 2 lines

Move Originate to a separate privilege and require the additional System privilege to call out to a subshell.

................
r104045 | dbailey | 2008-02-22 16:56:55 -0700 (Fri, 22 Feb 2008) | 2 lines

Add protection to chan_zap build when NEONMWI events are not defined

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=104075

By: Digium Subversion (svnbot) 2008-02-23 21:17:46.000-0600

Repository: asterisk
Revision: 104076

_U  team/seanbright/NoLossCDR-Redux/
U   team/seanbright/NoLossCDR-Redux/CHANGES
U   team/seanbright/NoLossCDR-Redux/UPGRADE.txt
U   team/seanbright/NoLossCDR-Redux/channels/chan_sip.c
U   team/seanbright/NoLossCDR-Redux/channels/chan_zap.c
U   team/seanbright/NoLossCDR-Redux/configure
U   team/seanbright/NoLossCDR-Redux/configure.ac
U   team/seanbright/NoLossCDR-Redux/doc/manager_1_1.txt
U   team/seanbright/NoLossCDR-Redux/include/asterisk/autoconfig.h.in
U   team/seanbright/NoLossCDR-Redux/include/asterisk/manager.h
U   team/seanbright/NoLossCDR-Redux/main/manager.c
U   team/seanbright/NoLossCDR-Redux/res/res_agi.c
U   team/seanbright/NoLossCDR-Redux/res/res_config_pgsql.c
U   team/seanbright/NoLossCDR-Redux/utils/astman.c

------------------------------------------------------------------------
r104076 | seanbright | 2008-02-23 21:17:26 -0600 (Sat, 23 Feb 2008) | 142 lines

Merged revisions 104014,104016,104019-104020,104024-104025,104028-104029,104031,104036,104038-104039,104045,104073-104074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r104014 | tilghman | 2008-02-21 00:21:39 -0500 (Thu, 21 Feb 2008) | 6 lines

Ignore some more unused generated events.
(closes issue ASTERISK-11487)
Reported by: junky
Patches:
      astman_events.diff uploaded by junky (license 177)

................
r104016 | kpfleming | 2008-02-21 09:44:04 -0500 (Thu, 21 Feb 2008) | 10 lines

Merged revisions 104015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104015 | kpfleming | 2008-02-21 08:33:51 -0600 (Thu, 21 Feb 2008) | 2 lines

reduce the likelihood that HTTP Manager session ids will consist of primarily '1' bits

........

................
r104019 | file | 2008-02-21 11:44:57 -0500 (Thu, 21 Feb 2008) | 8 lines

Disable epoll as it has caused more obscure issues then any of my previous code. I will continue to work on it in a separate branch to make it stable for a release and test it against the following issues.
(closes issue ASTERISK-10770)
Reported by: falves11
(closes issue ASTERISK-11131)
Reported by: davevg
(closes issue ASTERISK-10573)
Reported by: falves11

................
r104020 | mmichelson | 2008-02-21 11:46:37 -0500 (Thu, 21 Feb 2008) | 7 lines

Don't print the fact that we are using dead mode in AGI if called from the
'h' extension since it is well-known that it will be running in dead mode.

(closes issue ASTERISK-11491)
Reported by: explidous


................
r104024 | dbailey | 2008-02-21 12:38:40 -0500 (Thu, 21 Feb 2008) | 4 lines

Added configuration distinction between neon and fsk mwi detection
Add the detection for neon MWI events
got rid of extraneous handle_init_event call in monitor loop

................
r104025 | mmichelson | 2008-02-21 12:44:34 -0500 (Thu, 21 Feb 2008) | 4 lines

Instead of a notice, make the message about a hung-up channel a debug message, and revert the original
logic on the if statement. Thanks to Juggie for bringing this to my attention.


................
r104028 | mmichelson | 2008-02-21 16:09:11 -0500 (Thu, 21 Feb 2008) | 14 lines

Blocked revisions 104026 via svnmerge

........
r104026 | mmichelson | 2008-02-21 14:12:38 -0600 (Thu, 21 Feb 2008) | 7 lines

Remove an incorrect debug message. It reported that it had received a specific event and tried to report
which event was received. What actually was happening was that it was reporting the number of bytes returned
from a call to read().

Thanks to Jared Smith for bringing the issue up on IRC


........

................
r104029 | mmichelson | 2008-02-21 16:09:54 -0500 (Thu, 21 Feb 2008) | 11 lines

Blocked revisions 104027 via svnmerge

........
r104027 | mmichelson | 2008-02-21 15:05:42 -0600 (Thu, 21 Feb 2008) | 4 lines

And as a followup to revision 104026, completely remove event-related
calls from a section of code where we know there was no event to handle or get.


........

................
r104031 | russell | 2008-02-21 16:27:24 -0500 (Thu, 21 Feb 2008) | 1 line

fix a typo
................
r104036 | tilghman | 2008-02-22 17:39:21 -0500 (Fri, 22 Feb 2008) | 7 lines

Allow database password to be NULL and several other cleanups.
(closes issue ASTERISK-11493)
Reported by: bukaj
Patches:
      20080222__bug12048.diff.txt uploaded by Corydon76 (license 14)
Tested by: bukaj

................
r104038 | tilghman | 2008-02-22 17:48:18 -0500 (Fri, 22 Feb 2008) | 14 lines

Merged revisions 104037 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104037 | tilghman | 2008-02-22 16:45:14 -0600 (Fri, 22 Feb 2008) | 6 lines

Backwards debug message.
(closes issue ASTERISK-11496)
Reported by: flefoll
Patches:
      chan_sip.c.br14.patch_found-notfound uploaded by flefoll (license 244)

........

................
r104039 | tilghman | 2008-02-22 17:55:35 -0500 (Fri, 22 Feb 2008) | 2 lines

Move Originate to a separate privilege and require the additional System privilege to call out to a subshell.

................
r104045 | dbailey | 2008-02-22 18:56:55 -0500 (Fri, 22 Feb 2008) | 2 lines

Add protection to chan_zap build when NEONMWI events are not defined

................
r104073 | murf | 2008-02-23 19:44:14 -0500 (Sat, 23 Feb 2008) | 1 line

On a 64-bit machine, with dev-mode turned on, and pgsql installed, I get warnings that stops the compile. They are fixed now.
................
r104074 | murf | 2008-02-23 21:37:08 -0500 (Sat, 23 Feb 2008) | 1 line

Enforce a space between function args as per code review.
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=104076

By: Digium Subversion (svnbot) 2008-02-24 06:17:20.000-0600

Repository: asterisk
Revision: 104077

_U  team/group/multiparking/
U   team/group/multiparking/CHANGES
U   team/group/multiparking/UPGRADE.txt
U   team/group/multiparking/channels/chan_sip.c
U   team/group/multiparking/channels/chan_zap.c
U   team/group/multiparking/configure
U   team/group/multiparking/configure.ac
U   team/group/multiparking/doc/manager_1_1.txt
U   team/group/multiparking/include/asterisk/autoconfig.h.in
U   team/group/multiparking/include/asterisk/manager.h
U   team/group/multiparking/main/manager.c
U   team/group/multiparking/res/res_agi.c
U   team/group/multiparking/res/res_config_pgsql.c
U   team/group/multiparking/utils/astman.c

------------------------------------------------------------------------
r104077 | mvanbaak | 2008-02-24 06:17:17 -0600 (Sun, 24 Feb 2008) | 142 lines

Merged revisions 104014,104016,104019-104020,104024-104025,104028-104029,104031,104036,104038-104039,104045,104073-104074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r104014 | tilghman | 2008-02-21 06:21:39 +0100 (Thu, 21 Feb 2008) | 6 lines

Ignore some more unused generated events.
(closes issue ASTERISK-11487)
Reported by: junky
Patches:
      astman_events.diff uploaded by junky (license 177)

................
r104016 | kpfleming | 2008-02-21 15:44:04 +0100 (Thu, 21 Feb 2008) | 10 lines

Merged revisions 104015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104015 | kpfleming | 2008-02-21 08:33:51 -0600 (Thu, 21 Feb 2008) | 2 lines

reduce the likelihood that HTTP Manager session ids will consist of primarily '1' bits

........

................
r104019 | file | 2008-02-21 17:44:57 +0100 (Thu, 21 Feb 2008) | 8 lines

Disable epoll as it has caused more obscure issues then any of my previous code. I will continue to work on it in a separate branch to make it stable for a release and test it against the following issues.
(closes issue ASTERISK-10770)
Reported by: falves11
(closes issue ASTERISK-11131)
Reported by: davevg
(closes issue ASTERISK-10573)
Reported by: falves11

................
r104020 | mmichelson | 2008-02-21 17:46:37 +0100 (Thu, 21 Feb 2008) | 7 lines

Don't print the fact that we are using dead mode in AGI if called from the
'h' extension since it is well-known that it will be running in dead mode.

(closes issue ASTERISK-11491)
Reported by: explidous


................
r104024 | dbailey | 2008-02-21 18:38:40 +0100 (Thu, 21 Feb 2008) | 4 lines

Added configuration distinction between neon and fsk mwi detection
Add the detection for neon MWI events
got rid of extraneous handle_init_event call in monitor loop

................
r104025 | mmichelson | 2008-02-21 18:44:34 +0100 (Thu, 21 Feb 2008) | 4 lines

Instead of a notice, make the message about a hung-up channel a debug message, and revert the original
logic on the if statement. Thanks to Juggie for bringing this to my attention.


................
r104028 | mmichelson | 2008-02-21 22:09:11 +0100 (Thu, 21 Feb 2008) | 14 lines

Blocked revisions 104026 via svnmerge

........
r104026 | mmichelson | 2008-02-21 14:12:38 -0600 (Thu, 21 Feb 2008) | 7 lines

Remove an incorrect debug message. It reported that it had received a specific event and tried to report
which event was received. What actually was happening was that it was reporting the number of bytes returned
from a call to read().

Thanks to Jared Smith for bringing the issue up on IRC


........

................
r104029 | mmichelson | 2008-02-21 22:09:54 +0100 (Thu, 21 Feb 2008) | 11 lines

Blocked revisions 104027 via svnmerge

........
r104027 | mmichelson | 2008-02-21 15:05:42 -0600 (Thu, 21 Feb 2008) | 4 lines

And as a followup to revision 104026, completely remove event-related
calls from a section of code where we know there was no event to handle or get.


........

................
r104031 | russell | 2008-02-21 22:27:24 +0100 (Thu, 21 Feb 2008) | 1 line

fix a typo
................
r104036 | tilghman | 2008-02-22 23:39:21 +0100 (Fri, 22 Feb 2008) | 7 lines

Allow database password to be NULL and several other cleanups.
(closes issue ASTERISK-11493)
Reported by: bukaj
Patches:
      20080222__bug12048.diff.txt uploaded by Corydon76 (license 14)
Tested by: bukaj

................
r104038 | tilghman | 2008-02-22 23:48:18 +0100 (Fri, 22 Feb 2008) | 14 lines

Merged revisions 104037 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104037 | tilghman | 2008-02-22 16:45:14 -0600 (Fri, 22 Feb 2008) | 6 lines

Backwards debug message.
(closes issue ASTERISK-11496)
Reported by: flefoll
Patches:
      chan_sip.c.br14.patch_found-notfound uploaded by flefoll (license 244)

........

................
r104039 | tilghman | 2008-02-22 23:55:35 +0100 (Fri, 22 Feb 2008) | 2 lines

Move Originate to a separate privilege and require the additional System privilege to call out to a subshell.

................
r104045 | dbailey | 2008-02-23 00:56:55 +0100 (Sat, 23 Feb 2008) | 2 lines

Add protection to chan_zap build when NEONMWI events are not defined

................
r104073 | murf | 2008-02-24 01:44:14 +0100 (Sun, 24 Feb 2008) | 1 line

On a 64-bit machine, with dev-mode turned on, and pgsql installed, I get warnings that stops the compile. They are fixed now.
................
r104074 | murf | 2008-02-24 03:37:08 +0100 (Sun, 24 Feb 2008) | 1 line

Enforce a space between function args as per code review.
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=104077