summaryrefslogtreecommitdiff
path: root/source3/rpcclient/display.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-01-28 21:11:15 +0000
committerLuke Leighton <lkcl@samba.org>1999-01-28 21:11:15 +0000
commit6b7e1ead37b8655cf3cfb52a421461cedb3d0c90 (patch)
treed20d00e08c00b2d5e70b337c8add390c2749bed2 /source3/rpcclient/display.c
parent92aca8b1b7d292d7c558928217f1c8dbbb9dfa87 (diff)
downloadsamba-6b7e1ead37b8655cf3cfb52a421461cedb3d0c90.tar.gz
samba-6b7e1ead37b8655cf3cfb52a421461cedb3d0c90.tar.bz2
samba-6b7e1ead37b8655cf3cfb52a421461cedb3d0c90.zip
rpcclient "Service Control Manager" svcenum [-i] command.
(This used to be commit a022710f1e3996ecbe6bbe035e1df0bc4c050b34)
Diffstat (limited to 'source3/rpcclient/display.c')
-rw-r--r--source3/rpcclient/display.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/source3/rpcclient/display.c b/source3/rpcclient/display.c
index 800b89e563..d37b7283f8 100644
--- a/source3/rpcclient/display.c
+++ b/source3/rpcclient/display.c
@@ -1536,6 +1536,62 @@ void display_reg_key_info(FILE *out_hnd, enum action_type action,
}
/****************************************************************************
+convert a security permissions into a string
+****************************************************************************/
+char *get_svc_start_type_str(uint32 type)
+{
+ static fstring typestr;
+
+ switch (type)
+ {
+ case 0x00: fstrcpy(typestr, "Boot" ); return typestr;
+ case 0x01: fstrcpy(typestr, "System" ); return typestr;
+ case 0x02: fstrcpy(typestr, "Auto" ); return typestr;
+ case 0x03: fstrcpy(typestr, "Manual" ); return typestr;
+ case 0x04: fstrcpy(typestr, "Disabled"); return typestr;
+ default : break;
+ }
+ slprintf(typestr, sizeof(typestr)-1, "[%d]", type);
+ return typestr;
+}
+
+
+/****************************************************************************
+ display structure
+ ****************************************************************************/
+void display_query_svc_cfg(FILE *out_hnd, enum action_type action,
+ QUERY_SERVICE_CONFIG *cfg)
+{
+ switch (action)
+ {
+ case ACTION_HEADER:
+ {
+ fprintf(out_hnd, "\tService:\t%s\n", unistr2_to_str(&cfg->uni_display_name)); /* service name unicode string */
+ fprintf(out_hnd, "\t-------\n");
+ break;
+ }
+ case ACTION_ENUMERATE:
+ {
+ fprintf(out_hnd, "\tPath:\t%s\n" , unistr2_to_str(&cfg->uni_bin_path_name));
+ fprintf(out_hnd, "\tLoad Order:\t%s\n" , unistr2_to_str(&cfg->uni_load_order_grp));
+ fprintf(out_hnd, "\tDependencies:\t%s\n" , unistr2_to_str(&cfg->uni_dependencies));
+ fprintf(out_hnd, "\tService Start:\t%s\n", unistr2_to_str(&cfg->uni_service_start_name));
+ fprintf(out_hnd, "\tService Type:\t%d\n" , cfg->service_type);
+ fprintf(out_hnd, "\tStart Type:\t%s\n" , get_svc_start_type_str(cfg->start_type));
+ fprintf(out_hnd, "\tError Control:\t%d\n" , cfg->error_control);
+ fprintf(out_hnd, "\tTag Id:\t%d\n" , cfg->tag_id);
+ break;
+
+ }
+ case ACTION_FOOTER:
+ {
+ fprintf(out_hnd, "\n");
+ break;
+ }
+ }
+}
+
+/****************************************************************************
display structure
****************************************************************************/
void display_svc_info(FILE *out_hnd, enum action_type action, ENUM_SRVC_STATUS *svc)