r26539: Remove unnecessary statics.
[gd/samba-autobuild/.git] / source4 / scripting / ejs / ejsnet / net_user.c
index ba0bad09531f6ab4146f41f22bd235ced3f0a77e..4b0923216bd4455dc7843b0aaed7f29dbdfee511 100644 (file)
@@ -7,7 +7,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
@@ -46,7 +45,7 @@ int ejs_net_userman(MprVarHandle eid, int argc, struct MprVar **argv)
        struct MprVar obj;
 
        /* libnet context */
-       ctx = mprGetThisPtr(eid, "ctx");
+       ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx");
        if (ctx == NULL) {
                ejsSetErrorMsg(eid, "ctx property returns null pointer");
                return 0;
@@ -129,14 +128,14 @@ static int ejs_net_createuser(MprVarHandle eid, int argc, char **argv)
        }
        
        /* libnet context */
-       ctx = mprGetThisPtr(eid, "ctx");
+       ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx");
        if (ctx == NULL) {
                ejsSetErrorMsg(eid, "ctx property returns null pointer");
                goto done;
        }
 
        /* domain where the account is to be created */
-       userman_domain = mprGetThisPtr(eid, "domain");
+       userman_domain = (const char *)mprGetThisPtr(eid, "domain");
        if (userman_domain == NULL) {
                ejsSetErrorMsg(eid, "domain property returns null pointer");
                goto done;
@@ -198,7 +197,7 @@ static int ejs_net_deleteuser(MprVarHandle eid, int argc, char **argv)
        }
        
        /* domain where the account is to be deleted */
-       userman_domain = mprGetThisPtr(eid, "domain");
+       userman_domain = (const char*)mprGetThisPtr(eid, "domain");
        if (!userman_domain) {
                ejsSetErrorMsg(eid, "domain property returns null pointer");
                goto done;
@@ -254,14 +253,14 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv)
        }
 
        /* libnet context */
-       ctx = mprGetThisPtr(eid, "ctx");
+       ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx");
        if (ctx == NULL) {
                ejsSetErrorMsg(eid, "ctx property returns null pointer");
                goto done;
        }
        
        /* domain where the user account is to be queried */
-       userman_domain = mprGetThisPtr(eid, "domain");
+       userman_domain = (const char *)mprGetThisPtr(eid, "domain");
        if (userman_domain == NULL) {
                ejsSetErrorMsg(eid, "domain property returns null pointer");
                return -1;
@@ -332,7 +331,7 @@ static int ejs_net_userlist(MprVarHandle eid, int argc, struct MprVar **argv)
        }
 
        /* libnet context */
-       ctx = mprGetThisPtr(eid, "ctx");
+       ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx");
        if (ctx == NULL) {
                ejsSetErrorMsg(eid, "ctx property returns null pointer");
                goto done;