|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 8192 (0x2000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Admin, seg_006d76
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Compilation, Library, Links, Operator, Text_Io;
package body Admin is
function User_World (For_User : String) return String is
begin
return "!users." & For_User;
end User_World;
procedure Add_Link_To_User_World (For_User : String; The_Link : String) is
begin
Text_Io.Put_Line ("adding link: " & The_Link &
" for user: " & For_User);
Links.Add (Source => The_Link,
Link => "#",
World => User_World (For_User));
end Add_Link_To_User_World;
procedure Add_Links_From_File
(The_File : String := "links"; For_User : String) is
Link_List : Text_Io.File_Type;
The_Link : String (1 .. 80);
The_Length : Natural;
begin
Text_Io.Open (Link_List, Text_Io.In_File, The_File);
while not Text_Io.End_Of_File (Link_List) loop
Text_Io.Get_Line (Link_List, The_Link, The_Length);
if The_Length /= 0 then
Add_Link_To_User_World (For_User, The_Link (1 .. The_Length));
end if;
end loop;
Text_Io.Close (Link_List);
end Add_Links_From_File;
procedure Create_User (With_Name : String;
Using_Links : String := "links") is
begin
Text_Io.Put_Line ("creating user: " & With_Name);
Operator.Create_User (User => With_Name,
Password => "aModifier",
Volume => 0,
Response => "<PROFILE>");
Add_Links_From_File (Using_Links, With_Name);
Install_Login (For_User => With_Name);
Install_S1_Switches (For_User => With_Name);
Install_Xr6us (For_User => With_Name);
end Create_User;
function User_Unit_Name (For_User : String; Unit : String) return String is
begin
return "!users." & For_User & "." & Unit;
end User_Unit_Name;
procedure Promote_User_Unit (For_User : String;
Unit : String;
To_State : Compilation.Unit_State) is
begin
Compilation.Promote (Unit => User_Unit_Name (For_User, Unit),
Scope => Compilation.All_Parts,
Goal => To_State,
Limit => "<WORLDS>",
Effort_Only => False,
Response => "<PROFILE>");
end Promote_User_Unit;
procedure Install_User_Unit
(For_User : String;
Unit_Name : String;
To_State : Compilation.Unit_State := Compilation.Coded) is
begin
Library.Copy (From => Unit_Name,
To => User_World (For_User),
Recursive => True,
Response => "<PROFILE>",
Copy_Links => True,
Options => "");
Promote_User_Unit (For_User, Unit_Name, To_State);
end Install_User_Unit;
procedure Install_Login (For_User : String) is
begin
Install_User_Unit (For_User, "login", To_State => Compilation.Coded);
end Install_Login;
procedure Install_Xr6us (For_User : String) is
begin
Install_User_Unit (For_User, "Xr6us_Commands",
To_State => Compilation.Installed);
end Install_Xr6us;
procedure Install_S1_Switches (For_User : String) is
begin
Library.Copy (From => "S_1_Switches", To => User_World (For_User));
end Install_S1_Switches;
procedure Delete_User (With_Name : String) is
begin
Text_Io.Put_Line ("deleting user: " & With_Name);
Operator.Delete_User (With_Name);
end Delete_User;
procedure For_All_Users (Contained_In_File : String := "users";
Do_Command : Operation := Admin.Nothing;
Using_Links : String := "links") is
User_List : Text_Io.File_Type;
User_Name : String (1 .. 80);
Name_Length : Natural;
begin
Text_Io.Open (User_List, Text_Io.In_File, Contained_In_File);
while not Text_Io.End_Of_File (User_List) loop
Text_Io.Get_Line (User_List, User_Name, Name_Length);
if Name_Length /= 0 then
case Do_Command is
when Create =>
Create_User (User_Name (1 .. Name_Length), Using_Links);
when Delete =>
Delete_User (User_Name (1 .. Name_Length));
when Nothing =>
null;
end case;
end if;
end loop;
Text_Io.Close (User_List);
end For_All_Users;
procedure Associate_Library_Switches (For_User : String) is
begin
[statement]
end Associate_Library_Switches;
end Admin;
nblk1=7
nid=6
hdr6=c
[0x00] rec0=1d rec1=00 rec2=01 rec3=07c
[0x01] rec0=1a rec1=00 rec2=03 rec3=05a
[0x02] rec0=1a rec1=00 rec2=02 rec3=020
[0x03] rec0=1f rec1=00 rec2=04 rec3=018
[0x04] rec0=18 rec1=00 rec2=07 rec3=068
[0x05] rec0=05 rec1=00 rec2=05 rec3=000
[0x06] rec0=00 rec1=10 rec2=40 rec3=6c5
tail 0x2170236ce81c943830abe 0x42a00088462060003
Free Block Chain:
0x6: 0000 00 00 00 6c 00 17 20 20 20 20 65 6e 64 20 55 73 ┆ l end Us┆