GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
#include "includes.h"
#include "utils/net.h"
* it has modified, it can return 0 for no change.
*/
-static NTSTATUS rpc_sh_acct_do(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_do(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv,
- int (*fn)(TALLOC_CTX *mem_ctx,
+ int (*fn)(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
goto done;
}
- store = fn(mem_ctx, ctx, &info1->info1, &info3->info3,
+ store = fn(c, mem_ctx, ctx, &info1->info1, &info3->info3,
&info12->info12, argc, argv);
if (store <= 0) {
return result;
}
-static int account_show(TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx,
+static int account_show(struct net_context *c,
+ TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
struct samr_DomInfo12 *i12,
return 0; /* Don't save */
}
-static NTSTATUS rpc_sh_acct_pol_show(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_pol_show(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv) {
- return rpc_sh_acct_do(mem_ctx, ctx, pipe_hnd, argc, argv,
+ return rpc_sh_acct_do(c, mem_ctx, ctx, pipe_hnd, argc, argv,
account_show);
}
-static int account_set_badpw(TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx,
+static int account_set_badpw(struct net_context *c,
+ TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
struct samr_DomInfo12 *i12,
return 12;
}
-static NTSTATUS rpc_sh_acct_set_badpw(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_set_badpw(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv)
{
- return rpc_sh_acct_do(mem_ctx, ctx, pipe_hnd, argc, argv,
+ return rpc_sh_acct_do(c, mem_ctx, ctx, pipe_hnd, argc, argv,
account_set_badpw);
}
-static int account_set_lockduration(TALLOC_CTX *mem_ctx,
+static int account_set_lockduration(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
return 12;
}
-static NTSTATUS rpc_sh_acct_set_lockduration(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_set_lockduration(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv)
{
- return rpc_sh_acct_do(mem_ctx, ctx, pipe_hnd, argc, argv,
+ return rpc_sh_acct_do(c, mem_ctx, ctx, pipe_hnd, argc, argv,
account_set_lockduration);
}
-static int account_set_resetduration(TALLOC_CTX *mem_ctx,
+static int account_set_resetduration(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
return 12;
}
-static NTSTATUS rpc_sh_acct_set_resetduration(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_set_resetduration(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv)
{
- return rpc_sh_acct_do(mem_ctx, ctx, pipe_hnd, argc, argv,
+ return rpc_sh_acct_do(c, mem_ctx, ctx, pipe_hnd, argc, argv,
account_set_resetduration);
}
-static int account_set_minpwage(TALLOC_CTX *mem_ctx,
+static int account_set_minpwage(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
return 1;
}
-static NTSTATUS rpc_sh_acct_set_minpwage(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_set_minpwage(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv)
{
- return rpc_sh_acct_do(mem_ctx, ctx, pipe_hnd, argc, argv,
+ return rpc_sh_acct_do(c, mem_ctx, ctx, pipe_hnd, argc, argv,
account_set_minpwage);
}
-static int account_set_maxpwage(TALLOC_CTX *mem_ctx,
+static int account_set_maxpwage(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
return 1;
}
-static NTSTATUS rpc_sh_acct_set_maxpwage(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_set_maxpwage(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv)
{
- return rpc_sh_acct_do(mem_ctx, ctx, pipe_hnd, argc, argv,
+ return rpc_sh_acct_do(c, mem_ctx, ctx, pipe_hnd, argc, argv,
account_set_maxpwage);
}
-static int account_set_minpwlen(TALLOC_CTX *mem_ctx,
+static int account_set_minpwlen(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
return 1;
}
-static NTSTATUS rpc_sh_acct_set_minpwlen(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_set_minpwlen(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv)
{
- return rpc_sh_acct_do(mem_ctx, ctx, pipe_hnd, argc, argv,
+ return rpc_sh_acct_do(c, mem_ctx, ctx, pipe_hnd, argc, argv,
account_set_minpwlen);
}
-static int account_set_pwhistlen(TALLOC_CTX *mem_ctx,
+static int account_set_pwhistlen(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct samr_DomInfo1 *i1,
struct samr_DomInfo3 *i3,
return 1;
}
-static NTSTATUS rpc_sh_acct_set_pwhistlen(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpc_sh_acct_set_pwhistlen(struct net_context *c,
+ TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv)
{
- return rpc_sh_acct_do(mem_ctx, ctx, pipe_hnd, argc, argv,
+ return rpc_sh_acct_do(c, mem_ctx, ctx, pipe_hnd, argc, argv,
account_set_pwhistlen);
}
-struct rpc_sh_cmd *net_rpc_acct_cmds(TALLOC_CTX *mem_ctx,
+struct rpc_sh_cmd *net_rpc_acct_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx)
{
static struct rpc_sh_cmd cmds[9] = {