Implementation of API "LSA_ENUMACCTRIGHTS" on 3.0.1

Jianliang Lu j.lu at tiesse.com
Mon Dec 22 09:52:10 GMT 2003


This patch will return a "NT_STATUS_OK" when the API is called, we will
complete the function "_lsa_enum_acct_rights" when the user rights will be
implemented.

-->Patch:

--- source/rpc_server/srv_lsa.c.orig	Tue Dec 16 15:08:45 2003
+++ source/rpc_server/srv_lsa.c	Fri Dec 19 11:49:48 2003
@@ -454,6 +454,36 @@
 	return True;
 }

+static BOOL api_lsa_enum_acct_rights(pipes_struct *p)
+{
+	LSA_Q_ENUM_ACCT_RIGHTS q_u;
+	LSA_R_ENUM_ACCT_RIGHTS r_u;
+
+	prs_struct *data = &p->in_data.data;
+	prs_struct *rdata = &p->out_data.rdata;
+
+	ZERO_STRUCT(q_u);
+	ZERO_STRUCT(r_u);
+
+	if(!lsa_io_q_enum_acct_rights("", &q_u, data, 0)) {
+		DEBUG(0,("api_lsa_enum_acct_rights: failed to unmarshall
LSA_Q_ENUM_ACCT_RIGHTS .\n"));
+		return False;
+	}
+
+	/* 	TODO
+	r_u.status = _lsa_enum_acct_rights(p, rdata, &q_u, &r_u);
+	*/
+	r_u.status = NT_STATUS_OK;
+
+	/* store the response in the SMB stream */
+	if(!lsa_io_r_enum_acct_rights("", &r_u, rdata, 0)) {
+		DEBUG(0,("api_lsa_enum_acct_rights: Failed to marshall
LSA_R_ENUM_ACCT_RIGHTS .\n"));
+		return False;
+	}
+
+	return True;
+}
+

/***************************************************************************
  api_lsa_getsystemaccount

***************************************************************************/
@@ -661,6 +691,7 @@
 	{ "LSA_UNK_GET_CONNUSER", LSA_UNK_GET_CONNUSER,
api_lsa_unk_get_connuser },
 	{ "LSA_OPENACCOUNT"     , LSA_OPENACCOUNT     ,
lsa_open_account     },
 	{ "LSA_ENUMPRIVSACCOUNT", LSA_ENUMPRIVSACCOUNT,
api_lsa_enum_privsaccount},
+	{ "LSA_ENUMACCTRIGHTS"	, LSA_ENUMACCTRIGHTS  , api_lsa_enum_acct_rights },
 	{ "LSA_GETSYSTEMACCOUNT", LSA_GETSYSTEMACCOUNT,
api_lsa_getsystemaccount },
 	{ "LSA_SETSYSTEMACCOUNT", LSA_SETSYSTEMACCOUNT,
api_lsa_setsystemaccount },
 	{ "LSA_ADDPRIVS"        , LSA_ADDPRIVS        ,
addprivs         },


Cheers,
Jianliang Lu

TieSse s.p.a
Via Jervis, 60 - 10015 Ivrea (To) - Italy
j.lu at tiesse.com
luj at libero.it
http://www.tiesse.com



More information about the samba-technical mailing list