From 78b9c5c8c4c691e65a0b2d0ad440482285301208 Mon Sep 17 00:00:00 2001
From: Rob van Son
Date: Sat, 30 Jun 2012 12:39:58 +0200
Subject: [PATCH] Added .SkeletonDir for new users
---
CGIscriptor.pl | 13 +++++++--
Private/.SkeletonDir/index.html | 58 +++++++++++++++++++++++++++++++++++++++++
PrivateTutorial.html | 5 ++--
3 files changed, 71 insertions(+), 5 deletions(-)
create mode 100644 Private/.SkeletonDir/index.html
diff --git a/CGIscriptor.pl b/CGIscriptor.pl
index ceac542..c3520c5 100755
--- a/CGIscriptor.pl
+++ b/CGIscriptor.pl
@@ -3526,13 +3526,22 @@ sub create_newuser # ($loginfile, $sessionfile, $authorizationfile, $password, $
}
elsif($FullHomeDirectoryPath && !(-d $FullHomeDirectoryPath || -s $FullHomeDirectoryPath))
{
- mkdir $FullHomeDirectoryPath;
- if(-s "$ENV{'HOME'}${currentRoot}UserIndex.html")
+ if(-d "$ENV{'HOME'}${currentRoot}.SkeletonDir")
{
+ `cp '$ENV{'HOME'}${currentRoot}.SkeletonDir' '$FullHomeDirectoryPath/'`;
+ }
+ elsif(-d "$ENV{'HOME'}${currentRoot}SkeletonDir")
+ {
+ `cp '$ENV{'HOME'}${currentRoot}SkeletonDir' '$FullHomeDirectoryPath/'`;
+ }
+ elsif(-s "$ENV{'HOME'}${currentRoot}UserIndex.html")
+ {
+ mkdir $FullHomeDirectoryPath;
`cp '$ENV{'HOME'}${currentRoot}UserIndex.html' '$FullHomeDirectoryPath/index.html'`;
}
elsif(-s "$ENV{'HOME'}${currentRoot}index.html")
{
+ mkdir $FullHomeDirectoryPath;
`cp '$ENV{'HOME'}${currentRoot}index.html' '$FullHomeDirectoryPath/index.html'`;
}
;
diff --git a/Private/.SkeletonDir/index.html b/Private/.SkeletonDir/index.html
new file mode 100644
index 0000000..2daa696
--- /dev/null
+++ b/Private/.SkeletonDir/index.html
@@ -0,0 +1,58 @@
+
+
+
+ Private data
+
+
+
+window.onload = function() {
+ loadSessionData (CGIscriptorSessionType, CGIscriptorChallengeTicket);
+ return true;
+};
+
+
+
+
+
+
+
+
+
+
+Change Password
+Create New User Account
+
+Private data: You are now logged in as
+Logged in from
+Go to manual
+
+SERVER SIDE SESSIONS AND ACCESS CONTROL (LOGIN)
+
+An infrastructure for user acount authorization and file access control
+is available. Each request is matched against a list of URL path patterns.
+If the request matches, a Session Ticket is required to access the URL.
+This Session Ticket should be present as a CGI parameter or Cookie:
+
+
+CGI: SESSIONTICKET=<value>
+Cookie: CGIscriptorSESSION=<value>
+
+The example implementation stores Session Tickets as files in a local
+directory. To create Session Tickets, a Login request must be given
+with a LOGIN=<value> CGI parameter, a user name and a (doubly hashed)
+password. The user name and (singly hashed) password are stored in a
+PASSWORD ticket with the same name as the user account (name cleaned up
+for security). There is a Tutorial of the authorization
+application.
+
+
+
+
diff --git a/PrivateTutorial.html b/PrivateTutorial.html
index d87a9a1..1f77140 100644
--- a/PrivateTutorial.html
+++ b/PrivateTutorial.html
@@ -124,9 +124,8 @@ user. Below that, the allowed pages and IP addresses can be entered as a ;
regular expression patterns. After sumitting the form, the text of the account file will be printed
on the page. These texts can be saved in the .Passwords directory.
However, if the admin account is activated, that user can create active new accounts directly.
-With each new user, a home directory is automatically created with in it either a copy of the
-Private/UserIndex.html file, or, if that file does not exist, the Private/index.html
-file.
+With each new user, a home directory is automatically created as a copy of the
+Private/.SkeletonDir directory.
Account signatures and activation
--
2.11.4.GIT