2 * Unix SMB/CIFS implementation.
3 * RPC Pipe client / server routines
4 * Copyright (C) Andrew Tridgell 1992-1997,
5 * Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
6 * Copyright (C) Paul Ashton 1997.
7 * Copyright (C) Marc Jacobsen 1999.
8 * Copyright (C) Simo Sorce 2000.
9 * Copyright (C) Gerald Carter 2002.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #define DBGC_CLASS DBGC_RPC_PARSE
31 /*******************************************************************
32 Fill in a BUFFER2 for the data given a REGISTRY_VALUE
33 *******************************************************************/
35 static uint32
reg_init_buffer2( BUFFER2
*buf2
, REGISTRY_VALUE
*val
)
46 real_size
= val
->size
;
51 string
= (char*)val
->data_p
;
52 DEBUG(10,("reg_init_buffer2: REG_SZ string => [%s]\n", string
));
54 init_unistr2( &unistr
, (char*)val
->data_p
, strlen((char*)val
->data_p
)+1 );
55 init_buffer2( buf2
, (char*)unistr
.buffer
, unistr
.uni_str_len
*2 );
56 real_size
= unistr
.uni_str_len
*2;
60 string
= (char*)val
->data_p
;
62 while ( string
&& *string
)
64 DEBUG(10,("reg_init_buffer2: REG_MULTI_SZ string => [%s], size => [%d]\n", string
, real_size
));
66 init_unistr2( &unistr
, string
, strlen(string
)+1 );
68 list2
= Realloc( list
, real_size
+ unistr
.uni_str_len
*2 );
73 memcpy( list
+real_size
, unistr
.buffer
, unistr
.uni_str_len
*2 );
75 real_size
+= unistr
.uni_str_len
*2;
77 string
+= strlen(string
)+1;
80 list2
= Realloc( list
, real_size
+ 2 );
84 list
[real_size
++] = 0x0;
85 list
[real_size
++] = 0x0;
87 init_buffer2( buf2
, (char*)list
, real_size
);
89 DEBUG(10,("reg_init_buffer2: REG_MULTI_SZ size => [%d]\n", real_size
));
94 DEBUG(10,("reg_init_buffer2: REG_BINARY size => [%d]\n", val
->size
));
96 init_buffer2( buf2
, val
->data_p
, val
->size
);
100 DEBUG(10,("reg_init_buffer2: REG_DWORD value => [%d]\n", *(uint32
*)val
->data_p
));
101 init_buffer2( buf2
, val
->data_p
, val
->size
);
105 DEBUG(0,("reg_init_buffer2: Unsupported registry data type [%d]\n", val
->type
));
114 /*******************************************************************
116 ********************************************************************/
118 void init_reg_q_open_hkcr(REG_Q_OPEN_HKCR
*q_o
,
119 uint16 unknown_0
, uint32 level
)
122 q_o
->unknown_0
= unknown_0
;
123 q_o
->unknown_1
= 0x0; /* random - changes */
127 /*******************************************************************
128 reads or writes a structure.
129 ********************************************************************/
131 BOOL
reg_io_q_open_hkcr(char *desc
, REG_Q_OPEN_HKCR
*r_q
, prs_struct
*ps
, int depth
)
136 prs_debug(ps
, depth
, desc
, "reg_io_q_open_hkcr");
142 if(!prs_uint32("ptr ", ps
, depth
, &r_q
->ptr
))
146 if(!prs_uint16("unknown_0", ps
, depth
, &r_q
->unknown_0
))
148 if(!prs_uint16("unknown_1", ps
, depth
, &r_q
->unknown_1
))
150 if(!prs_uint32("level ", ps
, depth
, &r_q
->level
))
158 /*******************************************************************
159 reads or writes a structure.
160 ********************************************************************/
162 BOOL
reg_io_r_open_hkcr(char *desc
, REG_R_OPEN_HKCR
*r_r
, prs_struct
*ps
, int depth
)
167 prs_debug(ps
, depth
, desc
, "reg_io_r_open_hkcr");
173 if(!smb_io_pol_hnd("", &r_r
->pol
, ps
, depth
))
176 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
182 /*******************************************************************
184 ********************************************************************/
186 void init_reg_q_open_hklm(REG_Q_OPEN_HKLM
* q_o
,
187 uint16 unknown_0
, uint32 access_mask
)
190 q_o
->unknown_0
= unknown_0
;
191 q_o
->unknown_1
= 0x0; /* random - changes */
192 q_o
->access_mask
= access_mask
;
196 /*******************************************************************
197 reads or writes a structure.
198 ********************************************************************/
199 BOOL
reg_io_q_open_hklm(char *desc
, REG_Q_OPEN_HKLM
* r_q
, prs_struct
*ps
,
205 prs_debug(ps
, depth
, desc
, "reg_io_q_open_hklm");
211 if (!prs_uint32("ptr ", ps
, depth
, &(r_q
->ptr
)))
215 if (!prs_uint16("unknown_0", ps
, depth
, &(r_q
->unknown_0
)))
217 if (!prs_uint16("unknown_1", ps
, depth
, &(r_q
->unknown_1
)))
219 if (!prs_uint32("access_mask", ps
, depth
, &(r_q
->access_mask
)))
227 /*******************************************************************
228 reads or writes a structure.
229 ********************************************************************/
230 BOOL
reg_io_r_open_hklm(char *desc
, REG_R_OPEN_HKLM
* r_r
, prs_struct
*ps
,
236 prs_debug(ps
, depth
, desc
, "reg_io_r_open_hklm");
242 if (!smb_io_pol_hnd("", &r_r
->pol
, ps
, depth
))
245 if (!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
254 /*******************************************************************
256 ********************************************************************/
258 void init_reg_q_flush_key(REG_Q_FLUSH_KEY
*q_u
, POLICY_HND
*pol
)
260 memcpy(&q_u
->pol
, pol
, sizeof(q_u
->pol
));
263 /*******************************************************************
264 reads or writes a structure.
265 ********************************************************************/
267 BOOL
reg_io_q_flush_key(char *desc
, REG_Q_FLUSH_KEY
*r_q
, prs_struct
*ps
, int depth
)
272 prs_debug(ps
, depth
, desc
, "reg_io_q_flush_key");
278 if(!smb_io_pol_hnd("", &r_q
->pol
, ps
, depth
))
284 /*******************************************************************
285 reads or writes a structure.
286 ********************************************************************/
288 BOOL
reg_io_r_flush_key(char *desc
, REG_R_FLUSH_KEY
*r_r
, prs_struct
*ps
, int depth
)
293 prs_debug(ps
, depth
, desc
, "reg_io_r_flush_key");
299 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
305 /*******************************************************************
306 reads or writes SEC_DESC_BUF and SEC_DATA structures.
307 ********************************************************************/
309 static BOOL
reg_io_hdrbuf_sec(uint32 ptr
, uint32
*ptr3
, BUFHDR
*hdr_sec
, SEC_DESC_BUF
*data
, prs_struct
*ps
, int depth
)
314 if(!smb_io_hdrbuf_pre("hdr_sec", hdr_sec
, ps
, depth
, &hdr_offset
))
317 old_offset
= prs_offset(ps
);
320 if(!prs_uint32("ptr3", ps
, depth
, ptr3
))
324 if (ptr3
== NULL
|| *ptr3
!= 0) {
325 if(!sec_io_desc_buf("data ", &data
, ps
, depth
)) /* JRA - this line is probably wrong... */
329 if(!smb_io_hdrbuf_post("hdr_sec", hdr_sec
, ps
, depth
, hdr_offset
,
330 data
->max_len
, data
->len
))
332 if(!prs_set_offset(ps
, old_offset
+ data
->len
+ sizeof(uint32
) * ((ptr3
!= NULL
) ? 5 : 3)))
342 /*******************************************************************
344 ********************************************************************/
346 void init_reg_q_create_key(REG_Q_CREATE_KEY
*q_c
, POLICY_HND
*hnd
,
347 char *name
, char *class, SEC_ACCESS
*sam_access
,
348 SEC_DESC_BUF
*sec_buf
)
350 int len_name
= name
!= NULL
? strlen(name
) + 1: 0;
351 int len_class
= class != NULL
? strlen(class) + 1: 0;
355 memcpy(&q_c
->pnt_pol
, hnd
, sizeof(q_c
->pnt_pol
));
357 init_uni_hdr(&q_c
->hdr_name
, len_name
);
358 init_unistr2(&q_c
->uni_name
, name
, len_name
);
360 init_uni_hdr(&q_c
->hdr_class
, len_class
);
361 init_unistr2(&q_c
->uni_class
, class, len_class
);
363 q_c
->reserved
= 0x00000000;
364 memcpy(&q_c
->sam_access
, sam_access
, sizeof(q_c
->sam_access
));
367 q_c
->sec_info
= DACL_SECURITY_INFORMATION
| SACL_SECURITY_INFORMATION
;
371 init_buf_hdr(&q_c
->hdr_sec
, sec_buf
->len
, sec_buf
->len
);
373 q_c
->unknown_2
= 0x00000000;
376 /*******************************************************************
377 reads or writes a structure.
378 ********************************************************************/
380 BOOL
reg_io_q_create_key(char *desc
, REG_Q_CREATE_KEY
*r_q
, prs_struct
*ps
, int depth
)
385 prs_debug(ps
, depth
, desc
, "reg_io_q_create_key");
391 if(!smb_io_pol_hnd("", &r_q
->pnt_pol
, ps
, depth
))
394 if(!smb_io_unihdr ("", &r_q
->hdr_name
, ps
, depth
))
396 if(!smb_io_unistr2("", &r_q
->uni_name
, r_q
->hdr_name
.buffer
, ps
, depth
))
401 if(!smb_io_unihdr ("", &r_q
->hdr_class
, ps
, depth
))
403 if(!smb_io_unistr2("", &r_q
->uni_class
, r_q
->hdr_class
.buffer
, ps
, depth
))
408 if(!prs_uint32("reserved", ps
, depth
, &r_q
->reserved
))
410 if(!sec_io_access("sam_access", &r_q
->sam_access
, ps
, depth
))
413 if(!prs_uint32("ptr1", ps
, depth
, &r_q
->ptr1
))
416 if (r_q
->ptr1
!= 0) {
417 if(!prs_uint32("sec_info", ps
, depth
, &r_q
->sec_info
))
421 if(!prs_uint32("ptr2", ps
, depth
, &r_q
->ptr2
))
423 if(!reg_io_hdrbuf_sec(r_q
->ptr2
, &r_q
->ptr3
, &r_q
->hdr_sec
, r_q
->data
, ps
, depth
))
426 if(!prs_uint32("unknown_2", ps
, depth
, &r_q
->unknown_2
))
432 /*******************************************************************
433 reads or writes a structure.
434 ********************************************************************/
436 BOOL
reg_io_r_create_key(char *desc
, REG_R_CREATE_KEY
*r_r
, prs_struct
*ps
, int depth
)
441 prs_debug(ps
, depth
, desc
, "reg_io_r_create_key");
447 if(!smb_io_pol_hnd("", &r_r
->key_pol
, ps
, depth
))
449 if(!prs_uint32("unknown", ps
, depth
, &r_r
->unknown
))
452 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
459 /*******************************************************************
461 ********************************************************************/
463 void init_reg_q_delete_val(REG_Q_DELETE_VALUE
*q_c
, POLICY_HND
*hnd
,
466 int len_name
= name
!= NULL
? strlen(name
) + 1: 0;
469 memcpy(&q_c
->pnt_pol
, hnd
, sizeof(q_c
->pnt_pol
));
471 init_uni_hdr(&q_c
->hdr_name
, len_name
);
472 init_unistr2(&q_c
->uni_name
, name
, len_name
);
475 /*******************************************************************
476 reads or writes a structure.
477 ********************************************************************/
479 BOOL
reg_io_q_delete_val(char *desc
, REG_Q_DELETE_VALUE
*r_q
, prs_struct
*ps
, int depth
)
484 prs_debug(ps
, depth
, desc
, "reg_io_q_delete_val");
490 if(!smb_io_pol_hnd("", &r_q
->pnt_pol
, ps
, depth
))
493 if(!smb_io_unihdr ("", &r_q
->hdr_name
, ps
, depth
))
495 if(!smb_io_unistr2("", &r_q
->uni_name
, r_q
->hdr_name
.buffer
, ps
, depth
))
504 /*******************************************************************
505 reads or writes a structure.
506 ********************************************************************/
508 BOOL
reg_io_r_delete_val(char *desc
, REG_R_DELETE_VALUE
*r_r
, prs_struct
*ps
, int depth
)
513 prs_debug(ps
, depth
, desc
, "reg_io_r_delete_val");
519 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
525 /*******************************************************************
527 ********************************************************************/
529 void init_reg_q_delete_key(REG_Q_DELETE_KEY
*q_c
, POLICY_HND
*hnd
,
532 int len_name
= name
!= NULL
? strlen(name
) + 1: 0;
535 memcpy(&q_c
->pnt_pol
, hnd
, sizeof(q_c
->pnt_pol
));
537 init_uni_hdr(&q_c
->hdr_name
, len_name
);
538 init_unistr2(&q_c
->uni_name
, name
, len_name
);
541 /*******************************************************************
542 reads or writes a structure.
543 ********************************************************************/
545 BOOL
reg_io_q_delete_key(char *desc
, REG_Q_DELETE_KEY
*r_q
, prs_struct
*ps
, int depth
)
550 prs_debug(ps
, depth
, desc
, "reg_io_q_delete_key");
556 if(!smb_io_pol_hnd("", &r_q
->pnt_pol
, ps
, depth
))
559 if(!smb_io_unihdr ("", &r_q
->hdr_name
, ps
, depth
))
561 if(!smb_io_unistr2("", &r_q
->uni_name
, r_q
->hdr_name
.buffer
, ps
, depth
))
569 /*******************************************************************
570 reads or writes a structure.
571 ********************************************************************/
573 BOOL
reg_io_r_delete_key(char *desc
, REG_R_DELETE_KEY
*r_r
, prs_struct
*ps
, int depth
)
578 prs_debug(ps
, depth
, desc
, "reg_io_r_delete_key");
584 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
590 /*******************************************************************
592 ********************************************************************/
594 void init_reg_q_query_key(REG_Q_QUERY_KEY
*q_o
, POLICY_HND
*hnd
,
595 uint32 max_class_len
)
599 memcpy(&q_o
->pol
, hnd
, sizeof(q_o
->pol
));
600 init_uni_hdr(&q_o
->hdr_class
, max_class_len
);
601 q_o
->uni_class
.uni_max_len
= max_class_len
;
604 /*******************************************************************
605 reads or writes a structure.
606 ********************************************************************/
608 BOOL
reg_io_q_query_key(char *desc
, REG_Q_QUERY_KEY
*r_q
, prs_struct
*ps
, int depth
)
613 prs_debug(ps
, depth
, desc
, "reg_io_q_query_key");
619 if(!smb_io_pol_hnd("", &r_q
->pol
, ps
, depth
))
621 if(!smb_io_unihdr ("", &r_q
->hdr_class
, ps
, depth
))
623 if(!smb_io_unistr2("", &r_q
->uni_class
, r_q
->hdr_class
.buffer
, ps
, depth
))
633 /*******************************************************************
634 reads or writes a structure.
635 ********************************************************************/
637 BOOL
reg_io_r_query_key(char *desc
, REG_R_QUERY_KEY
*r_r
, prs_struct
*ps
, int depth
)
642 prs_debug(ps
, depth
, desc
, "reg_io_r_query_key");
648 if(!smb_io_unihdr ("", &r_r
->hdr_class
, ps
, depth
))
650 if(!smb_io_unistr2("", &r_r
->uni_class
, r_r
->hdr_class
.buffer
, ps
, depth
))
656 if(!prs_uint32("num_subkeys ", ps
, depth
, &r_r
->num_subkeys
))
658 if(!prs_uint32("max_subkeylen ", ps
, depth
, &r_r
->max_subkeylen
))
660 if(!prs_uint32("reserved ", ps
, depth
, &r_r
->reserved
))
662 if(!prs_uint32("num_values ", ps
, depth
, &r_r
->num_values
))
664 if(!prs_uint32("max_valnamelen", ps
, depth
, &r_r
->max_valnamelen
))
666 if(!prs_uint32("max_valbufsize", ps
, depth
, &r_r
->max_valbufsize
))
668 if(!prs_uint32("sec_desc ", ps
, depth
, &r_r
->sec_desc
))
670 if(!smb_io_time("mod_time ", &r_r
->mod_time
, ps
, depth
))
673 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
679 /*******************************************************************
681 ********************************************************************/
683 void init_reg_q_unknown_1a(REG_Q_UNKNOWN_1A
*q_o
, POLICY_HND
*hnd
)
685 memcpy(&q_o
->pol
, hnd
, sizeof(q_o
->pol
));
689 /*******************************************************************
690 reads or writes a structure.
691 ********************************************************************/
693 BOOL
reg_io_q_unknown_1a(char *desc
, REG_Q_UNKNOWN_1A
*r_q
, prs_struct
*ps
, int depth
)
698 prs_debug(ps
, depth
, desc
, "reg_io_q_unknown_1a");
704 if(!smb_io_pol_hnd("", &r_q
->pol
, ps
, depth
))
710 /*******************************************************************
711 reads or writes a structure.
712 ********************************************************************/
714 BOOL
reg_io_r_unknown_1a(char *desc
, REG_R_UNKNOWN_1A
*r_r
, prs_struct
*ps
, int depth
)
719 prs_debug(ps
, depth
, desc
, "reg_io_r_unknown_1a");
725 if(!prs_uint32("unknown", ps
, depth
, &r_r
->unknown
))
727 if(!prs_ntstatus("status" , ps
, depth
, &r_r
->status
))
734 /*******************************************************************
735 reads or writes a structure.
736 ********************************************************************/
738 BOOL
reg_io_q_save_key(char *desc
, REG_Q_SAVE_KEY
*r_q
, prs_struct
*ps
, int depth
)
743 prs_debug(ps
, depth
, desc
, "reg_io_q_save_key");
749 if(!smb_io_pol_hnd("", &r_q
->pol
, ps
, depth
))
752 if(!smb_io_unihdr ("hdr_file", &r_q
->hdr_file
, ps
, depth
))
754 if(!smb_io_unistr2("uni_file", &r_q
->uni_file
, r_q
->hdr_file
.buffer
, ps
, depth
))
757 if(!prs_uint32("unknown", ps
, depth
, &r_q
->unknown
))
763 /*******************************************************************
764 reads or writes a structure.
765 ********************************************************************/
767 BOOL
reg_io_r_save_key(char *desc
, REG_R_SAVE_KEY
*r_r
, prs_struct
*ps
, int depth
)
772 prs_debug(ps
, depth
, desc
, "reg_io_r_save_key");
778 if(!prs_ntstatus("status" , ps
, depth
, &r_r
->status
))
784 /*******************************************************************
786 ********************************************************************/
788 void init_reg_q_open_hku(REG_Q_OPEN_HKU
*q_o
,
789 uint16 unknown_0
, uint32 access_mask
)
792 q_o
->unknown_0
= unknown_0
;
793 q_o
->unknown_1
= 0x0; /* random - changes */
794 q_o
->access_mask
= access_mask
;
797 /*******************************************************************
798 reads or writes a structure.
799 ********************************************************************/
801 BOOL
reg_io_q_open_hku(char *desc
, REG_Q_OPEN_HKU
*r_q
, prs_struct
*ps
, int depth
)
806 prs_debug(ps
, depth
, desc
, "reg_io_q_open_hku");
812 if(!prs_uint32("ptr ", ps
, depth
, &r_q
->ptr
))
815 if(!prs_uint16("unknown_0 ", ps
, depth
, &r_q
->unknown_0
))
817 if(!prs_uint16("unknown_1 ", ps
, depth
, &r_q
->unknown_1
))
819 if(!prs_uint32("access_mask ", ps
, depth
, &r_q
->access_mask
))
826 /*******************************************************************
827 reads or writes a structure.
828 ********************************************************************/
830 BOOL
reg_io_r_open_hku(char *desc
, REG_R_OPEN_HKU
*r_r
, prs_struct
*ps
, int depth
)
835 prs_debug(ps
, depth
, desc
, "reg_io_r_open_hku");
841 if(!smb_io_pol_hnd("", &r_r
->pol
, ps
, depth
))
844 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
850 /*******************************************************************
851 Inits an REG_Q_CLOSE structure.
852 ********************************************************************/
854 void init_reg_q_close(REG_Q_CLOSE
*q_c
, POLICY_HND
*hnd
)
856 DEBUG(5,("init_reg_q_close\n"));
858 memcpy(&q_c
->pol
, hnd
, sizeof(q_c
->pol
));
861 /*******************************************************************
862 reads or writes a structure.
863 ********************************************************************/
865 BOOL
reg_io_q_close(char *desc
, REG_Q_CLOSE
*q_u
, prs_struct
*ps
, int depth
)
870 prs_debug(ps
, depth
, desc
, "reg_io_q_close");
876 if(!smb_io_pol_hnd("", &q_u
->pol
, ps
, depth
))
884 /*******************************************************************
885 reads or writes a structure.
886 ********************************************************************/
888 BOOL
reg_io_r_close(char *desc
, REG_R_CLOSE
*r_u
, prs_struct
*ps
, int depth
)
893 prs_debug(ps
, depth
, desc
, "reg_io_r_close");
899 if(!smb_io_pol_hnd("", &r_u
->pol
, ps
, depth
))
904 if(!prs_ntstatus("status", ps
, depth
, &r_u
->status
))
910 /*******************************************************************
912 ********************************************************************/
914 void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC
*q_i
, POLICY_HND
*pol
, SEC_DESC_BUF
*sec_desc_buf
)
916 memcpy(&q_i
->pol
, pol
, sizeof(q_i
->pol
));
918 q_i
->sec_info
= DACL_SECURITY_INFORMATION
;
921 init_buf_hdr(&q_i
->hdr_sec
, sec_desc_buf
->len
, sec_desc_buf
->len
);
922 q_i
->data
= sec_desc_buf
;
925 /*******************************************************************
926 reads or writes a structure.
927 ********************************************************************/
929 BOOL
reg_io_q_set_key_sec(char *desc
, REG_Q_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
)
934 prs_debug(ps
, depth
, desc
, "reg_io_q_set_key_sec");
940 if(!smb_io_pol_hnd("", &r_q
->pol
, ps
, depth
))
943 if(!prs_uint32("sec_info", ps
, depth
, &r_q
->sec_info
))
945 if(!prs_uint32("ptr ", ps
, depth
, &r_q
->ptr
))
948 if(!reg_io_hdrbuf_sec(r_q
->ptr
, NULL
, &r_q
->hdr_sec
, r_q
->data
, ps
, depth
))
954 /*******************************************************************
955 reads or writes a structure.
956 ********************************************************************/
958 BOOL
reg_io_r_set_key_sec(char *desc
, REG_R_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
)
963 prs_debug(ps
, depth
, desc
, "reg_io_r_set_key_sec");
969 if(!prs_ntstatus("status", ps
, depth
, &r_q
->status
))
976 /*******************************************************************
978 ********************************************************************/
980 void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC
*q_i
, POLICY_HND
*pol
,
981 uint32 sec_buf_size
, SEC_DESC_BUF
*psdb
)
983 memcpy(&q_i
->pol
, pol
, sizeof(q_i
->pol
));
985 q_i
->sec_info
= OWNER_SECURITY_INFORMATION
|
986 GROUP_SECURITY_INFORMATION
|
987 DACL_SECURITY_INFORMATION
;
989 q_i
->ptr
= psdb
!= NULL
? 1 : 0;
992 init_buf_hdr(&q_i
->hdr_sec
, sec_buf_size
, 0);
995 /*******************************************************************
996 reads or writes a structure.
997 ********************************************************************/
999 BOOL
reg_io_q_get_key_sec(char *desc
, REG_Q_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
)
1004 prs_debug(ps
, depth
, desc
, "reg_io_q_get_key_sec");
1010 if(!smb_io_pol_hnd("", &r_q
->pol
, ps
, depth
))
1013 if(!prs_uint32("sec_info", ps
, depth
, &r_q
->sec_info
))
1015 if(!prs_uint32("ptr ", ps
, depth
, &r_q
->ptr
))
1018 if(!reg_io_hdrbuf_sec(r_q
->ptr
, NULL
, &r_q
->hdr_sec
, r_q
->data
, ps
, depth
))
1025 /*******************************************************************
1027 ********************************************************************/
1028 void init_reg_r_get_key_sec(REG_R_GET_KEY_SEC
*r_i
, POLICY_HND
*pol
,
1029 uint32 buf_len
, uint8
*buf
,
1033 init_buf_hdr(&r_i
->hdr_sec
, buf_len
, buf_len
);
1034 init_sec_desc_buf(r_i
->data
, buf_len
, 1);
1036 r_i
->status
= status
; /* 0x0000 0000 or 0x0000 007a */
1040 /*******************************************************************
1041 reads or writes a structure.
1042 ********************************************************************/
1044 BOOL
reg_io_r_get_key_sec(char *desc
, REG_R_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
)
1049 prs_debug(ps
, depth
, desc
, "reg_io_r_get_key_sec");
1055 if(!prs_uint32("ptr ", ps
, depth
, &r_q
->ptr
))
1058 if (r_q
->ptr
!= 0) {
1059 if(!smb_io_hdrbuf("", &r_q
->hdr_sec
, ps
, depth
))
1061 if(!sec_io_desc_buf("", &r_q
->data
, ps
, depth
))
1067 if(!prs_ntstatus("status", ps
, depth
, &r_q
->status
))
1073 /*******************************************************************
1075 ********************************************************************/
1077 BOOL
init_reg_q_info(REG_Q_INFO
*q_i
, POLICY_HND
*pol
, char* val_name
)
1079 int len_type
= val_name
!= NULL
? strlen(val_name
) + 1 : 0;
1086 init_uni_hdr(&(q_i
->hdr_type
), len_type
);
1087 init_unistr2(&(q_i
->uni_type
), val_name
, len_type
);
1089 q_i
->ptr_reserved
= 1;
1092 q_i
->ptr_bufsize
= 1;
1097 q_i
->ptr_buflen
= 1;
1100 q_i
->ptr_buflen2
= 1;
1106 /*******************************************************************
1107 reads or writes a structure.
1108 ********************************************************************/
1110 BOOL
reg_io_q_info(char *desc
, REG_Q_INFO
*r_q
, prs_struct
*ps
, int depth
)
1115 prs_debug(ps
, depth
, desc
, "reg_io_q_info");
1121 if(!smb_io_pol_hnd("", &r_q
->pol
, ps
, depth
))
1123 if(!smb_io_unihdr ("", &r_q
->hdr_type
, ps
, depth
))
1125 if(!smb_io_unistr2("", &r_q
->uni_type
, r_q
->hdr_type
.buffer
, ps
, depth
))
1131 if(!prs_uint32("ptr_reserved", ps
, depth
, &(r_q
->ptr_reserved
)))
1134 if(!prs_uint32("ptr_buf", ps
, depth
, &(r_q
->ptr_buf
)))
1138 if(!prs_uint32("ptr_bufsize", ps
, depth
, &(r_q
->ptr_bufsize
)))
1140 if(!prs_uint32("bufsize", ps
, depth
, &(r_q
->bufsize
)))
1142 if(!prs_uint32("buf_unk", ps
, depth
, &(r_q
->buf_unk
)))
1146 if(!prs_uint32("unk1", ps
, depth
, &(r_q
->unk1
)))
1149 if(!prs_uint32("ptr_buflen", ps
, depth
, &(r_q
->ptr_buflen
)))
1152 if (r_q
->ptr_buflen
) {
1153 if(!prs_uint32("buflen", ps
, depth
, &(r_q
->buflen
)))
1155 if(!prs_uint32("ptr_buflen2", ps
, depth
, &(r_q
->ptr_buflen2
)))
1157 if(!prs_uint32("buflen2", ps
, depth
, &(r_q
->buflen2
)))
1164 /*******************************************************************
1166 New version to replace older init_reg_r_info()
1167 ********************************************************************/
1169 BOOL
new_init_reg_r_info(uint32 include_keyval
, REG_R_INFO
*r_r
,
1170 REGISTRY_VALUE
*val
, NTSTATUS status
)
1182 r_r
->type
= val
->type
;
1184 /* if include_keyval is not set, don't send the key value, just
1185 the buflen data. probably used by NT5 to allocate buffer space - SK */
1187 if ( include_keyval
) {
1188 r_r
->ptr_uni_val
= 1;
1189 buf_len
= reg_init_buffer2( &r_r
->uni_val
, val
);
1193 /* dummy buffer used so we can get the size */
1194 r_r
->ptr_uni_val
= 0;
1195 buf_len
= reg_init_buffer2( &buf2
, val
);
1198 r_r
->ptr_max_len
= 1;
1199 r_r
->buf_max_len
= buf_len
;
1202 r_r
->buf_len
= buf_len
;
1204 r_r
->status
= status
;
1209 /*******************************************************************
1211 ********************************************************************/
1213 BOOL
init_reg_r_info(uint32 include_keyval
, REG_R_INFO
*r_r
,
1214 BUFFER2
* buf
, uint32 type
, NTSTATUS status
)
1222 /* if include_keyval is not set, don't send the key value, just
1223 the buflen data. probably used by NT5 to allocate buffer space - SK */
1225 r_r
->ptr_uni_val
= include_keyval
? 1:0;
1226 r_r
->uni_val
= *buf
;
1228 r_r
->ptr_max_len
= 1;
1229 r_r
->buf_max_len
= r_r
->uni_val
.buf_max_len
;
1232 r_r
->buf_len
= r_r
->uni_val
.buf_len
;
1234 r_r
->status
= status
;
1239 /*******************************************************************
1240 reads or writes a structure.
1241 ********************************************************************/
1243 BOOL
reg_io_r_info(char *desc
, REG_R_INFO
*r_r
, prs_struct
*ps
, int depth
)
1248 prs_debug(ps
, depth
, desc
, "reg_io_r_info");
1254 if(!prs_uint32("ptr_type", ps
, depth
, &(r_r
->ptr_type
)))
1257 if (r_r
->ptr_type
!= 0) {
1258 if(!prs_uint32("type", ps
, depth
, &r_r
->type
))
1262 if(!prs_uint32("ptr_uni_val", ps
, depth
, &(r_r
->ptr_uni_val
)))
1265 if(r_r
->ptr_uni_val
!= 0) {
1266 if(!smb_io_buffer2("uni_val", &r_r
->uni_val
, r_r
->ptr_uni_val
, ps
, depth
))
1273 if(!prs_uint32("ptr_max_len", ps
, depth
, &(r_r
->ptr_max_len
)))
1276 if (r_r
->ptr_max_len
!= 0) {
1277 if(!prs_uint32("buf_max_len", ps
, depth
, &(r_r
->buf_max_len
)))
1281 if(!prs_uint32("ptr_len", ps
, depth
, &(r_r
->ptr_len
)))
1283 if (r_r
->ptr_len
!= 0) {
1284 if(!prs_uint32("buf_len", ps
, depth
, &(r_r
->buf_len
)))
1288 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
1294 /*******************************************************************
1296 ********************************************************************/
1298 void init_reg_q_enum_val(REG_Q_ENUM_VALUE
*q_i
, POLICY_HND
*pol
,
1299 uint32 val_idx
, uint32 max_val_len
,
1304 memcpy(&q_i
->pol
, pol
, sizeof(q_i
->pol
));
1306 q_i
->val_index
= val_idx
;
1307 init_uni_hdr(&q_i
->hdr_name
, max_val_len
);
1308 q_i
->uni_name
.uni_max_len
= max_val_len
;
1314 q_i
->buf_value
.buf_max_len
= max_buf_len
;
1317 q_i
->len_value1
= max_buf_len
;
1320 q_i
->len_value2
= 0;
1323 /*******************************************************************
1325 ********************************************************************/
1327 void init_reg_r_enum_val(REG_R_ENUM_VALUE
*r_u
, REGISTRY_VALUE
*val
)
1331 DEBUG(8,("init_reg_r_enum_val: Enter\n"));
1337 DEBUG(10,("init_reg_r_enum_val: Valuename => [%s]\n", val
->valuename
));
1339 init_uni_hdr( &r_u
->hdr_name
, strlen(val
->valuename
)+1 );
1340 init_unistr2( &r_u
->uni_name
, val
->valuename
, strlen(val
->valuename
)+1 );
1345 r_u
->type
= val
->type
;
1347 /* REG_SZ & REG_MULTI_SZ must be converted to UNICODE */
1350 real_size
= reg_init_buffer2( &r_u
->buf_value
, val
);
1355 r_u
->len_value1
= real_size
;
1358 r_u
->len_value2
= real_size
;
1360 DEBUG(8,("init_reg_r_enum_val: Exit\n"));
1363 /*******************************************************************
1364 reads or writes a structure.
1365 ********************************************************************/
1367 BOOL
reg_io_q_enum_val(char *desc
, REG_Q_ENUM_VALUE
*q_q
, prs_struct
*ps
, int depth
)
1372 prs_debug(ps
, depth
, desc
, "reg_io_q_enum_val");
1378 if(!smb_io_pol_hnd("", &q_q
->pol
, ps
, depth
))
1381 if(!prs_uint32("val_index", ps
, depth
, &q_q
->val_index
))
1384 if(!smb_io_unihdr ("hdr_name", &q_q
->hdr_name
, ps
, depth
))
1386 if(!smb_io_unistr2("uni_name", &q_q
->uni_name
, q_q
->hdr_name
.buffer
, ps
, depth
))
1391 if(!prs_uint32("ptr_type", ps
, depth
, &q_q
->ptr_type
))
1394 if (q_q
->ptr_type
!= 0) {
1395 if(!prs_uint32("type", ps
, depth
, &q_q
->type
))
1399 if(!prs_uint32("ptr_value", ps
, depth
, &q_q
->ptr_value
))
1401 if(!smb_io_buffer2("buf_value", &q_q
->buf_value
, q_q
->ptr_value
, ps
, depth
))
1406 if(!prs_uint32("ptr1", ps
, depth
, &q_q
->ptr1
))
1408 if (q_q
->ptr1
!= 0) {
1409 if(!prs_uint32("len_value1", ps
, depth
, &q_q
->len_value1
))
1412 if(!prs_uint32("ptr2", ps
, depth
, &q_q
->ptr2
))
1414 if (q_q
->ptr2
!= 0) {
1415 if(!prs_uint32("len_value2", ps
, depth
, &q_q
->len_value2
))
1422 /*******************************************************************
1423 reads or writes a structure.
1424 ********************************************************************/
1426 BOOL
reg_io_r_enum_val(char *desc
, REG_R_ENUM_VALUE
*r_q
, prs_struct
*ps
, int depth
)
1431 prs_debug(ps
, depth
, desc
, "reg_io_r_enum_val");
1437 if(!smb_io_unihdr ("hdr_name", &r_q
->hdr_name
, ps
, depth
))
1439 if(!smb_io_unistr2("uni_name", &r_q
->uni_name
, r_q
->hdr_name
.buffer
, ps
, depth
))
1444 if(!prs_uint32("ptr_type", ps
, depth
, &r_q
->ptr_type
))
1447 if (r_q
->ptr_type
!= 0) {
1448 if(!prs_uint32("type", ps
, depth
, &r_q
->type
))
1452 if(!prs_uint32("ptr_value", ps
, depth
, &r_q
->ptr_value
))
1454 if(!smb_io_buffer2("buf_value", &r_q
->buf_value
, r_q
->ptr_value
, ps
, depth
))
1459 if(!prs_uint32("ptr1", ps
, depth
, &r_q
->ptr1
))
1461 if (r_q
->ptr1
!= 0) {
1462 if(!prs_uint32("len_value1", ps
, depth
, &r_q
->len_value1
))
1466 if(!prs_uint32("ptr2", ps
, depth
, &r_q
->ptr2
))
1468 if (r_q
->ptr2
!= 0) {
1469 if(!prs_uint32("len_value2", ps
, depth
, &r_q
->len_value2
))
1473 if(!prs_ntstatus("status", ps
, depth
, &r_q
->status
))
1479 /*******************************************************************
1481 ********************************************************************/
1483 void init_reg_q_create_val(REG_Q_CREATE_VALUE
*q_i
, POLICY_HND
*pol
,
1484 char *val_name
, uint32 type
,
1487 int val_len
= strlen(val_name
) + 1;
1491 memcpy(&q_i
->pol
, pol
, sizeof(q_i
->pol
));
1493 init_uni_hdr(&q_i
->hdr_name
, val_len
);
1494 init_unistr2(&q_i
->uni_name
, val_name
, val_len
);
1497 q_i
->buf_value
= val
;
1500 /*******************************************************************
1501 reads or writes a structure.
1502 ********************************************************************/
1504 BOOL
reg_io_q_create_val(char *desc
, REG_Q_CREATE_VALUE
*q_q
, prs_struct
*ps
, int depth
)
1509 prs_debug(ps
, depth
, desc
, "reg_io_q_create_val");
1515 if(!smb_io_pol_hnd("", &q_q
->pol
, ps
, depth
))
1518 if(!smb_io_unihdr ("hdr_name", &q_q
->hdr_name
, ps
, depth
))
1520 if(!smb_io_unistr2("uni_name", &q_q
->uni_name
, q_q
->hdr_name
.buffer
, ps
, depth
))
1525 if(!prs_uint32("type", ps
, depth
, &q_q
->type
))
1527 if(!smb_io_buffer3("buf_value", q_q
->buf_value
, ps
, depth
))
1535 /*******************************************************************
1536 reads or writes a structure.
1537 ********************************************************************/
1539 BOOL
reg_io_r_create_val(char *desc
, REG_R_CREATE_VALUE
*r_q
, prs_struct
*ps
, int depth
)
1544 prs_debug(ps
, depth
, desc
, "reg_io_r_create_val");
1550 if(!prs_ntstatus("status", ps
, depth
, &r_q
->status
))
1556 /*******************************************************************
1558 ********************************************************************/
1560 void init_reg_q_enum_key(REG_Q_ENUM_KEY
*q_i
, POLICY_HND
*pol
, uint32 key_idx
)
1562 memcpy(&q_i
->pol
, pol
, sizeof(q_i
->pol
));
1564 q_i
->key_index
= key_idx
;
1565 q_i
->key_name_len
= 0;
1566 q_i
->unknown_1
= 0x0414;
1569 q_i
->unknown_2
= 0x0000020A;
1570 memset(q_i
->pad1
, 0, sizeof(q_i
->pad1
));
1573 memset(q_i
->pad2
, 0, sizeof(q_i
->pad2
));
1576 unix_to_nt_time(&q_i
->time
, 0); /* current time? */
1579 /*******************************************************************
1580 makes a reply structure.
1581 ********************************************************************/
1583 void init_reg_r_enum_key(REG_R_ENUM_KEY
*r_u
, char *subkey
, uint32 unknown_1
,
1589 r_u
->unknown_1
= unknown_1
;
1590 r_u
->unknown_2
= unknown_2
;
1591 r_u
->unknown_3
= 0x0;
1593 r_u
->key_name_len
= (strlen(subkey
)+1) * 2;
1594 if (r_u
->key_name_len
)
1596 init_unistr3( &r_u
->key_name
, subkey
);
1602 /*******************************************************************
1603 reads or writes a structure.
1604 ********************************************************************/
1606 BOOL
reg_io_q_enum_key(char *desc
, REG_Q_ENUM_KEY
*q_q
, prs_struct
*ps
, int depth
)
1611 prs_debug(ps
, depth
, desc
, "reg_io_q_enum_key");
1617 if(!smb_io_pol_hnd("", &q_q
->pol
, ps
, depth
))
1620 if(!prs_uint32("key_index", ps
, depth
, &q_q
->key_index
))
1622 if(!prs_uint16("key_name_len", ps
, depth
, &q_q
->key_name_len
))
1624 if(!prs_uint16("unknown_1", ps
, depth
, &q_q
->unknown_1
))
1627 if(!prs_uint32("ptr1", ps
, depth
, &q_q
->ptr1
))
1630 if (q_q
->ptr1
!= 0) {
1631 if(!prs_uint32("unknown_2", ps
, depth
, &q_q
->unknown_2
))
1633 if(!prs_uint8s(False
, "pad1", ps
, depth
, q_q
->pad1
, sizeof(q_q
->pad1
)))
1637 if(!prs_uint32("ptr2", ps
, depth
, &q_q
->ptr2
))
1640 if (q_q
->ptr2
!= 0) {
1641 if(!prs_uint8s(False
, "pad2", ps
, depth
, q_q
->pad2
, sizeof(q_q
->pad2
)))
1645 if(!prs_uint32("ptr3", ps
, depth
, &q_q
->ptr3
))
1648 if (q_q
->ptr3
!= 0) {
1649 if(!smb_io_time("", &q_q
->time
, ps
, depth
))
1656 /*******************************************************************
1657 reads or writes a structure.
1658 ********************************************************************/
1660 BOOL
reg_io_r_enum_key(char *desc
, REG_R_ENUM_KEY
*r_q
, prs_struct
*ps
, int depth
)
1665 prs_debug(ps
, depth
, desc
, "reg_io_r_enum_key");
1671 if(!prs_uint16("key_name_len", ps
, depth
, &r_q
->key_name_len
))
1673 if(!prs_uint16("unknown_1", ps
, depth
, &r_q
->unknown_1
))
1676 if(!prs_uint32("ptr1", ps
, depth
, &r_q
->ptr1
))
1679 if (r_q
->ptr1
!= 0) {
1680 if(!prs_uint32("unknown_2", ps
, depth
, &r_q
->unknown_2
))
1682 if(!prs_uint32("unknown_3", ps
, depth
, &r_q
->unknown_3
))
1684 if(!smb_io_unistr3("key_name", &r_q
->key_name
, ps
, depth
))
1690 if(!prs_uint32("ptr2", ps
, depth
, &r_q
->ptr2
))
1693 if (r_q
->ptr2
!= 0) {
1694 if(!prs_uint8s(False
, "pad2", ps
, depth
, r_q
->pad2
, sizeof(r_q
->pad2
)))
1698 if(!prs_uint32("ptr3", ps
, depth
, &r_q
->ptr3
))
1701 if (r_q
->ptr3
!= 0) {
1702 if(!smb_io_time("", &r_q
->time
, ps
, depth
))
1706 if(!prs_ntstatus("status", ps
, depth
, &r_q
->status
))
1712 /*******************************************************************
1714 ********************************************************************/
1716 void init_reg_q_open_entry(REG_Q_OPEN_ENTRY
*r_q
, POLICY_HND
*pol
,
1717 char *key_name
, uint32 access_desired
)
1719 int len_name
= strlen(key_name
)+1;
1721 memcpy(&r_q
->pol
, pol
, sizeof(r_q
->pol
));
1723 init_uni_hdr(&r_q
->hdr_name
, len_name
);
1724 init_unistr2(&r_q
->uni_name
, key_name
, len_name
);
1726 r_q
->unknown_0
= 0x00000000;
1727 r_q
->access_desired
= access_desired
;
1730 /*******************************************************************
1731 reads or writes a structure.
1732 ********************************************************************/
1734 BOOL
reg_io_q_open_entry(char *desc
, REG_Q_OPEN_ENTRY
*r_q
, prs_struct
*ps
, int depth
)
1739 prs_debug(ps
, depth
, desc
, "reg_io_q_entry");
1745 if(!smb_io_pol_hnd("", &r_q
->pol
, ps
, depth
))
1747 if(!smb_io_unihdr ("", &r_q
->hdr_name
, ps
, depth
))
1749 if(!smb_io_unistr2("", &r_q
->uni_name
, r_q
->hdr_name
.buffer
, ps
, depth
))
1755 if(!prs_uint32("unknown_0 ", ps
, depth
, &r_q
->unknown_0
))
1757 if(!prs_uint32("access_desired ", ps
, depth
, &r_q
->access_desired
))
1763 /*******************************************************************
1765 ********************************************************************/
1767 void init_reg_r_open_entry(REG_R_OPEN_ENTRY
*r_r
,
1768 POLICY_HND
*pol
, NTSTATUS status
)
1770 memcpy(&r_r
->pol
, pol
, sizeof(r_r
->pol
));
1771 r_r
->status
= status
;
1774 /*******************************************************************
1775 reads or writes a structure.
1776 ********************************************************************/
1778 BOOL
reg_io_r_open_entry(char *desc
, REG_R_OPEN_ENTRY
*r_r
, prs_struct
*ps
, int depth
)
1783 prs_debug(ps
, depth
, desc
, "reg_io_r_open_entry");
1789 if(!smb_io_pol_hnd("", &r_r
->pol
, ps
, depth
))
1792 if(!prs_ntstatus("status", ps
, depth
, &r_r
->status
))
1798 /*******************************************************************
1800 ********************************************************************/
1801 void init_reg_q_shutdown(REG_Q_SHUTDOWN
* q_s
,
1802 const char *msg
, uint32 timeout
, uint16 flags
)
1805 msg_len
= strlen(msg
);
1811 init_uni_hdr(&(q_s
->hdr_msg
), msg_len
);
1812 init_unistr2(&(q_s
->uni_msg
), msg
, msg_len
);
1814 q_s
->timeout
= timeout
;
1819 /*******************************************************************
1820 reads or writes a structure.
1821 ********************************************************************/
1822 BOOL
reg_io_q_shutdown(char *desc
, REG_Q_SHUTDOWN
* q_s
, prs_struct
*ps
,
1828 prs_debug(ps
, depth
, desc
, "reg_io_q_shutdown");
1834 if (!prs_uint32("ptr_0", ps
, depth
, &(q_s
->ptr_0
)))
1836 if (!prs_uint32("ptr_1", ps
, depth
, &(q_s
->ptr_1
)))
1838 if (!prs_uint32("ptr_2", ps
, depth
, &(q_s
->ptr_2
)))
1841 if (!smb_io_unihdr("hdr_msg", &(q_s
->hdr_msg
), ps
, depth
))
1843 if (!smb_io_unistr2("uni_msg", &(q_s
->uni_msg
), q_s
->hdr_msg
.buffer
, ps
, depth
))
1848 if (!prs_uint32("timeout", ps
, depth
, &(q_s
->timeout
)))
1850 if (!prs_uint16("flags ", ps
, depth
, &(q_s
->flags
)))
1856 /*******************************************************************
1857 reads or writes a structure.
1858 ********************************************************************/
1859 BOOL
reg_io_r_shutdown(char *desc
, REG_R_SHUTDOWN
* r_s
, prs_struct
*ps
,
1865 prs_debug(ps
, depth
, desc
, "reg_io_r_shutdown");
1871 if(!prs_ntstatus("status", ps
, depth
, &r_s
->status
))
1877 /*******************************************************************
1879 ********************************************************************/
1880 void init_reg_q_abort_shutdown(REG_Q_ABORT_SHUTDOWN
* q_s
)
1883 q_s
->ptr_server
= 0;
1887 /*******************************************************************
1888 reads or writes a structure.
1889 ********************************************************************/
1890 BOOL
reg_io_q_abort_shutdown(char *desc
, REG_Q_ABORT_SHUTDOWN
* q_s
,
1891 prs_struct
*ps
, int depth
)
1896 prs_debug(ps
, depth
, desc
, "reg_io_q_abort_shutdown");
1902 if (!prs_uint32("ptr_server", ps
, depth
, &(q_s
->ptr_server
)))
1904 if (q_s
->ptr_server
!= 0)
1905 if (!prs_uint16("server", ps
, depth
, &(q_s
->server
)))
1911 /*******************************************************************
1912 reads or writes a structure.
1913 ********************************************************************/
1914 BOOL
reg_io_r_abort_shutdown(char *desc
, REG_R_ABORT_SHUTDOWN
* r_s
,
1915 prs_struct
*ps
, int depth
)
1920 prs_debug(ps
, depth
, desc
, "reg_io_r_abort_shutdown");
1926 if (!prs_ntstatus("status", ps
, depth
, &r_s
->status
))