Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 259221 Details for
Bug 383301
Admin Server main html page refers to dsgw, org
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs
bug383301.diffs (text/plain), 6.79 KB, created by
Rich Megginson
on 2007-11-15 02:05:01 UTC
(
hide
)
Description:
diffs
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2007-11-15 02:05:01 UTC
Size:
6.79 KB
patch
obsolete
>Index: adminserver/admserv/cgi-src40/download.c >=================================================================== >RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/download.c,v >retrieving revision 1.7 >diff -u -8 -r1.7 download.c >--- adminserver/admserv/cgi-src40/download.c 9 May 2007 00:26:30 -0000 1.7 >+++ adminserver/admserv/cgi-src40/download.c 15 Nov 2007 02:04:12 -0000 >@@ -66,19 +66,16 @@ > #endif > > #include "config.h" > > #define PATH_LENGTH 1024 > > #define MYHTMLFILE "admserv.html" > >-#define DSGW_BLOCK "<dsgw_menu_block>" >-#define DSGW_BLOCK_CLOSE "</dsgw_menu_block>" >- > static int > safe_snprintf(char *buf, size_t size, const char *fmt, ...) > { > int ret; > va_list ap; > va_start(ap, fmt); > ret = vsnprintf(buf, size, fmt, ap); > va_end(ap); >@@ -94,21 +91,19 @@ > exit(0); > } > > int > main(int argc, char *argv[]) > { > char line[PATH_LENGTH]; > FILE *html; >- int i, dsgwblock, has_dsgw; >+ int i; > char *acceptLanguage = NULL; > char *loc; >- >- has_dsgw = 1; /* hardcoded for now until we can figure out a better mechanism */ > > acceptLanguage = getenv("HTTP_ACCEPT_LANGUAGE"); > if (acceptLanguage == NULL) > { > acceptLanguage = "en"; > } > > /* >@@ -116,57 +111,61 @@ > */ > loc = strtok(strdup(acceptLanguage), ","); > while (1) > { > safe_snprintf(line, sizeof(line), "%s%c%c%c%c%s", > HTMLDIR, FILE_SEP, loc[0],loc[1], FILE_SEP, MYHTMLFILE); > if ((html = fopen(line, "r")) != NULL) > { >+ loc[2] = '\0'; > break; > } > else > { > loc = strtok(NULL, ", "); > if (loc == NULL) > { > safe_snprintf(line, sizeof(line), "%s%c%s", > HTMLDIR, FILE_SEP, MYHTMLFILE); > if ((html = fopen(line, "r")) == NULL) > { > error_exit(MYHTMLFILE " not found"); > } >+ loc = ""; > break; > } > } > } > > printf("Content-type: text/html\n\n"); > >- dsgwblock = 0; >- > while (fgets(line, PATH_LENGTH, html)) > { >- if (!STRNCASECMP(line, DSGW_BLOCK, strlen(DSGW_BLOCK))) >- { >- dsgwblock = 1; >- continue; >- } >- >- if (!STRNCASECMP(line, DSGW_BLOCK_CLOSE, strlen(DSGW_BLOCK_CLOSE))) >- { >- dsgwblock =0; >+#define INCLUDEIFEXISTS "<!-- INCLUDEIFEXISTS " >+ if (!strncmp(line, INCLUDEIFEXISTS, strlen(INCLUDEIFEXISTS))) { >+ char *p = line + strlen(INCLUDEIFEXISTS); >+ char *end = strstr(line, " -->"); >+ if (p && *p && end) { >+ char includefile[PATH_LENGTH]; >+ FILE *includedhtml = NULL; >+ *end = '\0'; >+ safe_snprintf(includefile, sizeof(includefile), >+ "%s%c%s%s%s", >+ HTMLDIR, FILE_SEP, loc ? loc : "", >+ loc ? "/" : "", p); >+ includedhtml = fopen(includefile, "r"); >+ while (includedhtml && fgets(line, PATH_LENGTH, includedhtml)) { >+ printf("%s", line); >+ } >+ if (includedhtml) { >+ fclose(includedhtml); >+ includedhtml = NULL; >+ } >+ } > continue; > } >- >- if (!dsgwblock) >- { >- printf("%s", line); >- continue; >- } >- >- if (dsgwblock && has_dsgw) >- printf("%s", line); >+ printf("%s", line); > } > > fflush(stdout); > fclose(html); > } >Index: adminserver/admserv/html/admserv.html >=================================================================== >RCS file: /cvs/dirsec/adminserver/admserv/html/admserv.html,v >retrieving revision 1.1 >diff -u -8 -r1.1 admserv.html >--- adminserver/admserv/html/admserv.html 9 May 2007 00:26:31 -0000 1.1 >+++ adminserver/admserv/html/admserv.html 15 Nov 2007 02:04:12 -0000 >@@ -44,38 +44,18 @@ > <tr valign="TOP"> > <td> </td> > <td colspan="4"> > <table border="0" cellspacing="0" cellpadding="0"> > <tr valign="TOP"> > <td><img src="../icons/spacer.gif" width="6" height="6"></td> > <td></td> > </tr> >- <tr valign="top"> >- <td><img src="../icons/goto.gif" width="10" height="15"> </td> >- <td><font face="Verdana, sans-serif"><a href="/clients/dsgw/bin/lang?context=pb"> >- Directory Server Express</a></font><font size="-1" face="Verdana, sans-serif"><br> >- Search for users by name, user ID or extension.</font><font size="-1" face="Verdana, sans-serif"> >- </font></td> >- </tr> >- <tr valign="top"> >- <td> </td> >- <td> </td> >- </tr> >- <tr valign="top"> >- <td><img src="../icons/goto.gif" width="10" height="15"> </td> >- <td><font face="Verdana, sans-serif"><a href="/clients/orgchart/html/index.html"> >- Directory Server Org Charts</a></font><font size="-1" face="Verdana, sans-serif"><br> >- Browse org charts of your organization.</font><font size="-1" face="Verdana, sans-serif"> >- </font></td> >- </tr> >- <tr valign="TOP"> >- <td> </td> >- <td> </td> >- </tr> >+<!-- INCLUDEIFEXISTS admserv_phonebook.html --> >+<!-- INCLUDEIFEXISTS admserv_orgchart.html --> > </table> > </td> > <td> </td> > </tr> > <tr valign="TOP"> > <td> </td> > <td bgcolor="#9999cc" colspan="4"> <font color="white" size="+1"><font face="Verdana, sans-serif">Services > for Administrators</font></font></td> >@@ -84,27 +64,17 @@ > <tr valign="TOP"> > <td> </td> > <td colspan="4"> > <table border="0" cellspacing="0" cellpadding="0"> > <tr valign="TOP"> > <td><img src="../icons/spacer.gif" width="6" height="6"></td> > <td></td> > </tr> >- <tr valign="top"> >- <td><img src="../icons/goto.gif" width="10" height="15"> </td> >- <td><font face="Verdana, sans-serif"><a href="/clients/dsgw/bin/lang?context=dsgw"> >- Directory Server Gateway</a></font><font size="-1" face="Verdana, sans-serif"><br> >- Search for and edit directory entries.</font><font size="-1" face="Verdana, sans-serif"> >- </font></td> >- </tr> >- <tr valign="top"> >- <td> </td> >- <td> </td> >- </tr> >+<!-- INCLUDEIFEXISTS admserv_dsgw.html --> > <tr valign="TOP"> > <td><img src="../icons/goto.gif" width="10" height="15"> </td> > <td><font face="Verdana, sans-serif"><a href='http://fedora.redhat.com/'>Fedora Home Page</a></font><font size="-1" face="Verdana, sans-serif"><br> > Check for upgrades and information about Fedora server products.</font><font size="-1" face="Verdana, sans-serif"> > </font></td> > </tr> > <tr valign="TOP"> > <td> </td>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 383301
: 259221 |
260031