From ffab54750f0eec202895670dd9293ee4aa3eb475 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 18 May 1998 21:30:57 +0000 Subject: chgpasswd.c: Changed back to getsmb... from getsam... ldap.c: Stoped dummy_function being prototyped. loadparm.c: Fixed slprintf sizes. nisppass.c: Fixed safe_strcpy sizes. nmbd_processlogon.c: Changed back to getsmb... from getsam... nttrans.c: Just a dump of new code. passdb.c: Moved stuff around a lot - stopped any lookups by rid. This needs to be indirected through a function table (soon). password.c: Changed back to getsmb... from getsam... reply.c: Changed back to getsmb... from getsam... slprintf.c: Fixed prototype problems. smb.h: Fixed prototype problems. smbpass.c: Changed to getsmbfile.... smbpasswd.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup. lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam... Jeremy. (This used to be commit 7d332b2493d2089d09521250fc9b72d8953307c0) --- source3/passdb/nispass.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source3/passdb/nispass.c') diff --git a/source3/passdb/nispass.c b/source3/passdb/nispass.c index 22206789fc..9ae6ba3c52 100644 --- a/source3/passdb/nispass.c +++ b/source3/passdb/nispass.c @@ -98,8 +98,8 @@ static char *make_nisname_from_user_rid(uint32 rid) { static pstring nisname; - safe_strcpy(nisname, "[user_rid=", sizeof(nisname)); - slprintf(nisname, sizeof(nisname), "%s%d", nisname, rid); + safe_strcpy(nisname, "[user_rid=", sizeof(nisname)-1); + slprintf(nisname, sizeof(nisname)-1, "%s%d", nisname, rid); safe_strcat(nisname, "], passwd.org_dir", sizeof(nisname)-strlen(nisname)-1); return nisname; @@ -112,8 +112,8 @@ static char *make_nisname_from_uid(int uid) { static pstring nisname; - safe_strcpy(nisname, "[uid=", sizeof(nisname)); - slprintf(nisname, sizeof(nisname), "%s%d", nisname, uid); + safe_strcpy(nisname, "[uid=", sizeof(nisname)-1); + slprintf(nisname, sizeof(nisname)-1, "%s%d", nisname, uid); safe_strcat(nisname, "], passwd.org_dir", sizeof(nisname)-strlen(nisname)-1); return nisname; @@ -126,7 +126,7 @@ static char *make_nisname_from_name(char *user_name) { static pstring nisname; - safe_strcpy(nisname, "[name=", sizeof(nisname)); + safe_strcpy(nisname, "[name=", sizeof(nisname)-1); safe_strcat(nisname, user_name, sizeof(nisname) - strlen(nisname) - 1); safe_strcat(nisname, "], passwd.org_dir", sizeof(nisname) - strlen(nisname) - 1); @@ -214,7 +214,7 @@ BOOL add_nisp21pwd_entry(struct sam_passwd *newpwd) pfile = lp_smb_passwd_file(); - safe_strcpy(user_name, newpwd->smb_name, sizeof(user_name)); + safe_strcpy(user_name, newpwd->smb_name, sizeof(user_name)-1); nisname = make_nisname_from_name(user_name); @@ -229,7 +229,7 @@ BOOL add_nisp21pwd_entry(struct sam_passwd *newpwd) user_obj = NIS_RES_OBJECT(nis_user); - safe_strcpy(nisname, "[name=", sizeof(nisname)); + safe_strcpy(nisname, "[name=", sizeof(nisname)-1); safe_strcat(nisname, ENTRY_VAL(user_obj,0),sizeof(nisname)-strlen(nisname)-1); safe_strcat(nisname, "],", sizeof(nisname)-strlen(nisname)-1); safe_strcat(nisname, pfile, sizeof(nisname)-strlen(nisname)-1); @@ -437,7 +437,7 @@ struct sam_passwd *getnisp21pwnam(char *name) DEBUG(10, ("getnisppwnam: search by name: %s\n", name)); DEBUG(10, ("getnisppwnam: using NIS+ table %s\n", lp_smb_passwd_file())); - slprintf(nisname, sizeof(nisname), "[name=%s],%s", name, lp_smb_passwd_file()); + slprintf(nisname, sizeof(nisname)-1, "[name=%s],%s", name, lp_smb_passwd_file()); /* Search the table. */ gotalarm = 0; @@ -482,7 +482,7 @@ struct sam_passwd *getnisp21pwuid(int smb_userid) DEBUG(10, ("getnisppwuid: search by uid: %d\n", smb_userid)); DEBUG(10, ("getnisppwuid: using NIS+ table %s\n", lp_smb_passwd_file())); - slprintf(nisname, sizeof(nisname), "[uid=%d],%s", smb_userid, lp_smb_passwd_file()); + slprintf(nisname, sizeof(nisname)-1, "[uid=%d],%s", smb_userid, lp_smb_passwd_file()); /* Search the table. */ gotalarm = 0; @@ -508,5 +508,5 @@ struct sam_passwd *getnisp21pwuid(int smb_userid) } #else -static void dummy_function(void) { } /* stop some compilers complaining */ + void nisplus_dummy_function(void) { } /* stop some compilers complaining */ #endif /* USE_NISPLUS_DB */ -- cgit