r5425: Convert function tables to new structure (with description)
[samba.git] / source / utils / net / net_password.c
index fdc1a2e9a093959423fd5bf3801142f24ac8724f..ee0376989d3ec065338081e9449f77eb180d02c8 100644 (file)
  * Code for Changing and setting a password
  */
 
  * Code for Changing and setting a password
  */
 
+static int net_password_change_usage(struct net_context *ctx, int argc, const char **argv)
+{
+       d_printf("net_password_change_usage: TODO\n");
+       return 0;       
+}
+
+
 static int net_password_change(struct net_context *ctx, int argc, const char **argv)
 {
        NTSTATUS status;
 static int net_password_change(struct net_context *ctx, int argc, const char **argv)
 {
        NTSTATUS status;
@@ -72,18 +79,14 @@ static int net_password_change(struct net_context *ctx, int argc, const char **a
        return 0;
 }
 
        return 0;
 }
 
-static int net_password_change_usage(struct net_context *ctx, int argc, const char **argv)
-{
-       d_printf("net_password_change_usage: TODO\n");
-       return 0;       
-}
 
 
-static int net_password_change_help(struct net_context *ctx, int argc, const char **argv)
+static int net_password_set_usage(struct net_context *ctx, int argc, const char **argv)
 {
 {
-       d_printf("net_password_change_help: TODO\n");
+       d_printf("net_password_set_usage: TODO\n");
        return 0;       
 }
 
        return 0;       
 }
 
+
 static int net_password_set(struct net_context *ctx, int argc, const char **argv)
 {
        NTSTATUS status;
 static int net_password_set(struct net_context *ctx, int argc, const char **argv)
 {
        NTSTATUS status;
@@ -98,7 +101,7 @@ static int net_password_set(struct net_context *ctx, int argc, const char **argv
 
        switch (argc) {
                case 0: /* no args -> fail */
 
        switch (argc) {
                case 0: /* no args -> fail */
-                       return net_password_usage(ctx, argc, argv);
+                       return net_password_set_usage(ctx, argc, argv);
                case 1: /* only DOM\\user; prompt for password */
                        tmp = talloc_strdup(ctx->mem_ctx, argv[0]);
                        break;
                case 1: /* only DOM\\user; prompt for password */
                        tmp = talloc_strdup(ctx->mem_ctx, argv[0]);
                        break;
@@ -152,22 +155,10 @@ static int net_password_set(struct net_context *ctx, int argc, const char **argv
        return 0;
 }
 
        return 0;
 }
 
-static int net_password_set_usage(struct net_context *ctx, int argc, const char **argv)
-{
-       d_printf("net_password_set_usage: TODO\n");
-       return 0;       
-}
-
-static int net_password_set_help(struct net_context *ctx, int argc, const char **argv)
-{
-       d_printf("net_password_set_help: TODO\n");
-       return 0;       
-}
 
 static const struct net_functable net_password_functable[] = {
 
 static const struct net_functable net_password_functable[] = {
-       {"change", net_password_change, net_password_change_usage,  net_password_change_help},
-       {"set", net_password_set, net_password_set_usage,  net_password_set_help},
-       {"help", net_password_help, net_password_help, net_password_help},
+       {"change", "change password (old password required)\n", net_password_change, net_password_change_usage },
+       {"set", "set password\n", net_password_set, net_password_set_usage },
        {NULL, NULL}
 };
 
        {NULL, NULL}
 };
 
@@ -181,11 +172,3 @@ int net_password_usage(struct net_context *ctx, int argc, const char **argv)
        d_printf("net password <command> [options]\n");
        return 0;       
 }
        d_printf("net password <command> [options]\n");
        return 0;       
 }
-
-int net_password_help(struct net_context *ctx, int argc, const char **argv)
-{
-       d_printf("Account password handling:\n");
-       d_printf("\tchange\t\tchanges password (old password required)\n");
-       d_printf("\tset\t\tsets password\n");
-       return 0;       
-}