summaryrefslogtreecommitdiff
path: root/source3/passdb/smbpass.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-09-17 19:16:12 +0000
committerJeremy Allison <jra@samba.org>1998-09-17 19:16:12 +0000
commitac9b687cc2496409e1c8d86393812faf94ec7550 (patch)
tree6aba6987dae6cec43881ec186be8975bc21194a2 /source3/passdb/smbpass.c
parent25ebd393bf117477125db42a9b4bdc7f09ce0b08 (diff)
downloadsamba-ac9b687cc2496409e1c8d86393812faf94ec7550.tar.gz
samba-ac9b687cc2496409e1c8d86393812faf94ec7550.tar.bz2
samba-ac9b687cc2496409e1c8d86393812faf94ec7550.zip
configure configure.in: Added tests for fseek64 and ftell64.
config.h.in: Added fseek64 and ftell64. includes.h: Added definition of SMB_BIG_INTEGER. smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. access.c: Tidyup of dbug statement. system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t. asyncdns.c: Tidyup of comment. loadparm.c: Tidyup of set_default_server_announce_type() function definition. ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpassfile.c: Use sys_fseek(). chgpasswd.c: Tidyup of debug statement. dosmode.c: Changed mode calls to use mode_t. ipc.c: Removal of dead code. nttrans.c: Changed mode calls to use mode_t. open.c: Changed mode calls to use mode_t. pipes.c: Removal of dead code. reply.c: Removal of dead code. trans2.c: Removal of dead code. Changed mode calls to use mode_t. Jeremy. (This used to be commit c381d32e3dc23fe887408016cae821aceb30da2c)
Diffstat (limited to 'source3/passdb/smbpass.c')
-rw-r--r--source3/passdb/smbpass.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index f758b7bbc4..34de513476 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -399,23 +399,23 @@ static struct sam_passwd *getsmbfile21pwent(void *vp)
}
/*************************************************************************
- Return the current position in the smbpasswd list as an unsigned long.
+ Return the current position in the smbpasswd list as an SMB_BIG_INTEGER
This must be treated as an opaque token.
*************************************************************************/
-static unsigned long getsmbfilepwpos(void *vp)
+static SMB_BIG_INTEGER getsmbfilepwpos(void *vp)
{
- return (unsigned long)ftell((FILE *)vp);
+ return (SMB_BIG_INTEGER)sys_ftell((FILE *)vp);
}
/*************************************************************************
- Set the current position in the smbpasswd list from unsigned long.
+ Set the current position in the smbpasswd list from an SMB_BIG_INTEGER.
This must be treated as an opaque token.
*************************************************************************/
-static BOOL setsmbfilepwpos(void *vp, unsigned long tok)
+static BOOL setsmbfilepwpos(void *vp, SMB_BIG_INTEGER tok)
{
- return !fseek((FILE *)vp, tok, SEEK_SET);
+ return !sys_fseek((FILE *)vp, (SMB_OFF_T)tok, SEEK_SET);
}
/************************************************************************
@@ -609,7 +609,7 @@ static BOOL mod_smbfilepwd_entry(struct smb_passwd* pwd, BOOL override)
* Scan the file, a line at a time and check if the name matches.
*/
while (!feof(fp)) {
- pwd_seekpos = (SMB_OFF_T)ftell(fp);
+ pwd_seekpos = sys_ftell(fp);
linebuf[0] = '\0';