LoadModule cgi_module /usr/lib/httpd/modules/mod_cgi.so
LoadModule env_module /usr/lib/httpd/modules/mod_env.so
+LoadModule php4_module modules/libphp4.so
+AddType application/x-httpd-php .php
+
TypesConfig /etc/mime.types
# User and group who will own files created by Apache
Group apache
DocumentRoot "/var/www/html"
+DirectoryIndex index.html
<Directory />
AllowOverride None
Listen 777
NameVirtualHost 127.0.0.1:80
-<VirtualHost login.www.printenv.localdomain:80>
-ServerName login.www.printenv.localdomain
-
-<Directory "/var/www/html">
- GridSiteIndexes on
- GridSiteAuth on
- GridSiteDNlists /etc/grid-security/dn-lists/
-</Directory>
-
-ScriptAliasMatch / /var/www/cgi-bin/login.printenv.sh
-
-</VirtualHost>
-
-<VirtualHost www.printenv.localdomain:80>
-ServerName www.printenv.localdomain
-
-<Directory "/var/www/html">
- GridSiteIndexes on
- GridSiteAuth on
- GridSiteDNlists /etc/grid-security/dn-lists/
-</Directory>
-
-ScriptAliasMatch / /var/www/cgi-bin/printenv.sh
-
-</VirtualHost>
-
<VirtualHost *:80 *:777>
GridSiteGridHTTP on
GridSiteIndexes on
GridSiteAuth on
GridSiteDNlists /etc/grid-security/dn-lists/
+ GridSiteHtmlFormat on
</Directory>
</VirtualHost>
SSLSessionCacheTimeout 300
SSLSessionCache shm:/var/cache/mod_ssl/shm_cache
-<VirtualHost *:443 *:488>
+<VirtualHost 127.0.0.1:443 127.0.0.1:488>
+ServerName pc63.hep.man.ac.uk
+
SSLEngine on
SSLCertificateFile /etc/grid-security/hostcert.pem
SSLCertificateKeyFile /etc/grid-security/hostkey.pem
GridSiteCastAlias https://sitecast.domain:488/ /var/www/html/
<Directory "/var/www/html">
+ SetEnv GRST_FOOTER_BLOB '</div></div></div></div><div id="footer"><div id="footer3"><div class="innertube">Copyright GridPP 2008</div></div><div id="footer2"><div class="innertube">'
GridSiteIndexes on
GridSiteAuth on
GridSiteDNlists /etc/grid-security/dn-lists/
GridSiteGSIProxyLimit 9
GridSiteMethods GET PUT DELETE MOVE
GridSiteHtmlFormat on
- GridSiteLoginURI https://login.www.printenv.localdomain
+ GridSiteAutoPasscode on
+ GridSiteRequirePasscode on
+# GridSiteLoginURI https://login.pc63.hep.man.ac.uk
</Directory>
<Location "/dn-lists/">
</VirtualHost>
+<VirtualHost 127.0.0.2:443 127.0.0.2:488>
+
+ServerName login.pc63.hep.man.ac.uk
+
+SSLEngine on
+SSLCertificateFile /etc/grid-security/hostcert.pem
+SSLCertificateKeyFile /etc/grid-security/hostkey.pem
+SSLCACertificatePath /etc/grid-security/certificates
+#SSLCARevocationPath YOUR CRL DIRECTORY WOULD GO HERE
+SSLVerifyClient optional
+SSLVerifyDepth 10
+SSLOptions +ExportCertData +StdEnvVars
+
+#GridSiteAutoPasscode off
+#GridSiteRequirePasscode off
+
+AliasMatch ^/ /var/www/php-bin/gridsite-login.php
+
+<Directory "/var/www/html">
+ GridSiteIndexes on
+ GridSiteAuth on
+ GridSiteDNlists /etc/grid-security/dn-lists/
+ GridSiteDNlistsURI /dn-lists/
+ GridSiteGSIProxyLimit 9
+ GridSiteMethods GET PUT DELETE MOVE
+ GridSiteHtmlFormat on
+</Directory>
+
+</VirtualHost>
/*
- Copyright (c) 2002-7, Andrew McNab, University of Manchester
+ Copyright (c) 2002-8, Andrew McNab, University of Manchester
All rights reserved.
Redistribution and use in source and binary forms, with or
// No such file or directory
#define GRST_RET_NO_SUCH_FILE 1003
-
// #define GRSTerrorLog(GRSTerrorLevel, GRSTerrorFmt, ...) if (GRSTerrorLogFunc != NULL) (GRSTerrorLogFunc)(__FILE__, __LINE__, GRSTerrorLevel, GRSTerrorFmt, __VA_ARGS__)
+// void (*GRSTerrorLogFunc)(char *, int, int, char *, ...);
#define GRSTerrorLog(GRSTerrorLevel, ...) if (GRSTerrorLogFunc != NULL) (GRSTerrorLogFunc)(__FILE__, __LINE__, GRSTerrorLevel, __VA_ARGS__)
-void (*GRSTerrorLogFunc)(char *, int, int, char *, ...);
+extern void (*GRSTerrorLogFunc)(char *, int, int, char *, ...);
/* these levels are the same as Unix syslog() and Apache ap_log_error() */
}
else if ((dn = getenv("SSL_CLIENT_S_DN")) != NULL)
{
- cred = GRSTgaclCredCreate("dn:", dn);
+ cred = GRSTgaclCredCreate("dn:", GRSThttpUrlMildencode(dn));
user = GRSTgaclUserNew(cred);
}
#include "gridsite.h"
void (*GRSTerrorLogFunc)(char *, int, int, char *, ...) = NULL;
-
URL: http://www.gridsite.org/
Vendor: GridPP
Requires: libxml2
-Buildrequires: libxml2-devel,curl-ssl-devel,httpd-devel,openssl-devel
+Buildrequires: libxml2-devel,curl-devel,httpd-devel,openssl-devel
Packager: Andrew McNab <Andrew.McNab@manchester.ac.uk>
%description
/*
- Copyright (c) 2003-7, Andrew McNab, Shiv Kaushal, Joseph Dada,
+ Copyright (c) 2003-8, Andrew McNab, Shiv Kaushal, Joseph Dada,
and Yibiao Li, University of Manchester. All rights reserved.
Redistribution and use in source and binary forms, with or
out = apr_pstrcat(r->pool, out, "<hr><small>", NULL);
- if (r->connection->notes != NULL)
+ if (r->notes != NULL)
{
- grst_cred_auri_0 = (char *)
- apr_table_get(r->connection->notes, "GRST_CRED_AURI_0");
+ grst_cred_auri_0 = (char *)
+ apr_table_get(r->notes, "GRST_CRED_AURI_0");
}
if ((grst_cred_auri_0 != NULL) &&
{
temp = apr_psprintf(r->pool,
". <a href=\"%s%s\">Login/Logout</a>\n",
- conf->loginuri, r->uri);
+ conf->loginuri, r->unparsed_uri);
out = apr_pstrcat(r->pool, out, temp, NULL);
}
}
}
- /* if passcode absent but SSL ok and not a GSI Proxy, we must
- have GridSiteAutoPasscode on so we create passcode and file
+ /* if user from SSL ok and not a GSI Proxy and have
+ GridSiteAutoPasscode on we create passcode and file
automatically, and return cookie to client.
(if GridSiteAutoPasscode off then the site must use
a login script to make passcode and file instead.) */
- if ((user != NULL) &&
+ if (((mod_gridsite_dir_cfg *) cfg)->autopasscode &&
+ (user != NULL) &&
(GRSTgaclCredGetDelegation(cred_0) == 0))
{
n = 0; /* number of slashes seen */
"GRIDHTTP_PASSCODE=%s; "
"domain=%s; "
"path=%s; "
- "secure; httponly", gridauthpasscode, r->hostname, p));
+ "secure", gridauthpasscode, r->hostname, p));
}
}
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"After GACL/Onetime evaluation, GRST_PERM=%d", perm);
- /* set permission and GACL environment variables */
+ /* add permission and first AURI to request notes */
apr_table_setn(r->notes, "GRST_PERM", apr_psprintf(r->pool, "%d", perm));
+ cred = user->firstcred;
+ if ((cred != NULL) && (strncmp(cred->auri, "dn:", 3) == 0))
+ {
+ apr_table_setn(r->notes, "GRST_CRED_AURI_0",
+ apr_psprintf(r->pool, "%s", cred->auri));
+ }
+
+
if (((mod_gridsite_dir_cfg *) cfg)->envs)
{
/* copy any credentials from (SSL) connection to environment */
ap_hook_fixups(mod_gridsite_first_fixups,NULL,NULL,APR_HOOK_FIRST);
- ap_hook_fixups(mod_gridsite_perm_handler,NULL,NULL,APR_HOOK_LAST);
+ ap_hook_fixups(mod_gridsite_perm_handler,NULL,NULL,APR_HOOK_REALLY_LAST);
ap_hook_handler(mod_gridsite_handler, NULL, NULL, APR_HOOK_FIRST);