Project

General

Profile

« Previous | Next » 

Revision e6867c81

Added by Renato Botelho over 11 years ago

Use php function to get hostname instead of exec()

View differences:

etc/inc/ipsec.auth-user.php
56 56
{
57 57
    global $g;
58 58

  
59
    $nasId = "";
60
    exec("/bin/hostname", $nasId);
61
    if(!$nasId[0])
62
        $nasId[0] = "{$g['product_name']}";
63
    return $nasId[0];
59
    $nasId = gethostname();
60
    if(empty($nasId))
61
        $nasId = $g['product_name'];
62
    return $nasId;
64 63
}
65 64
}
66 65

  

Also available in: Unified diff