From 9b586b5a645c27d48d3cf8eb788e297ba83114d6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 8 Feb 2004 11:59:55 +0000 Subject: (merge from 3.0) Make more functions static, and remove duplication in the use of functions in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c (These should perhaps be pulled back out to smbpasswd.c, but that can occour later). This also includes some >14 character password changes, and the start of a move away from using 'admin user' to determine if the user is root (as root can login without setting 'admin user'). Andrew Bartlett (This used to be commit be0704abb919152c359a735023283acbf9be3076) --- source3/smbd/nttrans.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/smbd/nttrans.c') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 25721d99a8..0a2843629e 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -56,7 +56,7 @@ struct generic_mapping file_generic_mapping = { FILE_GENERIC_ALL }; -char *nttrans_realloc(char **ptr, size_t size) +static char *nttrans_realloc(char **ptr, size_t size) { char *tptr = NULL; if (ptr==NULL) @@ -2022,11 +2022,12 @@ static int call_nt_transact_get_user_quota(connection_struct *conn, char *inbuf, SMB_NTQUOTA_STRUCT qt; SMB_NTQUOTA_LIST *tmp_list; SMB_NTQUOTA_HANDLE *qt_handle = NULL; + extern struct current_user current_user; ZERO_STRUCT(qt); /* access check */ - if (conn->admin_user != True) { + if (current_user.uid != 0) { DEBUG(1,("set_user_quota: access_denied service [%s] user [%s]\n", lp_servicename(SNUM(conn)),conn->user)); return ERROR_DOS(ERRDOS,ERRnoaccess); -- cgit