[GLUE] Rsync SAMBA_3_0 SVN r25598 in order to create the v3-0-test branch.
[Samba.git] / source / rpc_client / cli_reg.c
blobe136df753ad5aaaf0e0b00398c586b078ed4a9ef
1 /*
2 Unix SMB/CIFS implementation.
3 RPC Pipe client
5 Copyright (C) Andrew Tridgell 1992-2000,
6 Copyright (C) Jeremy Allison 1999 - 2005
7 Copyright (C) Simo Sorce 2001
8 Copyright (C) Jeremy Cooper 2004
9 Copyright (C) Gerald (Jerry) Carter 2005
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.
26 #include "includes.h"
27 #include "rpc_client.h"
29 /* Shutdown a server */
31 /*******************************************************************
32 internal connect to a registry hive root (open a registry policy)
33 *******************************************************************/
35 static WERROR rpccli_reg_open_hive_int(struct rpc_pipe_client *cli,
36 TALLOC_CTX *mem_ctx, uint16 op_code,
37 const char *op_name,
38 uint32 access_mask, POLICY_HND *hnd)
40 REG_Q_OPEN_HIVE in;
41 REG_R_OPEN_HIVE out;
42 prs_struct qbuf, rbuf;
44 ZERO_STRUCT(in);
45 ZERO_STRUCT(out);
47 init_reg_q_open_hive(&in, access_mask);
49 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, op_code,
50 in, out,
51 qbuf, rbuf,
52 reg_io_q_open_hive,
53 reg_io_r_open_hive,
54 WERR_GENERAL_FAILURE );
56 if ( !W_ERROR_IS_OK( out.status ) )
57 return out.status;
59 memcpy( hnd, &out.pol, sizeof(POLICY_HND) );
61 return out.status;
64 /*******************************************************************
65 connect to a registry hive root (open a registry policy)
66 *******************************************************************/
68 WERROR rpccli_reg_connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
69 uint32 reg_type, uint32 access_mask,
70 POLICY_HND *reg_hnd)
71 { uint16 op_code;
72 const char *op_name;
74 ZERO_STRUCTP(reg_hnd);
76 switch (reg_type)
78 case HKEY_CLASSES_ROOT:
79 op_code = REG_OPEN_HKCR;
80 op_name = "REG_OPEN_HKCR";
81 break;
82 case HKEY_LOCAL_MACHINE:
83 op_code = REG_OPEN_HKLM;
84 op_name = "REG_OPEN_HKLM";
85 break;
86 case HKEY_USERS:
87 op_code = REG_OPEN_HKU;
88 op_name = "REG_OPEN_HKU";
89 break;
90 case HKEY_PERFORMANCE_DATA:
91 op_code = REG_OPEN_HKPD;
92 op_name = "REG_OPEN_HKPD";
93 break;
94 default:
95 return WERR_INVALID_PARAM;
98 return rpccli_reg_open_hive_int(cli, mem_ctx, op_code, op_name,
99 access_mask, reg_hnd);
103 /*******************************************************************
104 *******************************************************************/
106 WERROR rpccli_reg_shutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
107 const char *msg, uint32 timeout, BOOL do_reboot,
108 BOOL force)
110 REG_Q_SHUTDOWN in;
111 REG_R_SHUTDOWN out;
112 prs_struct qbuf, rbuf;
114 if (msg == NULL)
115 return WERR_INVALID_PARAM;
117 ZERO_STRUCT (in);
118 ZERO_STRUCT (out);
120 /* Marshall data and send request */
122 init_reg_q_shutdown(&in, msg, timeout, do_reboot, force);
124 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_SHUTDOWN,
125 in, out,
126 qbuf, rbuf,
127 reg_io_q_shutdown,
128 reg_io_r_shutdown,
129 WERR_GENERAL_FAILURE );
131 return out.status;
134 /*******************************************************************
135 *******************************************************************/
137 WERROR rpccli_reg_abort_shutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
139 REG_Q_ABORT_SHUTDOWN in;
140 REG_R_ABORT_SHUTDOWN out;
141 prs_struct qbuf, rbuf;
143 ZERO_STRUCT (in);
144 ZERO_STRUCT (out);
146 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_ABORT_SHUTDOWN,
147 in, out,
148 qbuf, rbuf,
149 reg_io_q_abort_shutdown,
150 reg_io_r_abort_shutdown,
151 WERR_GENERAL_FAILURE );
153 return out.status;
157 /****************************************************************************
158 do a REG Unknown 0xB command. sent after a create key or create value.
159 this might be some sort of "sync" or "refresh" command, sent after
160 modification of the registry...
161 ****************************************************************************/
163 WERROR rpccli_reg_flush_key(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
164 POLICY_HND *hnd)
166 REG_Q_FLUSH_KEY in;
167 REG_R_FLUSH_KEY out;
168 prs_struct qbuf, rbuf;
170 ZERO_STRUCT (in);
171 ZERO_STRUCT (out);
173 init_reg_q_flush_key(&in, hnd);
175 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_FLUSH_KEY,
176 in, out,
177 qbuf, rbuf,
178 reg_io_q_flush_key,
179 reg_io_r_flush_key,
180 WERR_GENERAL_FAILURE );
182 return out.status;
185 /****************************************************************************
186 do a REG Query Key
187 ****************************************************************************/
189 WERROR rpccli_reg_query_key(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
190 POLICY_HND *hnd,
191 char *key_class, uint32 *class_len,
192 uint32 *num_subkeys, uint32 *max_subkeylen,
193 uint32 *max_classlen, uint32 *num_values,
194 uint32 *max_valnamelen, uint32 *max_valbufsize,
195 uint32 *sec_desc, NTTIME *mod_time)
197 REG_Q_QUERY_KEY in;
198 REG_R_QUERY_KEY out;
199 prs_struct qbuf, rbuf;
200 uint32 saved_class_len = *class_len;
202 ZERO_STRUCT (in);
203 ZERO_STRUCT (out);
205 init_reg_q_query_key( &in, hnd, key_class );
207 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_QUERY_KEY,
208 in, out,
209 qbuf, rbuf,
210 reg_io_q_query_key,
211 reg_io_r_query_key,
212 WERR_GENERAL_FAILURE );
214 if ( W_ERROR_EQUAL( out.status, WERR_MORE_DATA ) ) {
215 ZERO_STRUCT (in);
217 *class_len = out.key_class.string->uni_max_len;
218 if ( *class_len > saved_class_len )
219 return out.status;
221 /* set a string of spaces and NULL terminate */
223 memset( key_class, (int)' ', *class_len );
224 key_class[*class_len] = '\0';
226 init_reg_q_query_key( &in, hnd, key_class );
228 ZERO_STRUCT (out);
230 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_QUERY_KEY,
231 in, out,
232 qbuf, rbuf,
233 reg_io_q_query_key,
234 reg_io_r_query_key,
235 WERR_GENERAL_FAILURE );
238 if ( !W_ERROR_IS_OK( out.status ) )
239 return out.status;
241 *class_len = out.key_class.string->uni_max_len;
242 unistr2_to_ascii(key_class, out.key_class.string, saved_class_len-1);
243 *num_subkeys = out.num_subkeys ;
244 *max_subkeylen = out.max_subkeylen ;
245 *num_values = out.num_values ;
246 *max_valnamelen = out.max_valnamelen;
247 *max_valbufsize = out.max_valbufsize;
248 *sec_desc = out.sec_desc ;
249 *mod_time = out.mod_time ;
250 /* Maybe: *max_classlen = out.reserved; */
252 return out.status;
255 /****************************************************************************
256 ****************************************************************************/
258 WERROR rpccli_reg_getversion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
259 POLICY_HND *hnd, uint32 *version)
261 REG_Q_GETVERSION in;
262 REG_R_GETVERSION out;
263 prs_struct qbuf, rbuf;
265 ZERO_STRUCT (in);
266 ZERO_STRUCT (out);
268 init_reg_q_getversion(&in, hnd);
270 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_GETVERSION,
271 in, out,
272 qbuf, rbuf,
273 reg_io_q_getversion,
274 reg_io_r_getversion,
275 WERR_GENERAL_FAILURE );
278 if ( !W_ERROR_IS_OK( out.status ) )
279 return out.status;
281 *version = out.win_version;
283 return out.status;
286 /****************************************************************************
287 do a REG Query Info
288 ****************************************************************************/
290 WERROR rpccli_reg_query_value(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
291 POLICY_HND *hnd, const char *val_name,
292 uint32 *type, REGVAL_BUFFER *buffer)
294 REG_Q_QUERY_VALUE in;
295 REG_R_QUERY_VALUE out;
296 prs_struct qbuf, rbuf;
298 ZERO_STRUCT (in);
299 ZERO_STRUCT (out);
301 init_reg_q_query_value(&in, hnd, val_name, buffer);
303 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_QUERY_VALUE,
304 in, out,
305 qbuf, rbuf,
306 reg_io_q_query_value,
307 reg_io_r_query_value,
308 WERR_GENERAL_FAILURE );
311 if ( !W_ERROR_IS_OK( out.status ) )
312 return out.status;
314 *type = *out.type;
315 *buffer = *out.value;
317 return out.status;
320 /****************************************************************************
321 do a REG Set Key Security
322 ****************************************************************************/
324 WERROR rpccli_reg_set_key_sec(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
325 POLICY_HND *hnd, uint32 sec_info,
326 size_t secdesc_size, SEC_DESC *sec_desc)
328 REG_Q_SET_KEY_SEC in;
329 REG_R_SET_KEY_SEC out;
330 prs_struct qbuf, rbuf;
331 SEC_DESC_BUF *sec_desc_buf;
333 ZERO_STRUCT (in);
334 ZERO_STRUCT (out);
336 /* Flatten the security descriptor */
338 if ( !(sec_desc_buf = make_sec_desc_buf(mem_ctx, secdesc_size, sec_desc)) )
339 return WERR_GENERAL_FAILURE;
341 init_reg_q_set_key_sec(&in, hnd, sec_info, sec_desc_buf);
343 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_SET_KEY_SEC,
344 in, out,
345 qbuf, rbuf,
346 reg_io_q_set_key_sec,
347 reg_io_r_set_key_sec,
348 WERR_GENERAL_FAILURE );
351 return out.status;
355 /****************************************************************************
356 do a REG Query Key Security
357 ****************************************************************************/
359 WERROR rpccli_reg_get_key_sec(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
360 POLICY_HND *hnd, uint32 sec_info,
361 uint32 *sec_buf_size, SEC_DESC_BUF *sec_buf)
363 REG_Q_GET_KEY_SEC in;
364 REG_R_GET_KEY_SEC out;
365 prs_struct qbuf, rbuf;
367 ZERO_STRUCT (in);
368 ZERO_STRUCT (out);
370 init_reg_q_get_key_sec(&in, hnd, sec_info, *sec_buf_size, sec_buf);
372 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_GET_KEY_SEC,
373 in, out,
374 qbuf, rbuf,
375 reg_io_q_get_key_sec,
376 reg_io_r_get_key_sec,
377 WERR_GENERAL_FAILURE );
380 /* this might be able to return WERR_MORE_DATA, I'm not sure */
382 if ( !W_ERROR_IS_OK( out.status ) )
383 return out.status;
385 sec_buf = out.data;
386 *sec_buf_size = out.data->len;
388 return out.status;
391 /****************************************************************************
392 do a REG Delete Value
393 ****************************************************************************/
395 WERROR rpccli_reg_delete_val(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
396 POLICY_HND *hnd, char *val_name)
398 REG_Q_DELETE_VALUE in;
399 REG_R_DELETE_VALUE out;
400 prs_struct qbuf, rbuf;
402 ZERO_STRUCT (in);
403 ZERO_STRUCT (out);
405 init_reg_q_delete_val(&in, hnd, val_name);
407 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_DELETE_VALUE,
408 in, out,
409 qbuf, rbuf,
410 reg_io_q_delete_value,
411 reg_io_r_delete_value,
412 WERR_GENERAL_FAILURE );
414 return out.status;
417 /****************************************************************************
418 do a REG Delete Key
419 ****************************************************************************/
421 WERROR rpccli_reg_delete_key(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
422 POLICY_HND *hnd, char *key_name)
424 REG_Q_DELETE_KEY in;
425 REG_R_DELETE_KEY out;
426 prs_struct qbuf, rbuf;
428 ZERO_STRUCT (in);
429 ZERO_STRUCT (out);
431 init_reg_q_delete_key(&in, hnd, key_name);
433 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_DELETE_KEY,
434 in, out,
435 qbuf, rbuf,
436 reg_io_q_delete_key,
437 reg_io_r_delete_key,
438 WERR_GENERAL_FAILURE );
440 return out.status;
443 /****************************************************************************
444 do a REG Create Key
445 ****************************************************************************/
447 WERROR rpccli_reg_create_key_ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
448 POLICY_HND *hnd, char *key_name, char *key_class,
449 uint32 access_desired, POLICY_HND *key)
451 REG_Q_CREATE_KEY_EX in;
452 REG_R_CREATE_KEY_EX out;
453 prs_struct qbuf, rbuf;
454 SEC_DESC *sec;
455 SEC_DESC_BUF *sec_buf;
456 size_t sec_len;
458 ZERO_STRUCT (in);
459 ZERO_STRUCT (out);
461 if ( !(sec = make_sec_desc(mem_ctx, 1, SEC_DESC_SELF_RELATIVE,
462 NULL, NULL, NULL, NULL, &sec_len)) ) {
463 return WERR_GENERAL_FAILURE;
466 if ( !(sec_buf = make_sec_desc_buf(mem_ctx, sec_len, sec)) )
467 return WERR_GENERAL_FAILURE;
469 init_reg_q_create_key_ex(&in, hnd, key_name, key_class, access_desired, sec_buf);
471 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_CREATE_KEY_EX,
472 in, out,
473 qbuf, rbuf,
474 reg_io_q_create_key_ex,
475 reg_io_r_create_key_ex,
476 WERR_GENERAL_FAILURE );
479 if ( !W_ERROR_IS_OK( out.status ) )
480 return out.status;
482 memcpy( key, &out.handle, sizeof(POLICY_HND) );
484 return out.status;
487 /****************************************************************************
488 do a REG Enum Key
489 ****************************************************************************/
491 WERROR rpccli_reg_enum_key(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
492 POLICY_HND *hnd, int key_index, fstring key_name,
493 fstring class_name, time_t *mod_time)
495 REG_Q_ENUM_KEY in;
496 REG_R_ENUM_KEY out;
497 prs_struct qbuf, rbuf;
499 ZERO_STRUCT (in);
500 ZERO_STRUCT (out);
502 init_reg_q_enum_key(&in, hnd, key_index);
504 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_ENUM_KEY,
505 in, out,
506 qbuf, rbuf,
507 reg_io_q_enum_key,
508 reg_io_r_enum_key,
509 WERR_GENERAL_FAILURE );
511 if ( !W_ERROR_IS_OK(out.status) )
512 return out.status;
514 if ( out.keyname.string )
515 rpcstr_pull( key_name, out.keyname.string->buffer, sizeof(fstring), -1, STR_TERMINATE );
516 else
517 fstrcpy( key_name, "(Default)" );
519 if ( out.classname && out.classname->string )
520 rpcstr_pull( class_name, out.classname->string->buffer, sizeof(fstring), -1, STR_TERMINATE );
521 else
522 fstrcpy( class_name, "" );
524 *mod_time = nt_time_to_unix(*out.time);
526 return out.status;
529 /****************************************************************************
530 do a REG Create Value
531 ****************************************************************************/
533 WERROR rpccli_reg_set_val(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
534 POLICY_HND *hnd, char *val_name, uint32 type,
535 RPC_DATA_BLOB *data)
537 REG_Q_SET_VALUE in;
538 REG_R_SET_VALUE out;
539 prs_struct qbuf, rbuf;
541 ZERO_STRUCT (in);
542 ZERO_STRUCT (out);
544 init_reg_q_set_val(&in, hnd, val_name, type, data);
546 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_SET_VALUE,
547 in, out,
548 qbuf, rbuf,
549 reg_io_q_set_value,
550 reg_io_r_set_value,
551 WERR_GENERAL_FAILURE );
553 return out.status;
556 /****************************************************************************
557 do a REG Enum Value
558 ****************************************************************************/
560 WERROR rpccli_reg_enum_val(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
561 POLICY_HND *hnd, int idx,
562 fstring val_name, uint32 *type, REGVAL_BUFFER *value)
564 REG_Q_ENUM_VALUE in;
565 REG_R_ENUM_VALUE out;
566 prs_struct qbuf, rbuf;
568 ZERO_STRUCT (in);
569 ZERO_STRUCT (out);
571 init_reg_q_enum_val(&in, hnd, idx, 0x0100, 0x1000);
573 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_ENUM_VALUE,
574 in, out,
575 qbuf, rbuf,
576 reg_io_q_enum_val,
577 reg_io_r_enum_val,
578 WERR_GENERAL_FAILURE );
580 if ( W_ERROR_EQUAL(out.status, WERR_MORE_DATA) ) {
582 ZERO_STRUCT (in);
584 init_reg_q_enum_val(&in, hnd, idx, 0x0100, *out.buffer_len1);
586 ZERO_STRUCT (out);
588 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_ENUM_VALUE,
589 in, out,
590 qbuf, rbuf,
591 reg_io_q_enum_val,
592 reg_io_r_enum_val,
593 WERR_GENERAL_FAILURE );
596 if ( !W_ERROR_IS_OK(out.status) )
597 return out.status;
599 unistr2_to_ascii(val_name, out.name.string, sizeof(fstring)-1);
600 *type = *out.type;
601 *value = *out.value;
603 return out.status;
606 /****************************************************************************
607 ****************************************************************************/
609 WERROR rpccli_reg_open_entry(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
610 POLICY_HND *hnd, char *key_name,
611 uint32 access_desired, POLICY_HND *key_hnd)
613 REG_Q_OPEN_ENTRY in;
614 REG_R_OPEN_ENTRY out;
615 prs_struct qbuf, rbuf;
617 ZERO_STRUCT (in);
618 ZERO_STRUCT (out);
620 init_reg_q_open_entry(&in, hnd, key_name, access_desired);
622 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_OPEN_ENTRY,
623 in, out,
624 qbuf, rbuf,
625 reg_io_q_open_entry,
626 reg_io_r_open_entry,
627 WERR_GENERAL_FAILURE );
629 if ( !W_ERROR_IS_OK( out.status ) )
630 return out.status;
632 memcpy( key_hnd, &out.handle, sizeof(POLICY_HND) );
634 return out.status;
637 /****************************************************************************
638 ****************************************************************************/
640 WERROR rpccli_reg_close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
641 POLICY_HND *hnd)
643 REG_Q_CLOSE in;
644 REG_R_CLOSE out;
645 prs_struct qbuf, rbuf;
647 ZERO_STRUCT (in);
648 ZERO_STRUCT (out);
650 init_reg_q_close(&in, hnd);
652 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_CLOSE,
653 in, out,
654 qbuf, rbuf,
655 reg_io_q_close,
656 reg_io_r_close,
657 WERR_GENERAL_FAILURE );
659 return out.status;
662 /****************************************************************************
663 do a REG Query Info
664 ****************************************************************************/
666 WERROR rpccli_reg_save_key(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
667 POLICY_HND *hnd, const char *filename )
669 REG_Q_SAVE_KEY in;
670 REG_R_SAVE_KEY out;
671 prs_struct qbuf, rbuf;
673 ZERO_STRUCT (in);
674 ZERO_STRUCT (out);
676 init_q_reg_save_key( &in, hnd, filename );
678 CLI_DO_RPC_WERR( cli, mem_ctx, PI_WINREG, REG_SAVE_KEY,
679 in, out,
680 qbuf, rbuf,
681 reg_io_q_save_key,
682 reg_io_r_save_key,
683 WERR_GENERAL_FAILURE );
685 return out.status;
690 #################################################################
691 Utility functions
692 #################################################################
695 /*****************************************************************
696 Splits out the start of the key (HKLM or HKU) and the rest of the key.
697 *****************************************************************/
699 BOOL reg_split_hive(const char *full_keyname, uint32 *reg_type, pstring key_name)
701 pstring tmp;
703 if (!next_token(&full_keyname, tmp, "\\", sizeof(tmp)))
704 return False;
706 (*reg_type) = 0;
708 DEBUG(10, ("reg_split_key: hive %s\n", tmp));
710 if (strequal(tmp, "HKLM") || strequal(tmp, "HKEY_LOCAL_MACHINE"))
711 (*reg_type) = HKEY_LOCAL_MACHINE;
712 else if (strequal(tmp, "HKCR") || strequal(tmp, "HKEY_CLASSES_ROOT"))
713 (*reg_type) = HKEY_CLASSES_ROOT;
714 else if (strequal(tmp, "HKU") || strequal(tmp, "HKEY_USERS"))
715 (*reg_type) = HKEY_USERS;
716 else if (strequal(tmp, "HKPD")||strequal(tmp, "HKEY_PERFORMANCE_DATA"))
717 (*reg_type) = HKEY_PERFORMANCE_DATA;
718 else {
719 DEBUG(10,("reg_split_key: unrecognised hive key %s\n", tmp));
720 return False;
723 if (next_token(&full_keyname, tmp, "\n\r", sizeof(tmp)))
724 pstrcpy(key_name, tmp);
725 else
726 key_name[0] = 0;
728 DEBUG(10, ("reg_split_key: name %s\n", key_name));
730 return True;