From 01ceb5e2d7b7b4492ed3f2bd1e95fe9b4d68ad47 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 11 Nov 1998 23:47:03 +0000 Subject: changed is_root() to am_root() to prevent clash with variable names. (This used to be commit 52f47b8d2ef5ee64e2f8dcfeb6840071e57904d1) --- source3/web/swat.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'source3/web/swat.c') diff --git a/source3/web/swat.c b/source3/web/swat.c index da032e077d..038829337d 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -405,7 +405,7 @@ static void show_main_buttons(void) image_link("Home", "", "images/home.gif"); /* Root gets full functionality */ - if ( is_root() == True) { + if (am_root() == True) { image_link("Globals", "globals", "images/globals.gif"); image_link("Shares", "shares", "images/shares.gif"); image_link("Printers", "printers", "images/printers.gif"); @@ -632,7 +632,7 @@ static BOOL talk_to_smbpasswd(char *old, char *new) /* * smbpasswd requires a regular old user to send their old password */ - if ( is_root() == False) { + if (am_root() == False) { n = (strlen(old) <= (MAX_STRINGLEN)) ? strlen(old) : (MAX_STRINGLEN); strncpy( line, old, n); line[n] = '\n'; n++; /* add carriage return */ @@ -727,7 +727,7 @@ static BOOL talk_to_smbpasswd(char *old, char *new) /* Root can do more */ - if (is_root() == True) { + if (am_root() == True) { if (cgi_variable(add_user_flag)) { /* * Add a user @@ -838,7 +838,6 @@ static BOOL become_id(uid_t uid,gid_t gid) ****************************************************************************/ static void chg_passwd(void) { - char *s; struct passwd *pass = NULL; BOOL rslt; @@ -855,7 +854,7 @@ static void chg_passwd(void) if (!cgi_variable(disable_user_flag)) { /* If current user is not root, make sure old password has been specified */ - if ((is_root() == False) && (strlen( cgi_variable(old_pswd)) <= 0)) { + if ((am_root() == False) && (strlen( cgi_variable(old_pswd)) <= 0)) { printf("

Must specify \"Old Password\" \n"); return; } @@ -875,7 +874,7 @@ static void chg_passwd(void) } /* Get the UID/GID of the user, and become that user */ - if (is_root() == False) { + if (am_root() == False) { pass = Get_Pwnam(cgi_variable(user),True); if (pass == NULL) { printf("

User uid unknown \n"); @@ -902,7 +901,7 @@ static void chg_passwd(void) rslt = talk_to_smbpasswd( cgi_variable(old_pswd), cgi_variable(new_pswd)); - if (is_root() == False) { + if (am_root() == False) { if (rslt == True) { printf("

The passwd for '%s' has been changed. \n",cgi_variable(user)); } else { @@ -919,7 +918,6 @@ static void chg_passwd(void) static void passwd_page(void) { char *new_name; - int i; printf("

Password Manager

\n"); @@ -941,7 +939,7 @@ static void passwd_page(void) } printf("

User Name : \n", user, new_name); - if (is_root() == False) { + if (am_root() == False) { printf("

Old Password: \n",old_pswd); } printf("

New Password: \n",new_pswd); @@ -950,7 +948,7 @@ static void passwd_page(void) printf("

"); printf(""); printf("", chg_passwd_flag); - if (is_root() == True) { + if (am_root() == True) { printf("", add_user_flag); printf("", disable_user_flag); } @@ -1102,7 +1100,7 @@ static void printers_page(void) page = cgi_pathinfo(); /* Root gets full functionality */ - if ( is_root() == True) { + if (am_root() == True) { if (strcmp(page, "globals")==0) { globals_page(); } else if (strcmp(page,"shares")==0) { -- cgit