]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-pts-localauth-20080204
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 4 Feb 2008 19:42:15 +0000 (19:42 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 4 Feb 2008 19:42:15 +0000 (19:42 +0000)
LICENSE IPL10

distilled from changes by mdw@umich.edu

(cherry picked from commit 496b5e4c978dec000c5f1e318968d74f8818d60b)

27 files changed:
doc/man-pages/pod1/pts.pod
doc/man-pages/pod1/pts_adduser.pod
doc/man-pages/pod1/pts_chown.pod
doc/man-pages/pod1/pts_creategroup.pod
doc/man-pages/pod1/pts_createuser.pod
doc/man-pages/pod1/pts_delete.pod
doc/man-pages/pod1/pts_examine.pod
doc/man-pages/pod1/pts_interactive.pod
doc/man-pages/pod1/pts_listentries.pod
doc/man-pages/pod1/pts_listmax.pod
doc/man-pages/pod1/pts_listowned.pod
doc/man-pages/pod1/pts_membership.pod
doc/man-pages/pod1/pts_quit.pod
doc/man-pages/pod1/pts_removeuser.pod
doc/man-pages/pod1/pts_rename.pod
doc/man-pages/pod1/pts_setfields.pod
doc/man-pages/pod1/pts_setmax.pod
doc/man-pages/pod1/pts_sleep.pod
doc/man-pages/pod1/pts_source.pod
doc/man-pages/pod8/bosserver.pod
doc/man-pages/pod8/fileserver.pod
doc/man-pages/pod8/ptserver.pod
doc/man-pages/pod8/vlserver.pod
doc/man-pages/pod8/volserver.pod
src/ptserver/pts.c
src/ptserver/ptuser.c
src/ptserver/utils.c

index 47611748532e1843cad8397b1d8013afeb38da90..913a9ff18f9131aec907fbfcd11f199100467a9d 100644 (file)
@@ -91,6 +91,12 @@ The value of the AFSCELL environment variable.
 
 The local F</usr/vice/etc/ThisCell> file.
 
+Do not combine the B<-cell> and B<-localauth> options. A command on which
+the B<-localauth> flag is included always runs in the local cell (as
+defined in the server machine's local F</usr/afs/etc/ThisCell> file),
+whereas a command on which the B<-cell> argument is included runs in the
+specified foreign cell.
+
 =back
 
 =item B<-force>
@@ -123,6 +129,29 @@ privileged users to issue commands that change the Protection Database,
 and refuses to perform such an action even if the B<-noauth> flag is
 provided.
 
+=item B<-localauth>
+
+Constructs a server ticket using the server encryption key with the
+highest key version number in the local F</usr/afs/etc/KeyFile> file. The
+B<pts> command interpreter presents the ticket, which never expires, to
+the BOS Server during mutual authentication.
+
+Use this flag only when issuing a command on a server machine; client
+machines do not usually have a F</usr/afs/etc/KeyFile> file.  The issuer
+of a command that includes this flag must be logged on to the server
+machine as the local superuser C<root>. The flag is useful for commands
+invoked by an unattended application program, such as a process controlled
+by the UNIX B<cron> utility. It is also useful if an administrator is
+unable to authenticate to AFS but is logged in as the local superuser
+C<root>.
+
+Do not combine the B<-cell> and B<-localauth> options. A command on which
+the B<-localauth> flag is included always runs in the local cell (as
+defined in the server machine's local F</usr/afs/etc/ThisCell> file),
+whereas a command on which the B<-cell> argument is included runs in the
+specified foreign cell. Also, do not combine the B<-localauth> and
+B<-noauth> flags.
+
 =back
 
 =head1 PRIVILEGE REQUIRED
index ac2f332f64e612b4e1419780e627908a62ed6ea4..cefc97099e327b4046db6e8c7edd94ac62c7b48e 100644 (file)
@@ -8,10 +8,10 @@ pts_adduser - Adds a user or machine to a Protection Database group
 <div class="synopsis">
 
 B<pts adduser> S<<< B<-user> <I<user name>>+ >>> S<<< B<-group> <I<group name>>+ >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] [B<-force>] [B<-help>]
 
 B<pts ad> S<<< B<-u> <I<user name>>+ >>> S<<< B<-g> <I<group name>>+ >>>
-    S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-f>] [B<-h>]
+    S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -60,6 +60,14 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. The B<pts> command interpreter presents the
+ticket to the Protection Server during mutual authentication. Do not combine 
+this flag with the B<-cell> or B<-noauth> options. For more details, see
+L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index cde8b98c26d367e4754fde9494a8defcb8bcacbd..c3de2c398ea5815e699f30b9f0e40745aa74fc28 100644 (file)
@@ -8,10 +8,10 @@ pts_chown - Changes the owner of a Protection Database entry
 <div class="synopsis">
 
 B<pts chown> S<<< B<-name> <I<group name>> >>> S<<< B<-owner> <I<new owner>> >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] [B<-force>] [B<-help>]
 
 B<pts cho> S<<< B<-na> <I<group name>> >>> S<<< B<-o> <I<new owner>> >>>
-    S<<< [B<-c> <I<cell name>>] >>> [B<-no>] [B<-f>] [B<-h>]
+    S<<< [B<-c> <I<cell name>>] >>> [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -62,6 +62,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the B<-cell> 
+or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index d2886e954131813a5347994808c6f83969fe9f8a..ed78053b87d53541a89868d2500c240c9db145be 100644 (file)
@@ -10,15 +10,15 @@ pts_creategroup - Creates an (empty) Protection Database group entry
 B<pts creategroup> S<<< B<-name> <I<group name>>+ >>>
     S<<< [B<-owner> <I<owner of the group>>] >>>
     S<<< [B<-id> <I<id (negated) for the group>>+] >>> S<<< [B<-cell> <I<cell name>>] >>>
-    [B<-noauth>] [B<-force>] [B<-help>]
+    [B<-noauth>] [B<-localauth>] [B<-force>] [B<-help>]
 
 B<pts createg> S<<< B<-na> <I<group name>>+ >>>  S<<< [B<-o> <I<owner of the group>>] >>>
     S<<< [B<-i> <I<id (negated) for the group>>+] >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 B<pts cg> S<<< B<-na> <I<group name>>+ >>> S<<< [B<-o> <I<owner of the group>>] >>>
     S<<< [B<-i> <I<id (negated) for the group>>+] >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -154,6 +154,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 64abd232362436372cb61294e568bbc579224c26..75c8bff147aa62f3fdc7acb6dc8bc3cee05b4036 100644 (file)
@@ -8,13 +8,14 @@ pts_createuser - Creates a user or machine entry in the Protection Database
 <div class="synopsis">
 
 B<pts createuser> S<<< B<-name> <I<user name>>+ >>> S<<< [B<-id> <I<user id>>+] >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] [B<-force>] 
+    [B<-help>]
 
 B<pts createu> S<<< B<-na> <I<user name>>+ >>> S<<< [B<-i> <I<user id>>+] >>>
-    S<<< [B<-c> <I<cell name>>] >>> [B<-no>] [B<-f>] [B<-h>]
+    S<<< [B<-c> <I<cell name>>] >>> [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 B<pts cu> S<<< B<-na> <I<user name>>+ >>> S<<< [B<-i> <I<user id>>+] >>>
-    S<<< [B<-c> <I<cell name>>] >>> [B<-no>] [B<-f>] [B<-h>]
+    S<<< [B<-c> <I<cell name>>] >>> [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -137,6 +138,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 6af95427ca5d26e7b53a15549d3651a6768505d7..b06b35b0a9f3d54419ec8e6c3479fb8bd7c21a9b 100644 (file)
@@ -8,10 +8,11 @@ pts_delete - Deletes a Protection Database entry
 <div class="synopsis">
 
 B<pts delete> S<<< B<-nameorid> <I<user or group name or id>>+ >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] 
+    [B<-force>] [B<-help>]
 
 B<pts d> S<<< B<-na> <I<user or group name or id>>+ >>>
-    S<<< [B<-c> <I<cell name>>] >>> [B<-no>] [B<-f>] [-h]
+    S<<< [B<-c> <I<cell name>>] >>> [B<-no>] [B<-l>] [B<-f>] [-h]
 
 =for html
 </div>
@@ -71,6 +72,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 068e1eb30c96fa6529e90d50960cd1e85c5af768..6921d979b5dec4eac9924747d891694b56517fc4 100644 (file)
@@ -8,16 +8,17 @@ pts_examine - Displays a Protection Database entry
 <div class="synopsis">
 
 B<pts examine> S<<< B<-nameorid> <I<user or group name or id>>+ >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] 
+    [B<-force>] [B<-help>]
 
 B<pts e> S<<< B<-na> <I<user or group name or id>>+ >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 B<pts check> S<<< B<-na> <I<user or group name or id>>+ >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 B<pts che> S<<< B<-na> <I<user or group name or id>>+ >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -51,6 +52,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 583970300fa0be67d8618b0a76589ea422dc6f75..6c8a641275b5e1da7ab65922f33eb4991bfa8a82 100644 (file)
@@ -8,7 +8,7 @@ pts_interactive - Enters interactive mode
 <div class="synopsis">
 
 B<pts interactive> S<<< [B<-cell>] <I<cell name>> >>> [B<-noauth>]
-    [B<-force>]
+    [B<-auth>] [B<-localauth>] [B<-force>]
 
 B<pts in> S<<< [B<-c>] <I<cell name>> >>> [B<-n>] [B<-f>]
 
@@ -20,6 +20,12 @@ B<pts in> S<<< [B<-c>] <I<cell name>> >>> [B<-n>] [B<-f>]
 The B<pts interactive> command allows the user to enter an interactive
 mode, useful for running bulk commands like creating new users or groups.
 
+B<pts interactive> uses the authentication state supplied on its command
+line to run all bulk commands. However, if a bulk command is supplied 
+with authentication options such as B<-cell>, B<-localauth>, B<-auth> 
+or B<-noauth> then it, and all subsequent bulk commands, will be run with
+those options.
+
 =head1 CAUTIONS
 
 Prior to OpenAFS 1.4.5 and OpenAFS 1.5.23, the B<pts interactive> command
@@ -56,6 +62,12 @@ if one of many operations fails.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =back
 
 =head1 OUTPUT
index 99b71072c306b8d00425f908b570ed4c5815e672..79d53c13a210df5d2e84379db5dd1f9447cfed89 100644 (file)
@@ -8,9 +8,10 @@ pts_listentries - Displays all users or groups in the Protection Database
 <div class="synopsis">
 
 B<pts listentries> [B<-users>] [B<-groups>] S<<< [B<-cell> <I<cell name>>] >>>
-    [B<-noauth>] [B<-force>] [B<-help>]
+    [B<-noauth>] [B<-localauth>] [B<-force>] [B<-help>]
 
-B<pts liste> [B<-u>] [B<-g>] S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-f>] [B<-h>]
+B<pts liste> [B<-u>] [B<-g>] S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-l>] 
+             [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -47,6 +48,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 151ac68c90a3c45fb9235628e48fc5af20a5177d..4fec04e46a8435f71636f991e681367bf14314bf 100644 (file)
@@ -7,9 +7,10 @@ pts_listmax - Displays the max user id and max group id counters
 =for html
 <div class="synopsis">
 
-B<pts listmax> S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+B<pts listmax> S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] 
+    [B<-force>] [B<-help>]
 
-B<pts listm> S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-f>] [B<-h>]
+B<pts listm> S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -44,6 +45,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index fc0d464b24cd4ea18894d5158741dfced73cc737..5baf3a618e8461c7cfa189d1e524dbf75420b469 100644 (file)
@@ -8,10 +8,10 @@ pts_listowned - Show the Protection Database groups owned by a user or group
 <div class="synopsis">
 
 B<pts listowned> S<<< B<-nameorid> <I<user or group name or id>>+ >>>
-    [-cell <I<cell name>>] [B<-noauth>] [B<-force>] [B<-help>]
+    [-cell <I<cell name>>] [B<-noauth>] [B<-localauth>] [B<-force>] [B<-help>]
 
 B<pts listo> S<<< B<-na> <I<user or group name or id>>+ >>>
-    [-c <I<cell name>>] [B<-no>] [B<-f>] [B<-h>]
+    [-c <I<cell name>>] [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -51,6 +51,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 7bacc0b8fc75acc3fdc2aa8dc80c527f353b6674..e5cbdc48e662c5448d8eb6c28910e0bdc6069757 100644 (file)
@@ -8,16 +8,17 @@ pts_membership - Displays the membership list for a user or group
 <div class="synopsis">
 
 B<pts membership> S<<< B<-nameorid> <I<user or group name or id>>+ >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-localauth>] [B<-noauth>] 
+    [B<-force>] [B<-help>]
 
 B<pts m> S<<< B<-na> <I<user or group name or id>>+ >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 B<pts groups> S<<< B<-na> <I<user or group name or id>>+ >>> [-c <I<cell name>>]
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 B<pts g> S<<< B<-na> <I<user or group name or id>>+ >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -59,6 +60,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 102e8853f418ba60a7057a66dccb5eb431536da2..a7a25107eaefb1ce433131621075d2c7c332751b 100644 (file)
@@ -7,9 +7,10 @@ pts_quit - Exit from pts interactive mode
 =for html
 <div class="synopsis">
 
-B<pts quit> S<<< [B<-cell>] <I<cell name>> >>> [B<-noauth>] [B<-force>]
+B<pts quit> S<<< [B<-cell>] <I<cell name>> >>> [B<-noauth>] [B<-localauth>] 
+    [B<-force>]
 
-B<pts q> S<<< [B<-c>] <I<cell name>> >>> [B<-n>] [B<-f>]
+B<pts q> S<<< [B<-c>] <I<cell name>> >>> [B<-n>] [B<-l>] [B<-f>]
 
 =for html
 </div>
@@ -44,6 +45,12 @@ L<pts(1)>.
 Enables the command to continue executing as far as possible when errors
 or other problems occur, rather than halting execution at the first error.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-noauth>
 
 Assigns the unprivileged identity anonymous to the issuer. For more
index eb7bc9f6a997ed36acee1d03ab25d9677884a814..f60a66400cf2a4216356fa4c05fcdfa7974b777b 100644 (file)
@@ -8,10 +8,11 @@ pts_removeuser - Removes a user from a Protection Database group
 <div class="synopsis">
 
 B<pts removeuser> S<<< B<-user> <I<user name>>+ >>> S<<< B<-group> <I<group name>>+ >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] [B<-force>] 
+    [B<-help>]
 
 B<pts rem> S<<< B<-u> <I<user name>>+ >>> S<<< B<-g> <I<group name>>+ >>>
-    S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-f>] [B<-h>]
+    S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -56,6 +57,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index aef05eab3979c2cc1a457837f7c5455c75d29fd9..3d461e8181919abf3ba93dc25ebc1558ebba1492 100644 (file)
@@ -8,10 +8,11 @@ pts_rename - Changes the name of a Protection Database entry
 <div class="synopsis">
 
 B<pts rename> S<<< B<-oldname> <I<old name>> >>> S<<< B<-newname> <I<new name>> >>>
-    S<<< [B<-cell> <I<cell name>>] >>>  [B<-noauth>]  [B<-force>]  [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>>  [B<-noauth>]  [B<-localauth>]  
+    [B<-force>]  [B<-help>]
 
 B<pts ren> S<<< B<-o> <I<old name>> >>> S<<< B<-ne> <I<new name>> >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -69,6 +70,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index f530d1026f68d3c825dbbe979ef7f09dbd55b4a0..ac7bf0edd01f5880bf4ab71e03ac75aa3e2994db 100644 (file)
@@ -10,12 +10,13 @@ pts_setfields - Sets privacy flags or quota for a Protection Database entry
 B<pts setfields> S<<< B<-nameorid> <I<user or group name or id>>+ >>>
     S<<< [B<-access> <I<set privacy flags>>] >>>
     S<<< [B<-groupquota> <I<set limit on group creation>>] >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>]
+    [B<-force>] [B<-help>]
 
 B<pts setf> S<<< B<-na> <I<user or group name or id>>+ >>>
     S<<< [B<-a> <I<set privacy flags>>] >>>
     S<<< [B<-g> <I<set limit on group creation>>] >>> S<<< [B<-c> <I<cell name>>] >>>
-    [B<-no>] [B<-f>] [B<-h>]
+    [B<-no>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -203,6 +204,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 09df9de1cd8292830e9e6cbe6ce152154e6e2e77..97498480b113dbebc23f7b4975cc25ef17f9bfd5 100644 (file)
@@ -8,10 +8,10 @@ pts_setmax - Sets the value of the max group id or max user id counter
 <div class="synopsis">
 
 B<pts setmax> S<<< [B<-group> <I<group max>>] >>> S<<< [B<-user> <I<user max>>] >>>
-    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-force>] [B<-help>]
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] [B<-force>] [B<-help>]
 
 B<pts setm> [B<-g> I<group max>>] S<<< [B<-u> <I<user max>>] >>>
-    S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-f>] [B<-h>]
+    S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-l>] [B<-f>] [B<-h>]
 
 =for html
 </div>
@@ -56,6 +56,12 @@ L<pts(1)>.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 363b4a2e663aa160fcf51e221adbcfc57422834c..4c009081eb8a472d62df0013ad8eaefc981e4013 100644 (file)
@@ -8,10 +8,10 @@ pts_sleep - Pauses for a few seconds
 <div class="synopsis">
 
 B<pts sleep> S<<< [B<-delay>] <I<# of seconds>> >>>
-   S<<< [B<-cell>] <I<cell name>> >>> [B<-noauth>] [B<-force>]
+   S<<< [B<-cell>] <I<cell name>> >>> [B<-noauth>] [B<-localauth>] [B<-force>]
 
 B<pts sl> S<<< [B<-d>] <I<# of seconds>> >>> S<<< [B<-c>] <I<cell name>> >>>
-   [B<-n>] [B<-f>]
+   [B<-n>] [B<-l>] [B<-f>]
 
 =for html
 </div>
@@ -33,7 +33,7 @@ it is always available.
 
 =head1 OPTIONS
 
-Although they have no effect, B<pts quit> takes the following standard
+Although they have no effect, B<pts sleep> takes the following standard
 B<pts> options:
 
 =over 4
@@ -53,6 +53,12 @@ or other problems occur, rather than halting execution at the first error.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the 
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =back
 
 =head1 OUTPUT
index c1859fc3085e518c2bdf2408a8599699ac124d3f..ccaffd69f135911ae11dacc9c683c8b06f2afb44 100644 (file)
@@ -8,10 +8,10 @@ pts_source - Read pts commands from a file
 <div class="synopsis">
 
 B<pts source> S<<< [B<-file>] <I<file name>> >>> S<<< [B<-cell>] <I<cell name>> >>>
-   [B<-noauth>] [B<-force>]
+   [B<-noauth>] [B<-localauth>] [B<-force>]
 
 B<pts so> S<<< [B<-f>] <I<file name>> >>> S<<< [B<-c>] <I<cell name>> >>>
-   [B<-n>] [B<-f>]
+   [B<-n>] [B<-l>] [B<-f>]
 
 =for html
 </div>
@@ -56,6 +56,12 @@ if one of many operations fails.
 Assigns the unprivileged identity anonymous to the issuer. For more
 details, see L<pts(1)>.
 
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. Do not combine this flag with the
+B<-cell> or B<-noauth> options. For more details, see L<pts(1)>.
+
 =back
 
 =head1 OUTPUT
index 5e7ca4261f8eee9a14b3f41ded49a0aef3d4d197..3ff4345f34aa56370c22ec654e064086b9148046 100644 (file)
@@ -8,7 +8,7 @@ bosserver - Initializes the BOS Server
 <div class="synopsis">
 
 B<bosserver> [B<-noauth>] [B<-log>] [B<-enable_peer_stats>]
-    [B<-enable_process_stats>] [B<-help>]
+    [B<-enable_process_stats>] [B<-allow-dotted-principal>] [B<-help>]
 
 =for html
 </div>
index 663e8c556565f9294fecc727d36da346b387ae17..9a1309aea31705f44a98b2b8745b87d5cb45cdcc 100644 (file)
@@ -20,6 +20,7 @@ B<fileserver> S<<< [B<-auditlog> <I<path to log file>>] >>>
     S<<< [B<-busyat> <I<< redirect clients when queue > n >>>] >>>
     [B<-nobusy>] S<<< [B<-rxpck> <I<number of rx extra packets>>] >>>
     [B<-rxdbg>] [B<-rxdbge>] S<<< [B<-rxmaxmtu> <I<bytes>>] >>>
+    [B<-allow-dotted-principal>]
     S<<< [B<-rxbind> <I<address to bind the Rx socket to>>] >>>
     S<<< [B<-vattachpar> <I<number of volume attach threads>>] >>>
     S<<< [B<-m> <I<min percentage spare in partition>>] >>>
@@ -357,7 +358,7 @@ By default, the RXKAD security layer will disallow access by Kerberos
 principals with a dot in the first component of their name. This is to avoid
 the confusion where principals user/admin and user.admin are both mapped to the
 user.admin PTS entry. Sites whose Kerberos realms don't have these collisions 
-between principal names may disable this check by starting the server
+between principal names may disabled this check by starting the server
 with this option.
 
 =item F<-m> <I<min percentage spare in partition>>
index cfad4f54d177b066faa070e3e813c1248e3b46d5..ef17e454666f9ac39aa7941e10ff9d14f74c4057 100644 (file)
@@ -9,7 +9,7 @@ ptserver - Initializes the Protection Server
 
 B<ptserver> S<<< [B<-database> <I<db path>>] >>> S<<< [B<-p> <I<number of processes>>] >>>
     [B<-rebuildDB>] [B<-enable_peer_stats>] [B<-enable_process_stats>]
-    [B<-help>]
+    [B<-allow-dotted-principal>] [B<-help>]
 
 =for html
 </div>
@@ -96,7 +96,7 @@ By default, the RXKAD security layer will disallow access by Kerberos
 principals with a dot in the first component of their name. This is to avoid
 the confusion where principals user/admin and user.admin are both mapped to the
 user.admin PTS entry. Sites whose Kerberos realms don't have these collisions 
-between principal names may disable this check by starting the server
+between principal names may disabled this check by starting the server
 with this option.
 
 =item B<-help>
index 3b5d804cdd96958ac0445f4896fa3acdbfd8eadd..5a03f11978196f790b1f0886b8438a3f64339d67 100644 (file)
@@ -8,7 +8,8 @@ vlserver - Initializes the Volume Location Server
 <div class="synopsis">
 
 B<vlserver> S<<< [B<-p> <I<lwp processes>>] >>> [B<-nojumbo>]
-    [B<-enable_peer_stats>] [B<-enable_process_stats>] [B<-help>]
+    [B<-allow-dotted-principal>] [B<-enable_peer_stats>] [B<-enable_process_stats>] 
+    [B<-help>]
 
 =for html
 </div>
@@ -89,7 +90,7 @@ By default, the RXKAD security layer will disallow access by Kerberos
 principals with a dot in the first component of their name. This is to avoid
 the confusion where principals user/admin and user.admin are both mapped to the
 user.admin PTS entry. Sites whose Kerberos realms don't have these collisions 
-between principal names may disable this check by starting the server
+between principal names may disabled this check by starting the server
 with this option.
 
 =item B<-help>
index 6992cf179a609a16e1c3473e4805d783c46f4fd0..8f13a06ae1a8b0794e536a2d65d239db3f43bfd0 100644 (file)
@@ -9,7 +9,8 @@ volserver - Initializes the Volume Server component of the fs process
 
 B<volserver> [B<-log>] S<<< [B<-p> <I<number of processes>>] >>>
     S<<< [B<-udpsize> <I<size of socket buffer in bytes>>] >>>
-    [B<-enable_peer_stats>] [B<-enable_process_stats>] [B<-help>]
+    [B<-enable_peer_stats>] [B<-enable_process_stats>] 
+    [B<-allow-dotted-principal>] [B<-help>]
 
 =for html
 </div>
@@ -83,7 +84,7 @@ By default, the RXKAD security layer will disallow access by Kerberos
 principals with a dot in the first component of their name. This is to avoid
 the confusion where principals user/admin and user.admin are both mapped to the
 user.admin PTS entry. Sites whose Kerberos realms don't have these collisions 
-between principal names may disable this check by starting the server
+between principal names may disabled this check by starting the server
 with this option.
 
 =item B<-help>
index 623095e488eb515d3acf2d6a9dcbfaa9cab6efc1..a3539f7e2e98f9ddf1a900512d13a372d34a5294 100644 (file)
@@ -50,6 +50,12 @@ struct sourcestack {
     FILE *s_file;
 } *shead;
 
+struct authstate {
+    int sec;
+    const char *confdir;
+    char cell[MAXCELLCHARS];
+};
+
 int
 pts_Interactive(register struct cmd_syndesc *as)
 {
@@ -130,39 +136,78 @@ osi_audit()
 }
 
 int
-GetGlobals(register struct cmd_syndesc *as)
+GetGlobals(struct cmd_syndesc *as, void *arock)
 {
-    register afs_int32 code;
-    char *cell;
-    afs_int32 sec = 1;
+    struct authstate *state = (struct authstate *) arock;
+    afs_int32 code;
+    char *cell = NULL;
+    afs_int32 sec;
+    int changed = 0;
+    const char* confdir;
 
     whoami = as->a0name;
 
     if (!strcmp(as->name, "help"))
        return 0;
-    if (as->parms[16].items)
+
+    if (*state->cell) {
+       cell = state->cell;
+    }
+    sec = state->sec;
+
+    if (state->confdir == NULL) {
+       changed = 1;
+    }
+
+    if (as->parms[16].items) {
+       changed = 1;
        cell = as->parms[16].items->data;
-    else
-       cell = 0;
-    if (as->parms[17].items)
+    }
+    if (as->parms[17].items) { /* -noauth */
+       changed = 1;
        sec = 0;
-
-    if (as->parms[18].items) { /* testing? */
-       code = pr_Initialize(sec, AFSDIR_SERVER_ETC_DIRPATH, cell);
+    }
+    if (as->parms[20].items) { /* -localauth */
+       changed = 1;
+       sec = 2;
+    }
+    if (as->parms[21].items) { /* -auth */
+       changed = 1;
+       sec = 1;
+    }
+    if (as->parms[18].items || as->parms[20].items) {  /* -test, -localauth */
+       changed = 1;
+       confdir = AFSDIR_SERVER_ETC_DIRPATH;
     } else {
-       code = pr_Initialize(sec, AFSDIR_CLIENT_ETC_DIRPATH, cell);
+       if (sec == 2)
+           confdir = AFSDIR_SERVER_ETC_DIRPATH;
+       else 
+           confdir = AFSDIR_CLIENT_ETC_DIRPATH;
+    }
+    if (changed) {
+       CleanUp(as, arock);
+       code = pr_Initialize(sec, confdir, cell);
+    } else {
+       code = 0;
     }
     if (code) {
        afs_com_err(whoami, code, "while initializing");
        return code;
     }
+    state->sec = sec;
+    state->confdir = confdir;
+    if (cell && cell != state->cell)
+       strncpy(state->cell, cell, MAXCELLCHARS-1);
+
+    force = 0;
     if (as->parms[19].items)
        force = 1;
+
     return code;
 }
 
 int
-CleanUp(register struct cmd_syndesc *as)
+CleanUp(register struct cmd_syndesc *as, void *arock)
 {
     if (as && !strcmp(as->name, "help"))
        return 0;
@@ -704,7 +749,7 @@ ListEntries(struct cmd_syndesc *as)
            pr_ListEntries(flag, startindex, &nentries, &entriesp,
                           &nextstartindex);
        if (code) {
-           afs_com_err(whoami, code, "; unable to list entries\n");
+           afs_com_err(whoami, code, "; unable to list entries");
            if (entriesp)
                free(entriesp);
            break;
@@ -972,6 +1017,10 @@ add_std_args(register struct cmd_syndesc *ts)
     cmd_AddParm(ts, "-test", CMD_FLAG, CMD_OPTIONAL | CMD_HIDE, test_help);
     cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL,
                "Continue oper despite reasonable errors");
+    cmd_AddParm(ts, "-localauth", CMD_FLAG, CMD_OPTIONAL,
+               "use local authentication");
+    cmd_AddParm(ts, "-auth", CMD_FLAG, CMD_OPTIONAL,
+               "use user's authentication (default)");
 }
 
 /*
@@ -996,6 +1045,7 @@ main(int argc, char **argv)
     int parsec;
     char *parsev[CMD_MAXPARMS];
     char *savec;
+    struct authstate state;
 
 #ifdef WIN32
     WSADATA WSAjunk;
@@ -1020,6 +1070,9 @@ main(int argc, char **argv)
     sigaction(SIGSEGV, &nsa, NULL);
 #endif
 
+    memset(&state, 0, sizeof(state));
+    state.sec = 1; /* default is auth */
+
     ts = cmd_CreateSyntax("creategroup", CreateGroup, NULL,
                          "create a new group");
     cmd_AddParm(ts, "-name", CMD_LIST, 0, "group name");
@@ -1121,11 +1174,11 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-delay", CMD_SINGLE, 0, "seconds");
     add_std_args(ts);
 
-    cmd_SetBeforeProc(GetGlobals, 0);
+    cmd_SetBeforeProc(GetGlobals, &state);
 
     finished = 1;
     if (code = cmd_Dispatch(argc, argv)) {
-       CleanUp(0);
+       CleanUp(NULL, NULL);
        exit(1);
     }
     source = stdin;
@@ -1160,7 +1213,7 @@ main(int argc, char **argv)
        parsev[0] = savec;
        cmd_FreeArgv(parsev);
     }
-    CleanUp(0);
+    CleanUp(NULL, NULL);
     exit(0);
 }
 
index 8405ee0ac860dffffaec4731178888e514e1d738..fcd9d695ffe363a7debdc55d741137c6aa27406c 100644 (file)
@@ -93,11 +93,12 @@ pr_Initialize(IN afs_int32 secLevel, IN char *confDir, IN char *cell)
        if (!tdir) {
            if (confDir && strcmp(confDir, ""))
                fprintf(stderr,
-                       "libprot: Could not open configuration directory: %s.\n",
-                       confDir);
+                       "%s: Could not open configuration directory: %s.\n",
+                       whoami, confDir);
             else
                fprintf(stderr,
-                       "libprot: No configuration directory specified.\n");
+                       "%s: No configuration directory specified.\n",
+                       whoami);
            return -1;
        }
         gottdir = 1;
@@ -175,16 +176,22 @@ pr_Initialize(IN afs_int32 secLevel, IN char *confDir, IN char *cell)
     /* Most callers use secLevel==1, however, the fileserver uses secLevel==2
      * to force use of the KeyFile.  secLevel == 0 implies -noauth was
      * specified. */
-    if ((secLevel == 2) && (afsconf_GetLatestKey(tdir, 0, 0) == 0)) {
-       /* If secLevel is two assume we're on a file server and use
-        * ClientAuthSecure if possible. */
-       code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
-       if (code)
-           fprintf(stderr,
-                   "libprot: clientauthsecure returns %d %s"
-                   " (so trying noauth)\n", code, afs_error_message(code));
-       if (code)
-           scIndex = 0;        /* use noauth */
+    if (secLevel == 2) {
+       code = afsconf_GetLatestKey(tdir, 0, 0);
+       if (code) {
+           afs_com_err(whoami, code, 
+                       "(getting key from local KeyFile)\n");
+           scIndex = 0; /* use noauth */
+       } else {
+           /* If secLevel is two assume we're on a file server and use
+            * ClientAuthSecure if possible. */
+           code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
+           if (code) {
+               afs_com_err(whoami, code,
+                           "(calling client secure)\n");
+               scIndex = 0;    /* use noauth */
+           }
+        }
        if (scIndex != 2)
            /* if there was a problem, an unauthenticated conn is returned */
            sc[scIndex] = sc[2];
@@ -194,16 +201,17 @@ pr_Initialize(IN afs_int32 secLevel, IN char *confDir, IN char *cell)
        sname.instance[0] = 0;
        strcpy(sname.name, "afs");
        code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
-       if (code)
+       if (code) {
+           afs_com_err(whoami, code, "(getting token)");
            scIndex = 0;
-       else {
+       else {
            if (ttoken.kvno >= 0 && ttoken.kvno <= 256)
                /* this is a kerberos ticket, set scIndex accordingly */
                scIndex = 2;
            else {
                fprintf(stderr,
-                       "libprot: funny kvno (%d) in ticket, proceeding\n",
-                       ttoken.kvno);
+                       "%s: funny kvno (%d) in ticket, proceeding\n",
+                       whoami, ttoken.kvno);
                scIndex = 2;
            }
            sc[2] =
@@ -218,8 +226,9 @@ pr_Initialize(IN afs_int32 secLevel, IN char *confDir, IN char *cell)
     if ((scIndex == 0) && (sc[0] == 0))
        sc[0] = rxnull_NewClientSecurityObject();
     if ((scIndex == 0) && (secLevel != 0))
-       afs_com_err(whoami, code,
-               "Could not get afs tokens, running unauthenticated.");
+       fprintf(stderr,
+               "%s: Could not get afs tokens, running unauthenticated\n",
+               whoami);
 
     memset(serverconns, 0, sizeof(serverconns));       /* terminate list!!! */
     for (i = 0; i < info.numServers; i++)
index ee01ac38c4357fbb0b07521ea81c8600b5a806e7..a127e3cbc894d40b703930d05d5e775ff848a813 100644 (file)
@@ -824,6 +824,9 @@ IsAMemberOf(struct ubik_trans *at, afs_int32 aid, afs_int32 gid)
        return 1;
     if (gid == AUTHUSERID && aid != ANONYMOUSID)
        return 1;
+    /* check -localauth case */
+    if (gid == SYSADMINID && aid == SYSADMINID)
+        return 1;
     if ((gid == 0) || (aid == 0))
        return 0;
 #if defined(SUPERGROUPS)