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

« back to all changes in this revision

Viewing changes to dialup_admin/lib/sql/create_group.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:
17
17
        $Members = preg_split("/[\n\s]+/",$members,-1,PREG_SPLIT_NO_EMPTY);
18
18
        if (!empty($Members)){
19
19
                foreach ($Members as $member){
 
20
                        $member = da_sql_escape_string($member);
20
21
                        $res = @da_sql_query($link,$config,
21
 
                        "INSERT INTO $config[sql_usergroup_table] (UserName,GroupName)
 
22
                        "INSERT INTO $config[sql_usergroup_table] (username,groupname)
22
23
                        VALUES ('$member','$login');");
23
24
                        if (!$res || !@da_sql_affected_rows($link,$res,$config)){
24
25
                                echo "<b>Unable to add user $member in group $login: " . da_sql_error($link,$config) . "</b><br>\n";
44
45
                                $type = 2;
45
46
                        }
46
47
                        $val = $$attrmap["$key"];
 
48
                        $val = da_sql_escape_string($val);
47
49
                        $op_name = $attrmap["$key"] . '_op';
48
50
                        $op_val = $$op_name;
49
51
                        if ($op_val != ''){
56
58
                        if ($val == '' || check_defaults($val,$op_val,$default_vals["$key"]))
57
59
                                continue;
58
60
                        $res = @da_sql_query($link,$config,
59
 
                        "INSERT INTO $table (Attribute,Value,GroupName $text)
 
61
                        "INSERT INTO $table (attribute,value,groupname $text)
60
62
                        VALUES ('$attrmap[$key]','$val','$login' $op_val2);");
61
63
                        if (!$res || !@da_sql_affected_rows($link,$res,$config))
62
64
                                echo "<b>Query failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";