~ubuntu-branches/ubuntu/dapper/freeradius/dapper-updates

« back to all changes in this revision

Viewing changes to dialup_admin/lib/sql/change_passwd.php3

  • Committer: Bazaar Package Importer
  • Author(s): Paul Hampson
  • Date: 2004-12-29 20:19:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041229201942-uj2e95la965uthc7
Tags: 1.0.1-2
* freeradius-dialupadmin Suggests php4-mysql | php4-pgsql
   Closes: #279419
* Added a two-second pause to restart in init.d script
   Closes: #262635
* FreeRADIUS module packages now depend on the same source
  version of the main FreeRADIUS package.
   Closes: #284353
* FreeRADIUS-dialupadmin's default paths in admin.conf are
  now correct.
   Closes: #280942
* FreeRADIUS-dialupadmin's help.php3 can now find README.
   Closes: #280941
* Fixes stolen from 1.0.2 CVS:
  - Bug fix to make udpfromto code work
  - radrelay shouldn't dump core if it can't read a VP from the
    detail file.
  - Only initialize the random pool once.
  - In rlm_sql, don't escape characters twice.
  - In rlm_ldap, only claim Auth-Type if a plain text password is present.
  - Locking fixes in threading code
  - Fix building on gcc-4.0 by not trying to access static auth_port from
    other files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
                include("../lib/crypt/$config[general_encryption_method].php3");
22
22
                $passwd = da_encrypt($passwd);
23
23
                $res = @da_sql_query($link,$config,
24
 
                        "SELECT Value FROM $config[sql_check_table] WHERE UserName = '$login'
25
 
                        AND Attribute = '$config[sql_password_attribute]';");
 
24
                        "SELECT value FROM $config[sql_check_table] WHERE username = '$login'
 
25
                        AND attribute = '$config[sql_password_attribute]';");
26
26
                if ($res){
27
27
                        $row = @da_sql_fetch_array($res,$config);
28
28
                        if ($row){
29
29
                                $res = @da_sql_query($link,$config,
30
 
                                "UPDATE $config[sql_check_table] SET Value = '$passwd' $text3 WHERE
31
 
                                Attribute = '$config[sql_password_attribute]' AND UserName = '$login';");
 
30
                                "UPDATE $config[sql_check_table] SET value = '$passwd' $text3 WHERE
 
31
                                attribute = '$config[sql_password_attribute]' AND username = '$login';");
32
32
                                if (!$res || !@da_sql_affected_rows($link,$res,$config))
33
33
                                        echo "<b>Error while changing password: " . da_sql_error($link,$config) . "</b><br>\n"; 
34
34
                        }
35
35
                        else{
36
36
                                $res = @da_sql_query($link,$config,
37
 
                                        "INSERT INTO $config[sql_check_table] (Attribute,Value,UserName $text1)
 
37
                                        "INSERT INTO $config[sql_check_table] (attribute,value,username $text1)
38
38
                                        VALUES ('$config[sql_password_attribute]','$passwd','$login' $text2);");
39
39
                                if (!$res || !@da_sql_affected_rows($link,$res,$config))
40
40
                                        echo "<b>Error while changing password: " . da_sql_error($link,$config) . "</b><br>\n";