summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-11-14 02:14:30 +0000
committerAndrew Tridgell <tridge@samba.org>1998-11-14 02:14:30 +0000
commitf61683195340baa58e2637811350dbc2c5e6af01 (patch)
treee7276b9c1c89fa998561e47eec2466f0c74615bf /source3/web
parent5be7ae453d588bf520a71723115e5edbd5584d07 (diff)
downloadsamba-f61683195340baa58e2637811350dbc2c5e6af01.tar.gz
samba-f61683195340baa58e2637811350dbc2c5e6af01.tar.bz2
samba-f61683195340baa58e2637811350dbc2c5e6af01.zip
allow all user to view the config
(This used to be commit ab35d99e52225b0e9f519903ae99e575075187e7)
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/swat.c58
1 files changed, 22 insertions, 36 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 4d12e4b2f4..db21fbfbe1 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -406,16 +406,11 @@ static void show_main_buttons(void)
{
image_link("Home", "", "images/home.gif");
- /* Root gets full functionality */
- if (demo_mode || am_root()) {
- image_link("Globals", "globals", "images/globals.gif");
- image_link("Shares", "shares", "images/shares.gif");
- image_link("Printers", "printers", "images/printers.gif");
- image_link("Status", "status", "images/status.gif");
- image_link("View Config", "viewconfig","images/viewconfig.gif");
- }
-
- /* Everyone gets this functionality */
+ image_link("Globals", "globals", "images/globals.gif");
+ image_link("Shares", "shares", "images/shares.gif");
+ image_link("Printers", "printers", "images/printers.gif");
+ image_link("Status", "status", "images/status.gif");
+ image_link("View Config", "viewconfig","images/viewconfig.gif");
image_link("Password Management", "passwd", "images/passwd.gif");
printf("<HR>\n");
@@ -642,7 +637,7 @@ static void chg_passwd(void)
* If current user is not root, make sure old password has been specified
* If REMOTE change, even root must provide old password
*/
- if (((am_root() == False) && (strlen( cgi_variable(OLD_PSWD)) <= 0)) ||
+ if (((!am_root()) && (strlen( cgi_variable(OLD_PSWD)) <= 0)) ||
((cgi_variable(CHG_R_PASSWD_FLAG)) && (strlen( cgi_variable(OLD_PSWD)) <= 0))) {
printf("<p> Must specify \"Old Password\" \n");
return;
@@ -720,7 +715,7 @@ static void passwd_page(void)
*/
printf("<tr><td> User Name : </td>\n");
printf("<td><input type=text size=30 name=%s value=%s></td></tr> \n", SWAT_USER, new_name);
- if (am_root() == False) {
+ if (!am_root()) {
printf("<tr><td> Old Password : </td>\n");
printf("<td><input type=password size=30 name=%s></td></tr> \n",OLD_PSWD);
}
@@ -733,7 +728,7 @@ static void passwd_page(void)
* Create all the control buttons for requesting action
*/
printf("<tr><td><input type=submit name=%s value=\"Change Password\"></td></tr>\n", CHG_S_PASSWD_FLAG);
- if (am_root() == True) {
+ if (demo_mode || am_root()) {
printf("<tr><td><input type=submit name=%s value=\"Add New User\"></td></tr>\n", ADD_USER_FLAG);
printf("<tr><td><input type=submit name=%s value=\"Disable User\"></td></tr>\n", DISABLE_USER_FLAG);
printf("<tr><td><input type=submit name=%s value=\"Enable User\"></td></tr>\n", ENABLE_USER_FLAG);
@@ -923,31 +918,22 @@ static void printers_page(void)
page = cgi_pathinfo();
/* Root gets full functionality */
- if (demo_mode || am_root()) {
- if (strcmp(page, "globals")==0) {
- globals_page();
- } else if (strcmp(page,"shares")==0) {
- shares_page();
- } else if (strcmp(page,"printers")==0) {
- printers_page();
- } else if (strcmp(page,"status")==0) {
- status_page();
- } else if (strcmp(page,"viewconfig")==0) {
- viewconfig_page();
- } else if (strcmp(page,"passwd")==0) {
- passwd_page();
- } else {
- welcome_page();
- }
+ if (strcmp(page, "globals")==0) {
+ globals_page();
+ } else if (strcmp(page,"shares")==0) {
+ shares_page();
+ } else if (strcmp(page,"printers")==0) {
+ printers_page();
+ } else if (strcmp(page,"status")==0) {
+ status_page();
+ } else if (strcmp(page,"viewconfig")==0) {
+ viewconfig_page();
+ } else if (strcmp(page,"passwd")==0) {
+ passwd_page();
} else {
- /* Everyone gets this functionality */
- if (strcmp(page,"passwd")==0) {
- passwd_page();
- } else {
- welcome_page();
- }
+ welcome_page();
}
-
+
print_footer();
return 0;
}