redefine test 7 for init.
[krb5.git] / doc / kadm5 / api-unit-test.tex
1 \documentstyle[times,fullpage,rcsid]{article}
2
3 \rcs$Header$
4
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 %% Make _ actually generate an _, and allow line-breaking after it.
7 \let\underscore=\_
8 \catcode`_=13
9 \def_{\underscore\penalty75\relax}
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \newcommand{\test}[1]{\begin{description}
13 \setlength{\itemsep}{0pt}
14 #1
15 \end{description}
16
17 }
18
19 \newcommand{\numtest}[2]{\begin{description}
20 \setlength{\itemsep}{0pt}
21 \Number{#1}
22 #2
23 \end{description}
24
25 }
26
27 \newcommand{\Number}[1]{\item[Number:] #1}
28 \newcommand{\Reason}[1]{\item[Reason:] #1}
29 %\newcommand{\Call}[1]{\item[Call:] #1}
30 \newcommand{\Expected}[1]{\item[Expected:] #1}
31 \newcommand{\Conditions}[1]{\item[Conditions:] #1}
32 \newcommand{\Priority}[1]{\item[Priority:] #1}
33 \newcommand{\Status}[1]{\item[Status:] #1}
34 %\newcommand{\Number}[1]{}
35 %\newcommand{\Reason}[1]{}
36 \newcommand{\Call}[1]{}
37 %\newcommand{\Expected}[1]{}
38 %\newcommand{\Conditions}[1]{}
39 %\newcommand{\Priority}[1]{}
40
41 \title{OpenV*Secure 1.0 Admin API\\
42 Unit Test Description\footnote{\rcsHeader}}
43 \author{Jonathan I. Kamens}
44
45 \begin{document}
46
47 \maketitle
48
49 %\tableofcontents
50
51 \section{Introduction}
52
53 The following is a description of a black-box unit test of the
54 OpenV*Secure Admin API.  Each API function is listed, followed by the
55 tests that shoud be performed on it.
56
57 The tests described here are based on the ``OV*Secure Admin Functional
58 Specifications'' revision 1.27, dated November 17, 1993.
59
60 Since inter-realm functionality is not a requirement for OpenV*Secure
61 1.0, it is not tested.
62
63 All tests which test for success should verify, using some means other
64 than the return value of the function being tested, that the requested
65 operation was successfully performed.  For example: for init, test
66 that other operations can be performed after init; for destroy, test
67 that other operations can't be performed after destroy; for modify
68 functions, verify that all modifications to the database which should
69 have taken place did, and that the new, modified data is in effect;
70 for get operations, verify that the data retrieved is the data that
71 should actually be in the database.
72
73 As of now the tests are being re-worked to use database comparision routines
74 simular to the GUI tests.  This routines are not completly in place yet. The
75 purpose for using these routines is for better detection of incorrect
76 database modification.
77
78 Similarly, all tests which test for failure should verify that the
79 no component of the requested operation took place.  For example: if
80 init fails, other operations should not work.  If a modify fails, all
81 data in the database should be the same as it was before the attempt
82 to modify, and the old data should still be what is enforced.
83 Furthermore, tests which test for failure should verify that the
84 failure code returned is correct for the specific failure condition
85 tested.
86
87 Most of the tests listed below should be run twice -- once locally on
88 the server after linking against the server API library, and once
89 talking to the server via authenticated Sun RPC after linking against
90 the client API library.  Tests which should only be run locally or via
91 RPC are labelled with a ``local'' or ``RPC''.
92
93 Furthermore, in addition to the tests labelled below, a test should be
94 implemented to verify that a client can't perform operations on the
95 server through the client API library when it's linked against
96 standard Sun RPC instead of OpenV*Secure's authenticated Sun RPC.
97 This will require a client with a modified version of ovsec_kadm_init
98 which doesn't call auth_gssapi_create.  This client should call this
99 modified ovsec_kadm_init and then call some other admin API function,
100 specifying arguments to both functions that would work if the
101 authenciated Sun RPC had been used, but shouldn't if authentication
102 wasn't used.  The test should verify that the API function call after
103 the init doesn't succeed.
104
105 \section{ovsec_kadm_init}
106
107 \numtest{1}{
108 \Reason{An empty string realm is rejected.}
109 \Status{Implemented}
110 }
111
112 \numtest{2}{
113 \Reason{A realm containing invalid characters is rejected.}
114 \Status{Implemented}
115 }
116
117 \numtest{2.5}{
118 \Reason{A non-existent realm is rejected.}
119 \Status{Implemented}
120 }
121
122 \numtest{3}{
123 \Reason{A bad service name representing an existing principal
124         (different from the client principal) is rejected.}
125 \Conditions{RPC}
126 \Status{Implemented}
127 }
128
129 \numtest{4}{
130 \Reason{A bad service name representing a non-existent
131                 principal is rejected.}
132 \Conditions{RPC}
133 \Status{Implemented}
134 }
135
136 \numtest{5}{
137 \Reason{A bad service name identical to the (existing) client
138                 name is rejected.}
139 \Conditions{RPC}
140 \Status{Implemented}
141 }
142
143 \numtest{6}{
144 \Reason{A null password causes password prompting.}
145 \Status{Implemented}
146 }
147
148 \numtest{7}{
149 \Reason{An empty-string causes password prompting}
150 \Status{Implemented}
151 }
152
153 \numtest{8}{
154 \Reason{An incorrect password which is the password of another
155                 user is rejected.}
156 \Conditions{RPC}
157 \Status{Implemented}
158 }
159
160 \numtest{9}{
161 \Reason{An incorrect password which isn't the password of any
162                 user is rejected.}
163 \Conditions{RPC}
164 \Status{Implemented}
165 }
166
167 \numtest{10}{
168 \Reason{A null client_name is rejected.}
169 \Status{Implemented}
170 }
171
172 % Empty string client name is legal.
173 %\numtest{11}{
174 %\Reason{An empty-string client_name is rejected.}
175 %}
176
177 \numtest{12}{
178 \Reason{A client_name referring to a non-existent principal in
179                 the default realm is rejected.}
180 \Conditions{RPC}
181 \Status{Implemented}
182 }
183
184 \numtest{13}{
185 \Reason{A client_name referring to a non-existent principal
186                 with the local realm specified explicitly is rejected.}
187 \Conditions{RPC}
188 \Status{Implemented}
189 }
190
191 \numtest{14}{
192 \Reason{A client_name referring to a non-existent principal in
193         a nonexistent realm is rejected.}
194 \Conditions{RPC}
195 \Status{Implemented}
196 }
197
198 \numtest{15}{
199 \Reason{A client_name referring to an existing principal in a
200         nonexistent realm is rejected.}
201 \Conditions{RPC}
202 \Status{Implemented}
203 }
204
205 \numtest{16}{
206 \Reason{Valid invocation.}
207 \Status{Implemented}
208 }
209
210 \numtest{17}{
211 \Reason{Valid invocation (explicit client realm).}
212 \Status{Implemented}
213 }
214
215 \numtest{18}{
216 \Reason{Valid invocation (CHANGEPW_SERVICE).}
217 \Status{Implemented}
218 }
219
220 \numtest{19}{
221 \Reason{Valid invocation (explicit service realm).}
222 \Status{Implemented}
223 }
224
225 \numtest{20}{
226 \Reason{Valid invocation (database access allowed after init).}
227 \Status{Implemented}
228 }
229
230 \numtest{21}{
231 \Reason{Init fails when called twice in a row.}
232 \Status{Implemented}
233 }
234
235 \numtest{22}{
236 \Reason{A null password causes master-key prompting.}
237 \Conditions{local}
238 \Status{Implemented}
239 }
240
241 \numtest{23}{
242 \Reason{A non-null password causes reading from the kstash.}
243 \Conditions{local}
244 \Status{Implemented}
245
246 }
247
248 \numtest{24}{
249 \Reason{Null service name is ignored in local invocation.}
250 \Conditions{local}
251 \Status{Implemented}
252 }
253
254 \numtest{25}{
255 \Reason{Non-null service name is ignored in local invocation.}
256 \Conditions{local}
257 \Status{Implemented}
258 }
259
260 \numtest{26}{
261 \Reason{Can't do ``get'' operation before calling init.}
262 \Status{Implemented}
263 }
264
265 \numtest{27}{
266 \Reason{Can't do ``add'' operation before calling init.}
267 \Status{Implemented}
268 }
269
270 \numtest{28}{
271 \Reason{Can't do ``modify'' operation before calling init.}
272 \Status{Implemented}
273 }
274
275 \numtest{29}{
276 \Reason{Can't do ``delete'' operation before calling init.}
277 \Status{Implemented}
278 }
279
280 \numtest{30}{
281 \Reason{Can init after failed init attempt.}
282 \Conditions{local}
283 \Status{Implemented}
284 }
285
286 \section{ovsec_kadm_destroy}
287
288 \numtest{1}{
289 \Reason{Valid invocation.}
290 \Status{Implemented}
291 }
292
293 \numtest{2}{
294 \Reason{Valid invocation (``get'' not allowed after destroy).}
295 \Status{Implemented}
296 }
297
298 \numtest{3}{
299 \Reason{Valid invocation (``add'' not allowed after destroy).}
300 \Status{Implemented}
301 }
302
303 \numtest{4}{
304 \Reason{Valid invocation (``modify'' not allowed after destroy).}
305 \Status{Implemented}
306 }
307
308 \numtest{5}{
309 \Reason{Valid invocation (``delete'' not allowed after destroy).}
310 \Status{Implemented}
311 }
312
313 \numtest{6}{
314 \Reason{Fails if database not initialized.}
315 \Status{Implemented}
316 }
317
318 \numtest{7}{
319 \Reason{Fails if invoked twice in a row.}
320 \Status{Implemented}
321 }
322
323 \numtest{8}{
324 \Reason{Database can be reinitialized after destroy.}
325 \Status{Implemented}
326 }
327
328 \section{ovsec_kadm_create_principal}
329
330 %In the tests below, ``getu'' refers to a user who has only ``get'' access,
331 %''addu'' refers to a user who has only ``add'' access, ``modifyu'' refers to
332 %a user who has only ``modify'' access, and ``deleteu'' refers to a user
333 %who has only ``delete'' access. ``amu'' refers to a user with ``add'' and
334 %''modify'' access.  ``new_princ'' refers to a principal entry structure
335 %filled in as follows:
336 %
337 %       krb5_parse_name("newuser", \&new_princ.principal);
338 %       krb5_timeofday(\&new_princ.princ_expire_time);
339 %               new_princ.princ_expire_time += 130;
340 %       krb5_timeofday(\&new_princ.last_pwd_change);
341 %               new_princ.last_pwd_change += 140;
342 %       krb5_timeofday(\&new_princ.pw_expiration);
343 %               new_princ.pw_expiration += 150;
344 %       new_princ.max_life = 160;
345 %       krb5_parse_name("usera", \&new_princ.mod_name);
346 %       krb5_timeofday(\&new_princ.mod_date);
347 %               new_princ.mod_date += 170;
348 %       new_princ.attributes = 0xabcdabcd;
349 %       new_princ.kvno = 180;
350 %       new_princ.mkvno = 190;
351 %       new_princ.policy = null;
352 %       new_princ.aux_attributes = 0xdeadbeef;
353 %
354 %The offsets of 130 through 190 above are used to ensure that the
355 %fields are all known to be different from each other, so that
356 %accidentally switched fields can be detected.  Some of the fields in
357 %this structure may be changed by the tests, but they should clean up
358 %after themselves.
359
360 \numtest{1}{
361 \Reason{Fails if database not initialized.}
362 \Status{Implemented}
363 }
364
365 \numtest{2}{
366 \Reason{Fails on null princ argument.}
367 \Status{Implemented}
368 }
369
370 \numtest{3}{
371 \Reason{Fails on null password argument.}
372 \Status{Implemented}
373 }
374
375 \numtest{4}{
376 \Reason{Fails on empty-string password argument.}
377 \Status{Implemented}
378 }
379
380 \numtest{5}{
381 \Reason{Fails when mask contains undefined bit.}
382 \Status{Implemented}
383 }
384
385 \numtest{6}{
386 \Reason{Fails when mask contains LAST_PWD_CHANGE bit.}
387 \Status{Implemented}
388 }
389
390 \numtest{7}{
391 \Reason{Fails when mask contains MOD_TIME bit.}
392 \Status{Implemented}
393 }
394
395 \numtest{8}{
396 \Reason{Fails when mask contains MOD_NAME bit.}
397 \Status{Implemented}
398 }
399
400 \numtest{9}{
401 \Reason{Fails when mask contains MKVNO bit.}
402 \Status{Implemented}
403 }
404
405 \numtest{10}{
406 \Reason{Fails when mask contains AUX_ATTRIBUTES bit.}
407 \Status{Implemented}
408 }
409
410 \numtest{11}{
411 \Reason{Fails when mask contains POLICY_CLR bit.}
412 \Status{Implemented}
413 }
414
415 \numtest{12}{
416 \Reason{Fails for caller with no access bits.}
417 \Status{Implemented}
418 }
419
420 \numtest{13}{
421 \Reason{Fails when caller has ``get'' access and not ``add''.}
422 \Conditions{RPC}
423 \Status{Implemented}
424 }
425
426 \numtest{14}{
427 \Reason{Fails when caller has ``modify'' access and not ``add''.}
428 \Conditions{RPC}
429 \Status{Implemented}
430 }
431
432 \numtest{15}{
433 \Reason{Fails when caller has ``delete'' access and not ``add''.}
434 \Conditions{RPC}
435 \Status{Implemented}
436 }
437
438 \numtest{16}{
439 \Reason{Fails when caller connected with CHANGEPW_SERVICE.}
440 \Conditions{RPC}
441 \Status{Implemented}
442 }
443
444 \numtest{17}{
445 \Reason{Fails on attempt to create existing principal.}
446 \Status{Implemented}
447 }
448
449 \numtest{18}{
450 \Reason{Fails when password is too short.}
451 \Status{Implemented}
452 }
453
454 \numtest{19}{
455 \Reason{Fails when password has too few classes.}
456 \Status{Implemented}
457 }
458
459 \numtest{20}{
460 \Reason{Fails when password is in dictionary.}
461 \Status{Implemented}
462 }
463
464 \numtest{21}{
465 \Reason{Nonexistent policy is rejected.}
466 \Status{Implemented}
467 }
468
469 \numtest{22}{
470 \Reason{Fails on invalid principal name.}
471 \Status{Implemented}
472 }
473
474 \numtest{23}{
475 \Reason{Valid invocation.}
476 \Status{Implemented}
477 }
478
479 \numtest{24}{
480 \Reason{Succeeds when caller has ``add'' access and another one.}
481 \Status{Implemented}
482 }
483
484 %\numtest{25}{
485 %\Reason{Fails when password is too short, when override_qual is true.}
486 %}
487
488 %\numtest{26}{
489 %\Reason{Fails when password has too few classes, when
490 %               override_qual is true.}
491 %}
492
493 %\numtest{27}{
494 %\Reason{Fails when password is in dictionary, when override_qual is
495 %               true.}
496 %}
497
498 \numtest{28}{
499 \Reason{Succeeds when assigning policy.}
500 \Status{Implemented}
501 }
502
503 \numtest{29}{
504 \Priority{High}
505 \Reason{Allows 0 (never) for princ_expire_time.}
506 \Status{Implemented}
507 }
508
509 \numtest{30}{
510 \Reason{Allows 0 (never) for pw_expiration when there's no policy.}
511 \Status{Implemented}
512 }
513
514 \numtest{31}{
515 \Reason{Allows 0 (never) for pw_expiration when there's a policy with
516         0 for pw_max_life.}
517 \Status{Implemented}
518 }
519
520 \numtest{32}{
521 \Reason{Accepts 0 (never) for pw_expiration when there's a policy with
522         non-zero pw_max_life, but actually sets pw_expiration to now +
523         pw_max_life.}
524 \Status{Implemented}    
525 }
526
527 \numtest{33}{
528 \Reason{Accepts and sets non-zero pw_expiration when no policy.}
529 \Status{Implemented}
530 }
531
532 \numtest{34}{
533 \Reason{Accepts and sets non-zero pw_expiration when there's a policy
534         with zero pw_max_life.}
535 \Status{Implemented}    
536 }
537
538 \numtest{35}{
539 \Reason{Accepts and sets non-zero pw_expiration when there's a policy
540         with pw_max_life later than the specified pw_expiration.}
541 \Status{Implemented}    
542 }
543
544 \numtest{36}{
545 \Reason{Accepts non-zero pw_expiration and limits it to now +
546         pw_max_life when it's later than now + non-zero pw_max_life in
547         policy.}
548 \Status{Implemented}    
549 }
550
551 \numtest{37}{
552 \Priority{High}
553 \Reason{Sets pw_expiration to 0 (never) if there's no policy and no
554         specified pw_expiration.}
555 \Status{Implemented}    
556 }
557
558 \numtest{38}{
559 \Priority{High}
560 \Reason{Sets pw_expiration to 0 (never) if it isn't specified and the
561         policy has a 0 (never) pw_max_life.}
562 \Status{Implemented}    
563 }
564
565 \numtest{39}{
566 \Priority{High}
567 \Reason{Sets pw_expiration to now + pw_max_life if it isn't specified
568         and the policy has a non-zero pw_max_life.}
569 \Status{Implemented}    
570 }
571
572 \numtest{40}{
573 \Priority{High}
574 \Reason{Allows 0 (forever) for max_life.}
575 \Status{Implemented}
576 }
577
578 \numtest{41}{
579 \Priority{High}
580 \Reason{Doesn't modify or free mod_name on success.}
581 }
582
583 \numtest{42}{
584 \Priority{High}
585 \Reason{Doesn't modify or free mod_name on failure.}
586 }
587
588 \section{ovsec_kadm_delete_principal}
589
590 \numtest{1}{
591 \Reason{Fails if database not initialized.}
592 \Status{Implemented}
593 }
594
595 \numtest{2}{
596 \Reason{Fails on null principal.}
597 \Status{Implemented}
598 }
599
600 % Empty string principal is legal.
601 %\numtest{3}{
602 %\Reason{Fails on empty-string principal.}
603 %}
604
605 % There is not invalid principal names
606 %\numtest{4}{
607 %\Reason{Fails on invalid principal name.}
608 %}
609
610 \numtest{5}{
611 \Priority{High}
612 \Reason{Fails on nonexistent principal.}
613 \Status{Implemented}
614 }
615
616 \numtest{6}{
617 \Priority{High}
618 \Reason{Fails when caller connected with CHANGEPW_SERVICE.}
619 \Conditions{RPC}
620 \Status{Implemented}
621 }
622
623 \numtest{7}{
624 \Priority{High}
625 \Reason{Fails if caller has ``add'' access and not ``delete''.}
626 \Conditions{RPC}
627 \Status{Implemented}
628 }
629
630 \numtest{8}{
631 \Priority{High}
632 \Reason{Fails if caller has ``modify'' access and not ``delete''.}
633 \Conditions{RPC}
634 \Status{Implemented}
635 }
636
637 \numtest{9}{
638 \Priority{High}
639 \Reason{Fails if caller has ``get'' access and not ``delete''.}
640 \Conditions{RPC}
641 \Status{Implemented}
642 }
643
644 \numtest{10}{
645 \Priority{High}
646 \Reason{Fails if caller has no access bits.}
647 \Conditions{RPC}
648 \Status{Implemented}
649 }
650
651 \numtest{11}{
652 \Priority{High}
653 \Reason{Valid invocation.}
654 \Status{Implemented}
655 }
656
657 \numtest{12}{
658 \Priority{High}
659 \Reason{Valid invocation (on principal with policy).}
660 \Status{Implemented}
661 }
662
663
664
665 \section{ovsec_kadm_modify_principal}
666
667 \numtest{1}{
668 \Reason{Fails if database not initialized.}
669 \Status{Implemented}
670 }
671
672 \numtest{2}{
673 \Priority{High}
674 \Reason{Fails if user connected with CHANGEPW_SERVICE.}
675 \Conditions{RPC}
676 \Status{Implemented}
677 }
678
679 \numtest{3}{
680 \Reason{Fails on mask with undefined bit set.}
681 \Status{Implemented}
682 }
683
684 \numtest{4}{
685 \Reason{Fails on mask with PRINCIPAL set.}
686 \Status{Implemented}
687 }
688
689 \numtest{5}{
690 \Priority{High}
691 \Reason{Fails on mask with LAST_PWD_CHANGE set.}
692 \Status{Implemented}
693 }
694
695 \numtest{6}{
696 \Reason{Fails on mask with MOD_TIME set.}
697 \Status{Implemented}
698 }
699
700 \numtest{7}{
701 \Reason{Fails on mask with MOD_NAME set.}
702 \Status{Implemented}
703 }
704
705 \numtest{8}{
706 \Reason{Fails on mask with MKVNO set.}
707 \Status{Implemented}
708 }
709
710 \numtest{9}{
711 \Priority{High}
712 \Reason{Fails on mask with AUX_ATTRIBUTES set.}
713 \Status{Implemented}
714 }
715
716 \numtest{10}{
717 \Reason{Fails on nonexistent principal.}
718 \Status{Implemented}
719 }
720
721 \numtest{11}{
722 \Priority{High}
723 \Reason{Fails for user with no access bits.}
724 \Conditions{RPC}
725 \Status{Implemented}
726 }
727
728 \numtest{12}{
729 \Priority{High}
730 \Reason{Fails for user with ``get'' access.}
731 \Conditions{RPC}
732 \Status{Implemented}
733 }
734
735 \numtest{13}{
736 \Priority{High}
737 \Reason{Fails for user with ``add'' access.}
738 \Conditions{RPC}
739 \Status{Implemented}
740 }
741
742 \numtest{14}{
743 \Priority{High}
744 \Reason{Fails for user with ``delete'' access.}
745 \Conditions{RPC}
746 \Status{Implemented}
747 }
748
749 \numtest{15}{
750 \Priority{High}
751 \Reason{Succeeds for user with ``modify'' access.}
752 \Conditions{RPC}
753 \Status{Implemented}
754 }
755
756 \numtest{16}{
757 \Reason{Succeeds for user with ``modify'' and another access.}
758 \Conditions{RPC}
759 \Status{Implemented}
760 }
761
762 \numtest{17}{
763 \Priority{High}
764 \Reason{Fails when nonexistent policy is specified.}
765 \Status{Implemented}
766 }
767
768 \numtest{18}{
769 \Priority{High}
770 \Reason{Succeeds when existent policy is specified.}
771 \Status{Implemented}
772 }
773
774 \numtest{19}{
775 \Reason{Updates policy count when setting policy from none.}
776 \Status{Implemented}
777 }
778
779 \numtest{20}{
780 \Reason{Updates policy count when clearing policy from set.}
781 \Status{Implemented}
782 }
783
784 \numtest{21}{
785 \Reason{Updates policy count when setting policy from other policy.}
786 \Status{Implemented}
787 }
788
789 \numtest{21.5}
790 \Reason{Policy reference count remains unchanged when policy is
791         changed to itself.}
792 \status{Implemented.}
793 }
794
795 \numtest{22}{
796 \Reason{Allows 0 (never) for pw_expiration when there's no policy.}
797 \Status{Implemented}
798 }
799
800 \numtest{23}{
801 \Reason{Allows 0 (never) for pw_expiration when there's a policy with
802         0 for pw_max_life.}
803 \Status{Implemented}
804 }
805
806 \numtest{24}{
807 \Reason{Accepts 0 (never) for pw_expiration when there's a policy with
808         non-zero pw_max_life, but actually sets pw_expiration to
809         last_pwd_change + pw_max_life.}
810 \Status{Implemented}
811 }
812
813 \numtest{25}{
814 \Reason{Accepts and sets non-zero pw_expiration when no policy.}
815 \Status{Implemented}
816 }
817
818 \numtest{26}{
819 \Reason{Accepts and sets non-zero pw_expiration when there's a policy
820         with zero pw_max_life.}
821 \Status{Implemented}    
822 }
823
824 \numtest{27}{
825 \Reason{Accepts and sets non-zero pw_expiration when there's a policy
826         with pw_max_life later than the specified pw_expiration.}
827 \Status{Implemented}    
828 }
829
830 \numtest{28}{
831 \Reason{Accepts non-zero pw_expiration and limits it to last_pwd_change +
832         pw_max_life when it's later than last_pwd_change + non-zero
833         pw_max_life in policy.}
834 \Status{Implemented}    
835 }
836
837 \numtest{29}{
838 \Priority{High}
839 \Reason{Sets pw_expiration to 0 (never) if there's no policy and no
840         specified pw_expiration.}
841 \Status{Implemented}    
842 }
843
844 \numtest{30}{
845 \Priority{High}
846 \Reason{Sets pw_expiration to 0 (never) if it isn't specified and the
847         policy has a 0 (never) pw_max_life.}
848 \Status{Implemented}    
849 }
850
851 \numtest{31}{
852 \Priority{High}
853 \Reason{Sets pw_expiration to now + pw_max_life if it isn't specified
854         and the policy has a non-zero pw_max_life.}
855 \Status{Implemented}    
856 }
857
858 \numtest{32}{
859 \Priority{High}
860 \Reason{Accepts princ_expire_time change.}
861 \Status{Implemented}
862 }
863
864
865
866 \numtest{33}{
867 \Priority{High}
868 \Reason{Accepts attributes change.}
869 \Status{Implemented}
870 }
871
872 \numtest{33.25}{
873 \Priority{High}
874 \Reason{Accepts attributes change (KRB5_KDB_REQUIRES_PW_CHANGE).}
875 \Status{Implemented}
876 }
877
878 \numtest{33.5}{
879 \Priority{High}
880 \Reason{Accepts attributes change (KRB5_DISALLOW_TGT_BASE).}
881 \Status{Implemented}
882 }
883
884 \numtest{33.75}{
885 \Priority{High}
886 \Reason{Accepts attributes change (KRB5_PW_CHANGE_SERVICE).}
887 \Status{Implemented}
888 }
889
890 \numtest{34}{
891 \Priority{High}
892 \Reason{Accepts max_life change.}
893 \Status{Implemented}
894 }
895
896 \numtest{35}{
897 \Priority{High}
898 \Reason{Accepts kvno change.}
899 \Status{Implemented}
900 }
901
902 \numtest{36}{
903 \Reason{Behaves correctly when policy is set to the same as it was
904         before.}
905 \Status{Implemented}    
906 }
907
908 \numtest{37}{
909 \Reason{Behaves properly when POLICY_CLR is specified and there was no
910         policy before.}
911 \Status{Implemented}    
912 }
913
914 \numtest{38}{
915 \Priority{High}
916 \Reason{Accepts 0 (never) for princ_expire_time.}
917 \Status{Implemented}
918 }
919
920 \numtest{39}{
921 \Priority{High}
922 \Reason{Accepts 0 for max_life.}
923 \Status{Implemented}
924 }
925
926 \numtest{40}{
927 \Reason{Rejects null principal argument.}
928 \Status{Implemented}
929 }
930
931 \numtest{41}{
932 \Priority{High}
933 \Reason{Doesn't modify or free mod_name on success.}
934 }
935
936 \numtest{42}{
937 \Priority{High}
938 \Reason{Doesn't modify or free mod_name on failure.}
939 }
940
941
942 \section{ovsec_kadm_rename_principal}
943
944 \numtest{1}{
945 \Reason{Fails if database not initialized.}
946 \Status{Implemented}
947 }
948
949 \numtest{2}{
950 \Priority{High}
951 \Reason{Fails if user connected with CHANGEPW_SERVICE.}
952 \Conditions{RPC}
953 \Status{Implemented}
954 }
955
956 \numtest{3}{
957 \Priority{High}
958 \Reason{Fails for user with no access bits.}
959 \Conditions{RPC}
960 \Status{Implemented}
961 }
962
963 \numtest{4}{
964 \Reason{Fails for user with ``modify'' access and not ``add'' or
965 ``delete''.}
966 \Conditions{RPC}
967 \Status{Implemented}
968 }
969
970 \numtest{5}{
971 \Reason{Fails for user with ``get'' access and not ``add'' or
972 ``delete''.}
973 \Conditions{RPC}
974 \Status{Implemented}
975 }
976
977 \numtest{6}{
978 \Reason{Fails for user with ``modify'' and ``add'' but not ``delete''.}
979 \Conditions{RPC}
980 \Status{Implemented}
981 }
982
983 \numtest{7}{
984 \Reason{Fails for user with ``modify'' and ``delete'' but not ``add''.}
985 \Conditions{RPC}
986 \Status{Implemented}
987 }
988
989 \numtest{8}{
990 \Reason{Fails for user with ``get'' and ``add'' but not ``delete''.}
991 \Conditions{RPC}
992 \Status{Implemented}
993 }
994
995 \numtest{9}{
996 \Reason{Fails for user with ``get'' and ``delete'' but not ``add.''}
997 \Conditions{RPC}
998 \Status{Implemented}
999 }
1000
1001 \numtest{10}{
1002 \Reason{Fails for user with ``modify'', ``get'' and ``add'', but not
1003         ``delete''.}
1004 \Conditions{RPC}
1005 \Status{Implemented}
1006 }
1007
1008 \numtest{11}{
1009 \Reason{Fails for user with ``modify'', ``get'' and ``delete'', but
1010         not ``add''.}
1011 \Conditions{RPC}
1012 \Status{Implemented}
1013 }
1014
1015 \numtest{12}{
1016 \Priority{High}
1017 \Reason{Fails for user with ``add'' but not ``delete''.}
1018 \Conditions{RPC}
1019 \Status{Implemented}
1020 }
1021
1022 \numtest{13}{
1023 \Priority{High}
1024 \Reason{Fails for user with ``delete'' but not ``add''.}
1025 \Conditions{RPC}
1026 \Status{Implemented}
1027 }
1028
1029 \numtest{14}{
1030 \Priority{High}
1031 \Reason{Succeeds for user with ``add'' and ``delete''.}
1032 \Status{Implemented}
1033 }
1034
1035 \numtest{15}{
1036 \Priority{High}
1037 \Reason{Fails if target principal name exists.}
1038 \Status{Implemented}
1039 }
1040
1041
1042
1043 \section{ovsec_kadm_chpass_principal}
1044 \label{ovseckadmchpassprincipal}
1045
1046 \subsection{Quality/history enforcement tests}
1047
1048 This section lists a series of tests which will be run a number of
1049 times, with various parameter settings (e.g., which access bits user
1050 has, whether user connected with ADMIN_SERVICE or CHANGEPW_SERVICE,
1051 etc.).  The table following the
1052 list of tests gives the various parameter settings under which the
1053 tests should be run, as well which should succeed and which should
1054 fail for each choice of parameter settings.
1055
1056 \subsubsection{List of tests}
1057
1058 The test number of each of these tests is an offset from the base
1059 given in the table below.
1060
1061 \numtest{1}{
1062 \Priority{High}
1063 \Reason{With history setting of 1, change password to itself.}
1064 }
1065
1066 \numtest{2}{
1067 \Reason{With history setting of 2 but no password changes since
1068         principal creation, change password to itself.}
1069 }
1070
1071 \numtest{3}{
1072 \Reason{With history setting of 2 and one password change since
1073         principal creation, change password to itself
1074         and directly previous password.}
1075 }
1076
1077 \numtest{4}{
1078 \Priority{High}
1079 \Reason{With a history setting of 3 and no password changes,
1080         change password to itself.}
1081 }
1082
1083 \numtest{5}{
1084 \Priority{High}
1085 \Reason{With a history setting of 3 and 1 password change,
1086         change password to itself or previous password.}
1087 }
1088
1089 \numtest{6}{
1090 \Priority{High}
1091 \Reason{With a history setting of 3 and 2 password changes,
1092         change password to itself and the two previous passwords.}
1093 }
1094
1095 \numtest{7}{
1096 \Priority{High}
1097 \Reason{Change to previously unused password when now -
1098         last_pwd_change $<$ pw_min_life.}
1099 }
1100
1101 \numtest{8}{
1102 \Priority{High}
1103 \Reason{Change to previously unused password that doesn't contain enough
1104         character classes.}
1105 }
1106
1107 \numtest{9}{
1108 \Priority{High}
1109 \Reason{Change to previously unused password that's too short.}
1110 }
1111
1112 \numtest{10}{
1113 \Priority{High}
1114 \Reason{Change to previously unused password that's in the dictionary.}
1115 }
1116
1117 \subsubsection{List of parameter settings}
1118
1119 In the table below, ``7 passes'' means that test 7 above passes and
1120 the rest of the tests fail.
1121
1122 \begin{tabular}{llllll}
1123 Base & Modify access? & Own password? & Service & Pass/Fail \\ \hline
1124 0 & No & Yes & ADMIN & all fail \\
1125 20 & No & Yes & CHANGEPW & all fail \\
1126 40 & No & No & ADMIN & all fail \\
1127 60 & No & No & CHANGEPW & all fail \\
1128 80 & Yes & Yes & ADMIN & all fail \\
1129 100 & Yes & Yes & CHANGEPW & all fail \\
1130 120 & Yes & No & ADMIN & all fail \\
1131 140 & Yes & No & CHANGEPW & all fail \\
1132 \end{tabular}
1133
1134 \subsection{Other quality/history tests}
1135
1136 \numtest{161}{
1137 \Priority{High}
1138 \Reason{With history of 1, can change password to anything other than
1139         itself that doesn't conflict with other quality
1140         rules.}
1141 }
1142
1143 \numtest{162}{
1144 \Reason{With history of 2 and 2 password changes, can change password
1145         to original password.}
1146 }
1147
1148 \numtest{163}{
1149 \Priority{High}
1150 \Reason{With history of 3 and 3 password changes, can change password
1151         to original password.}
1152 }
1153
1154 \numtest{164}{
1155 \Priority{High}
1156 \Reason{Can change password when now - last_pwd_change $>$ pw_min_life.}
1157 }
1158
1159 \numtest{165}{
1160 \Priority{High}
1161 \Reason{Can change password when it contains exactly the number of
1162         classes required by the policy.}
1163 }
1164
1165 \numtest{166}{
1166 \Priority{High}
1167 \Reason{Can change password when it is exactly the length required by
1168         the policy.}
1169 }
1170
1171 \numtest{167}{
1172 \Priority{High}
1173 \Reason{Can change password to a word that isn't in the dictionary.}
1174 }
1175
1176
1177 \subsection{Other tests}
1178
1179 \numtest{168}{
1180 \Reason{Fails if database not initialized.}
1181 }
1182
1183 \numtest{169}{
1184 \Reason{Fails for non-existent principal.}
1185 }
1186
1187 \numtest{170}{
1188 \Reason{Fails for null password.}
1189 }
1190
1191 \numtest{171}{
1192 \Priority{High}
1193 \Reason{Fails for empty-string password.}
1194 }
1195
1196 \numtest{172}{
1197 \Priority{High}
1198 \Reason{Pw_expiration is set to now + max_pw_life if policy exists and
1199         has non-zero max_pw_life.}
1200 }
1201
1202 \numtest{173}{
1203 \Priority{High}
1204 \Reason{Pw_expiration is set to 0 if policy exists and has zero
1205         max_pw_life.}
1206 }
1207
1208 \numtest{174}{
1209 \Priority{High}
1210 \Reason{Pw_expiration is set to 0 if no policy.}
1211 }
1212
1213 \numtest{175}{
1214 \Priority{High}
1215 \Reason{KRB5_KDC_REQUIRES_PWCHANGE bit is cleared when password is
1216         successfully changed.}
1217 }
1218
1219 \numtest{176}{
1220 \Priority{High}
1221 \Reason{Fails for user with no access bits, on other's password.}
1222 }
1223
1224 \numtest{177}{
1225 \Priority{High}
1226 \Reason{Fails for user with ``get'' but not ``modify'' access, on
1227         other's password.}
1228 }
1229
1230 \numtest{178}{
1231 \Reason{Fails for user with ``delete'' but not ``modify'' access, on
1232         other's password.}
1233 }
1234
1235 \numtest{179}{
1236 \Reason{Fails for user with ``add'' but not ``modify'' access, on
1237         other's password.}
1238 }
1239
1240 \numtest{180}{
1241 \Reason{Succeeds for user with ``get'' and ``modify'' access, on
1242         other's password.}
1243 }
1244
1245 \numtest{180.5}{
1246 \Priority{High}
1247 \Reason{Succeeds for user with ``modify'' but not ``get'' access, on
1248         other's password.}
1249 }
1250
1251 %\numtest{181}{
1252 %\Reason{Password that would succeed if override_qual were false fails
1253 %       if override_qual is true.}
1254 %\Expected{Returns CANNOT_OVERRIDE.}
1255 %}
1256
1257
1258 \section{ovsec_kadm_chpass_principal_util}
1259
1260 Rerun all the tests listed for ovsec_kadm_chpass_principal above in
1261 Section \ref{ovseckadmchpassprincipal}.  Verify that they succeed
1262 and fail in the same circumstances.  Also verify that in each failure
1263 case, the error message returned in msg_ret is as specified in the
1264 functional specification.
1265
1266 Also, run the following additional tests.
1267
1268 \numtest{1}{
1269 \Reason{Null msg_ret is rejected.}
1270 }
1271
1272 \numtest{2}{
1273 \Priority{High}
1274 \Reason{New password is put into pw_ret, when it's prompted for.}
1275 }
1276
1277 \numtest{3}{
1278 \Priority{High}
1279 Reason{New password is put into pw_ret, when it's supplied by the
1280         caller.}
1281 }
1282
1283 \numtest{4}{
1284 \Priority{High}
1285 \Reason{Successful invocation when pw_ret is null.}
1286 }
1287
1288
1289
1290 \section{ovsec_kadm_randkey_principal}
1291
1292 \subsection{TOOSOON enforcement tests}
1293
1294 This test should be run a number of times, as indicated in the table
1295 following it.  The table also indicates the expected result of each
1296 run of the test.
1297
1298 \test{
1299 \Reason{Change key when now - last_pwd_change $<$ pw_min_life.}
1300 }
1301
1302 \subsubsection{List of parameter settings}
1303
1304 \begin{tabular}{llllll}
1305 Number & Modify Access? & Own Key? & Service & Pass/Fail \\ \hline
1306 1 & No & Yes & ADMIN & fail \\
1307 3 & No & Yes & CHANGEPW & fail \\
1308 5 & No & No & ADMIN & fail \\
1309 7 & No & No & CHANGEPW & fail \\
1310 9 & Yes & Yes & ADMIN & fail \\
1311 11 & Yes & Yes & CHANGEPW & fail \\
1312 13 & Yes & No & ADMIN & fail \\
1313 15 & Yes & No & CHANGEPW & fail \\
1314 \end{tabular}
1315
1316 \subsection{Other tests}
1317
1318 \numtest{17}{
1319 \Reason{Fails if database not initialized.}
1320 }
1321
1322 \numtest{18}{
1323 \Reason{Fails for non-existent principal.}
1324 }
1325
1326 \numtest{19}{
1327 \Reason{Fails for null keyblock pointer.}
1328 }
1329
1330 \numtest{20}{
1331 \Priority{High}
1332 \Reason{Pw_expiration is set to now + max_pw_life if policy exists and
1333         has non-zero max_pw_life.}
1334 }
1335
1336 \numtest{21}{
1337 \Priority{High}
1338 \Reason{Pw_expiration is set to 0 if policy exists and has zero
1339         max_pw_life.}
1340 }
1341
1342 \numtest{22}{
1343 \Priority{High}
1344 \Reason{Pw_expiration is set to 0 if no policy.}
1345 }
1346
1347 \numtest{23}{
1348 \Priority{High}
1349 \Reason{KRB5_KDC_REQUIRES_PWCHANGE bit is cleared when key is
1350         successfully changed.}
1351 }
1352
1353 \numtest{24}{
1354 \Priority{High}
1355 \Reason{Fails for user with no access bits, on other's password.}
1356 }
1357
1358 \numtest{25}{
1359 \Priority{High}
1360 \Reason{Fails for user with ``get'' but not ``modify'' access, on
1361         other's password.}
1362 }
1363
1364 \numtest{26}{
1365 \Reason{Fails for user with ``delete'' but not ``modify'' access, on
1366         other's password.}
1367 }
1368
1369 \numtest{27}{
1370 \Reason{Fails for user with ``add'' but not ``modify'' access, on
1371         other's password.}
1372 }
1373
1374 \numtest{28}{
1375 \Reason{Succeeds for user with ``get'' and ``modify'' access, on
1376         other's password.}
1377 }
1378
1379 \numtest{28.5}{
1380 \Priority{High}
1381 \Reason{Succeeds for user with ``modify'' but not ``get'' access, on
1382         other's password.}
1383 }
1384
1385 \numtest{29}{
1386 \Reason{The new key that's assigned is truly random. XXX not sure how
1387         to test this.}
1388 }
1389
1390
1391
1392 \section{ovsec_kadm_get_principal}
1393
1394 \numtest{1}{
1395 \Reason{Fails for null ent.}
1396 \Status{Implemented}
1397 }
1398
1399 \numtest{2}{
1400 \Reason{Fails for non-existent principal.}
1401 \Status{Implemented}
1402 }
1403
1404 \numtest{3}{
1405 \Priority{High}
1406 \Reason{Fails for user with no access bits, retrieving other principal.}
1407 \Conditions{RPC}
1408 \Status{Implemented}
1409 }
1410
1411 \numtest{4}{
1412 \Priority{High}
1413 \Reason{Fails for user with ``add'' but not ``get'', getting principal
1414         other than his own, using ADMIN_SERVICE.}
1415 \Conditions{RPC}
1416 \Status{Implemented}
1417 }
1418
1419 \numtest{5}{
1420 \Reason{Fails for user with ``modify'' but not ``get'', getting
1421         principal other than his own, using ADMIN_SERVICE.}
1422 \Conditions{RPC}
1423 \Status{Implemented}
1424 }
1425
1426 \numtest{6}{
1427 \Reason{Fails for user with ``delete'' but not ``get'', getting
1428         principal other than his own, using ADMIN_SERVICE.}
1429 \Conditions{RPC}
1430 \Status{Implemented}
1431 }
1432
1433 \numtest{7}{
1434 \Reason{Fails for user with ``delete'' but not ``get'', getting
1435         principal other than his own, using CHANGEPW_SERVICE.}
1436 \Conditions{RPC}
1437 \Status{Implemented}
1438 }
1439
1440 \numtest{8}{
1441 \Priority{High}
1442 \Reason{Fails for user with ``get'', getting principal other than his
1443         own, using CHANGEPW_SERVICE.}
1444 \Conditions{RPC}
1445 \Status{Implemented}
1446 }
1447
1448 \numtest{9}{
1449 \Priority{High}
1450 \Reason{Succeeds for user without ``get'', retrieving self, using
1451         ADMIN_SERVICE.}
1452 \Conditions{RPC}
1453 \Status{Implemented}
1454 }
1455
1456 \numtest{10}{
1457 \Reason{Succeeds for user without ``get'', retrieving self, using
1458         CHANGEPW_SERVICE.}
1459 \Status{Implemented}    
1460 }
1461
1462 \numtest{11}{
1463 \Reason{Succeeds for user with ``get'', retrieving self, using
1464         ADMIN_SERVICE.}
1465 \Status{Implemented}            
1466 }
1467
1468 \numtest{12}{
1469 \Reason{Succeeds for user with ``get'', retrieving self, using
1470         CHANGEPW_SERVICE.}
1471 \Status{Implemented}            
1472 }
1473
1474 \numtest{13}{
1475 \Priority{High}
1476 \Reason{Succeeds for user with ``get'', retrieving other user, using
1477         ADMIN_SERVICE.}
1478 \Status{Implemented}            
1479 }
1480
1481 \numtest{14}{
1482 \Reason{Succeeds for user with ``get'' and ``modify'', retrieving
1483         other principal, using ADMIN_SERVICE.}
1484 \Status{Implemented}            
1485 }
1486
1487
1488
1489 \section{ovsec_kadm_create_policy}
1490
1491 \numtest{1}{
1492 \Reason{Fails for mask with undefined bit set.}
1493 \Status{Implemented - untested}
1494 }
1495
1496 \numtest{2}{
1497 \Priority{High}
1498 \Reason{Fails if caller connected with CHANGEPW_SERVICE.}
1499 \Conditions{RPC}
1500 \Status{Implemented}
1501 }
1502
1503 \numtest{3}{
1504 \Reason{Fails for mask without POLICY bit set.}
1505 \Status{Implemented - untested}
1506 }
1507
1508 \numtest{4}{
1509 \Reason{Fails for mask with REF_COUNT bit set.}
1510 \Status{Implemented}
1511 }
1512
1513 \numtest{5}{
1514 \Reason{Fails for invalid policy name.}
1515 \Status{Implemented - untested}
1516 }
1517
1518 \numtest{6}{
1519 \Priority{High}
1520 \Reason{Fails for existing policy name.}
1521 \Status{Implemented}
1522 }
1523
1524 \numtest{7}{
1525 \Reason{Fails for null policy name.}
1526 \Status{Implemented - untested}
1527 }
1528
1529 \numtest{8}{
1530 \Priority{High}
1531 \Reason{Fails for empty-string policy name.}
1532 \Status{Implemented}
1533 }
1534
1535 \numtest{9}{
1536 \Priority{High}
1537 \Reason{Accepts 0 for pw_min_life.}
1538 \Status{Implemented}
1539 }
1540
1541 \numtest{10}{
1542 \Priority{High}
1543 \Reason{Accepts non-zero for pw_min_life.}
1544 \Status{Implemented}
1545 }
1546
1547 \numtest{11}{
1548 \Priority{High}
1549 \Reason{Accepts 0 for pw_max_life.}
1550 \Status{Implemented}
1551 }
1552
1553 \numtest{12}{
1554 \Priority{High}
1555 \Reason{Accepts non-zero for pw_max_life.}
1556 \Status{Implemented}
1557 }
1558
1559 \numtest{13}{
1560 \Priority{High}
1561 \Reason{Rejects 0 for pw_min_length.}
1562 \Status{Implemented}
1563 }
1564
1565 \numtest{14}{
1566 \Priority{High}
1567 \Reason{Accepts non-zero for pw_min_length.}
1568 \Status{Implemented}
1569 }
1570
1571 \numtest{15}{
1572 \Priority{High}
1573 \Reason{Rejects 0 for pw_min_classes.}
1574 \Status{Implemented}
1575 }
1576
1577 \numtest{16}{
1578 \Priority{High}
1579 \Reason{Accepts 1 for pw_min_classes.}
1580 \Status{Implemented}
1581 }
1582
1583 \numtest{17}{
1584 \Priority{High}
1585 \Reason{Accepts 4 for pw_min_classes.}
1586 \Status{Implemented}
1587 }
1588
1589 \numtest{18}{
1590 \Priority{High}
1591 \Reason{Rejects 5 for pw_min_classes.}
1592 \Status{Implemented}
1593 }
1594
1595 \numtest{19}{
1596 \Priority{High}
1597 \Reason{Rejects 0 for pw_history_num.}
1598 \Status{Implemented}
1599 }
1600
1601 \numtest{20}{
1602 \Priority{High}
1603 \Reason{Accepts 1 for pw_history_num.}
1604 \Status{Implemented}
1605 }
1606
1607 \numtest{21}{
1608 \Priority{High}
1609 \Reason{Accepts 10 for pw_history_num.}
1610 \Status{Implemented}
1611 }
1612
1613 \numtest{21.5}{
1614 \Reason{Rejects 11 for pw_history_num.}
1615 \Status{Implemented - untested}
1616 }
1617
1618 \numtest{22}{
1619 \Priority{High}
1620 \Reason{Fails for user with no access bits.}
1621 \Conditions{RPC}
1622 \Status{Implemented}
1623 }
1624
1625 \numtest{23}{
1626 \Priority{High}
1627 \Reason{Fails for user with ``get'' but not ``add''.}
1628 \Conditions{RPC}
1629 \Status{Implemented}
1630 }
1631
1632 \numtest{24}{
1633 \Reason{Fails for user with ``modify'' but not ``add.''}
1634 \Conditions{RPC}
1635 \Status{Implemented - untested}
1636 }
1637
1638 \numtest{25}{
1639 \Reason{Fails for user with ``delete'' but not ``add.''}
1640 \Conditions{RPC}
1641 \Status{Implemented - untested}
1642 }
1643
1644 \numtest{26}{
1645 \Priority{High}
1646 \Reason{Succeeds for user with ``add.''}
1647 \Status{Implemented}
1648 }
1649
1650 \numtest{27}{
1651 \Reason{Succeeds for user with ``get'' and ``add.''}
1652 \Status{Implemented - untested}
1653 }
1654
1655 \numtest{28}{
1656 \Reason{Rejects null policy argument.}
1657 \Status{Implemented - untested}
1658 }
1659
1660 \numtest{29}{
1661 \Reason{Rejects pw_min_life greater than pw_max_life.}
1662 }
1663
1664
1665 \section{ovsec_kadm_delete_policy}
1666
1667 \numtest{1}{
1668 \Reason{Fails for null policy name.}
1669 }
1670
1671 \numtest{2}{
1672 \Priority{High}
1673 \Reason{Fails for empty-string policy name.}
1674 \Status{Implemented}
1675 }
1676
1677 \numtest{3}{
1678 \Reason{Fails for non-existent policy name.}
1679 }
1680
1681 \numtest{4}{
1682 \Reason{Fails for bad policy name.}
1683 }
1684
1685 \numtest{5}{
1686 \Priority{High}
1687 \Reason{Fails if caller connected with CHANGEPW_SERVICE.}
1688 \Conditions{RPC}
1689 \Status{Implemented}
1690 }
1691
1692 \numtest{6}{
1693 \Priority{High}
1694 \Reason{Fails for user with no access bits.}
1695 \Conditions{RPC}
1696 \Status{Implemented}
1697 }
1698
1699 \numtest{7}{
1700 \Priority{High}
1701 \Reason{Fails for user with ``add'' but not ``delete''.}
1702 \Conditions{RPC}
1703 \Status{Implemented}
1704 }
1705
1706 \numtest{8}{
1707 \Reason{Fails for user with ``modify'' but not ``delete''.}
1708 \Conditions{RPC}
1709 }
1710
1711 \numtest{9}{
1712 \Reason{Fails for user with ``get'' but not ``delete.''}
1713 \Conditions{RPC}
1714 }
1715
1716 \numtest{10}{
1717 \Priority{High}
1718 \Reason{Succeeds for user with only ``delete''.}
1719 \Status{Implemented}
1720 }
1721
1722 \numtest{11}{
1723 \Reason{Succeeds for user with ``delete'' and ``add''.}
1724 }
1725
1726 \numtest{12}{
1727 \Priority{High}
1728 \Reason{Fails for policy with non-zero reference count.}
1729 \Status{Implemented}
1730 }
1731
1732
1733
1734 \section{ovsec_kadm_modify_policy}
1735
1736 \numtest{1}{
1737 \Reason{Fails for mask with undefined bit set.}
1738 \Conditions{RPC}
1739 }
1740
1741 \numtest{2}{
1742 \Priority{High}
1743 \Reason{Fails if caller connected with CHANGEPW_SERVICE.}
1744 \Status{Implemented}
1745 }
1746
1747 \numtest{3}{
1748 \Reason{Fails for mask with POLICY bit set.}
1749 }
1750
1751 \numtest{4}{
1752 \Reason{Fails for mask with REF_COUNT bit set.}
1753 \status{Implemented}
1754 }
1755
1756 \numtest{5}{
1757 \Reason{Fails for invalid policy name.}
1758 }
1759
1760 \numtest{6}{
1761 \Reason{Fails for non-existent policy name.}
1762 }
1763
1764 \numtest{7}{
1765 \Reason{Fails for null policy name.}
1766 }
1767
1768 \numtest{8}{
1769 \Priority{High}
1770 \Reason{Fails for empty-string policy name.}
1771 \Status{Implemented}
1772 }
1773
1774 \numtest{9}{
1775 \Priority{High}
1776 \Reason{Accepts 0 for pw_min_life.}
1777 \Status{Implemented}
1778 }
1779
1780 \numtest{10}{
1781 \Priority{High}
1782 \Reason{Accepts non-zero for pw_min_life.}
1783 \Status{Implemented}
1784 }
1785
1786 \numtest{11}{
1787 \Priority{High}
1788 \Reason{Accepts 0 for pw_max_life.}
1789 \Status{Implemented}
1790 }
1791
1792 \numtest{12}{
1793 \Priority{High}
1794 \Reason{Accepts non-zero for pw_max_life.}
1795 \Status{Implemented}
1796 }
1797
1798 \numtest{13}{
1799 \Priority{High}
1800 \Reason{Accepts 0 for pw_min_length.}
1801 \Status{Implemented}
1802 }
1803
1804 \numtest{14}{
1805 \Priority{High}
1806 \Reason{Accepts non-zero for pw_min_length.}
1807 \Status{Implemented}
1808 }
1809
1810 \numtest{15}{
1811 \Priority{High}
1812 \Reason{Rejects 0 for pw_min_classes.}
1813 \Status{Implemented}
1814 }
1815
1816 \numtest{16}{
1817 \Priority{High}
1818 \Reason{Accepts 1 for pw_min_classes.}
1819 \Status{Implemented}
1820 }
1821
1822 \numtest{17}{
1823 \Priority{High}
1824 \Reason{Accepts 4 for pw_min_classes.}
1825 \Status{Implemented}
1826 }
1827
1828 \numtest{18}{
1829 \Priority{High}
1830 \Reason{Rejects 5 for pw_min_classes.}
1831 \Status{Implemented}
1832 }
1833
1834 \numtest{19}{
1835 \Priority{High}
1836 \Reason{Rejects 0 for pw_history_num.}
1837 \Status{Implemented}
1838 }
1839
1840 \numtest{20}{
1841 \Priority{High}
1842 \Reason{Accepts 1 for pw_history_num.}
1843 \Status{Implemented}
1844 }
1845
1846 \numtest{21}{
1847 \Priority{High}
1848 \Reason{Accepts 10 for pw_history_num.}
1849 \Status{Implemented}
1850 }
1851
1852 \numtest{22}{
1853 \Priority{High}
1854 \Reason{Fails for user with no access bits.}
1855 \Conditions{RPC}
1856 \Status{Implemented}
1857 }
1858
1859 \numtest{23}{
1860 \Priority{High}
1861 \Reason{Fails for user with ``get'' but not ``modify''.}
1862 \Conditions{RPC}
1863 \Status{Implemented}
1864 }
1865
1866 \numtest{24}{
1867 \Reason{Fails for user with ``add'' but not ``modify.''}
1868 \Conditions{RPC}
1869 }
1870
1871 \numtest{25}{
1872 \Reason{Fails for user with ``delete'' but not ``modify.''}
1873 \Conditions{RPC}
1874 }
1875
1876 \numtest{26}{
1877 \Priority{High}
1878 \Reason{Succeeds for user with ``modify.''}
1879 \Status{Implemented}
1880 }
1881
1882 \numtest{27}{
1883 \Reason{Succeeds for user with ``get'' and ``modify.''}
1884 }
1885
1886 \numtest{28}{
1887 \Reason{Rejects null policy argument.}
1888 }
1889
1890 \numtest{29}{
1891 \Reason{Rejects change which makes pw_min_life greater than
1892         pw_max_life.}
1893 }
1894
1895 \section{ovsec_kadm_get_policy}
1896
1897 \numtest{1}{
1898 \Reason{Fails for null policy.}
1899 }
1900
1901 \numtest{2}{
1902 \Reason{Fails for invalid policy name.}
1903 }
1904
1905 \numtest{3}{
1906 \Priority{High}
1907 \Reason{Fails for empty-string policy name.}
1908 \Status{Implemented}
1909 }
1910
1911 \numtest{4}{
1912 \Reason{Fails for non-existent policy name.}
1913 }
1914
1915 \numtest{5}{
1916 \Reason{Fails for null ent.}
1917 }
1918
1919 \numtest{6}{
1920 \Priority{High}
1921 \Reason{Fails for user with no access bits trying to get other's
1922         policy, using ADMIN_SERVICE.}
1923 \Conditions{RPC}
1924 \Status{Implemented}
1925 }
1926
1927 \numtest{7}{
1928 \Priority{High}
1929 \Reason{Fails for user with ``add'' but not ``get'' trying to get
1930         other's policy, using ADMIN_SERVICE.}
1931 \Conditions{RPC}
1932 \Status{Implemented}
1933 }
1934
1935 \numtest{8}{
1936 \Reason{Fails for user with ``modify'' but not ``get'' trying to get
1937         other's policy, using ADMIN_SERVICE.}
1938 \Conditions{RPC}        
1939 }
1940
1941 \numtest{9}{
1942 \Reason{Fails for user with ``delete'' but not ``get'' trying to get
1943         other's policy, using ADMIN_SERVICE.}
1944 \Conditions{RPC}        
1945 }
1946
1947 \numtest{10}{
1948 \Reason{Fails for user with ``delete'' but not ``get'' trying to get
1949         other's policy, using CHANGEPW_SERVICE.}
1950 \Conditions{RPC}        
1951 }
1952
1953 \numtest{11}{
1954 \Priority{High}
1955 \Reason{Succeeds for user with only ``get'', trying to get own policy,
1956         using ADMIN_SERVICE.}
1957 \Status{Implemented}
1958 }
1959
1960 \numtest{12}{
1961 \Priority{High}
1962 \Reason{Succeeds for user with only ``get'', trying to get own policy,
1963         using CHANGEPW_SERVICE.}
1964 \Status{Implemented}    
1965 }
1966
1967 \numtest{13}{
1968 \Reason{Succeeds for user with ``add'' and ``get'', trying to get own
1969         policy, using ADMIN_SERVICE.}
1970 }
1971
1972 \numtest{14}{
1973 \Reason{Succeeds for user with ``add'' and ``get'', trying to get own
1974         policy, using CHANGEPW_SERVICE.}
1975 }
1976
1977 \numtest{15}{
1978 \Reason{Succeeds for user without ``get'', trying to get own policy,
1979         using ADMIN_SERVICE.}
1980 }
1981
1982 \numtest{16}{
1983 \Priority{High}
1984 \Reason{Succeeds for user without ``get'', trying to get own policy,
1985         using CHANGEPW_SERVICE.}
1986 \Status{Implemented}    
1987 }
1988
1989 \numtest{17}{
1990 \Priority{High}
1991 \Reason{Succeeds for user with ``get'', trying to get other's policy,
1992         using ADMIN_SERVICE.}
1993 \Status{Implemented}    
1994 }
1995
1996 \numtest{18}{
1997 \Priority{High}
1998 \Reason{Fails for user with ``get'', trying to get other's policy,
1999         using CHANGEPW_SERVICE.}
2000 \Conditions{RPC}
2001 \Status{Implemented}
2002 }
2003
2004 \numtest{19}{
2005 \Reason{Succeeds for user with ``modify'' and ``get'', trying to get
2006         other's policy, using ADMIN_SERVICE.}
2007 }
2008
2009 \numtest{20}{
2010 \Reason{Fails for user with ``modify'' and ``get'', trying to get
2011         other's policy, using CHANGEPW_SERVICE.}
2012 }
2013
2014
2015
2016 \section{ovsec_kadm_free_principal_ent}
2017
2018 In addition to the tests listed here, a memory-leak detector such as
2019 TestCenter, Purify or dbmalloc should be used to verify that the
2020 memory freed by this function is really freed.
2021
2022 \numtest{1}{
2023 \Reason{Null princ succeeds.}
2024 }
2025
2026 \numtest{2}{
2027 \Reason{Non-null princ succeeds.}
2028 }
2029
2030
2031 \section{ovsec_kadm_free_policy_ent}
2032
2033 In addition to the tests listed here, a memory-leak detector such as
2034 TestCenter, Purify or dbmalloc should be used to verify that the
2035 memory freed by this function is really freed.
2036
2037 \numtest{1}{
2038 \Reason{Null policy succeeds.}
2039 }
2040
2041 \numtest{2}{
2042 \Reason{Non-null policy succeeds.}
2043 }
2044
2045
2046
2047 \section{ovsec_kadm_get_privs}
2048
2049 \numtest{1}{
2050 \Reason{Fails for null pointer argument.}
2051 }
2052
2053 This test should be run with the 16 possible combinations of access
2054 bits (since there are 4 access bits, there are $2^4 = 16$ possible
2055 combinations of them):
2056
2057 \numtest{2}{
2058 \Priority{High}
2059 \Reason{Returns correct bit mask for access bits of user.}
2060 \Conditions{RPC}
2061 }
2062
2063 This test should be run locally:
2064
2065 \numtest{3}{
2066 \Priority{High}
2067 \Reason{Returns 0x0f.}
2068 \Conditions{local}
2069 }
2070
2071 \end{document}