Remove the final incorrect uses of conn->session_info->utok.uid.
When we're in the "admin users" list, then this value is not set
to zero.
Inspired by the comment on this bug by Dmitry Butskoy <dmitry@butskoy.name>.
I'll create a different fix for 3.5.x.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Apr 5 21:53:59 CEST 2011 on sn-devel-104
new_file_created = True;
}
- set_share_mode(lck, fsp, conn->session_info->utok.uid, 0,
+ set_share_mode(lck, fsp, get_current_uid(conn), 0,
fsp->oplock_type);
/* Handle strange delete on close create semantics. */
return NT_STATUS_DELETE_PENDING;
}
- set_share_mode(lck, fsp, conn->session_info->utok.uid, 0, NO_OPLOCK);
+ set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK);
/*
* For directories the delete on close bit at open time seems
ZERO_STRUCT(qt);
/* access check */
- if (conn->session_info->utok.uid != 0) {
+ if (get_current_uid(conn) != 0) {
DEBUG(1,("get_user_quota: access_denied service [%s] user "
"[%s]\n", lp_servicename(SNUM(conn)),
conn->session_info->unix_name));
ZERO_STRUCT(qt);
/* access check */
- if (conn->session_info->utok.uid != 0) {
+ if (get_current_uid(conn) != 0) {
DEBUG(1,("set_user_quota: access_denied service [%s] user "
"[%s]\n", lp_servicename(SNUM(conn)),
conn->session_info->unix_name));
fsp.fnum = -1;
/* access check */
- if (conn->session_info->utok.uid != sec_initial_uid()) {
+ if (get_current_uid(conn) != 0) {
DEBUG(0,("set_user_quota: access_denied "
"service [%s] user [%s]\n",
lp_servicename(SNUM(conn)),
ZERO_STRUCT(quotas);
/* access check */
- if ((conn->session_info->utok.uid != sec_initial_uid())
- ||!CAN_WRITE(conn)) {
+ if ((get_current_uid(conn) != 0) || !CAN_WRITE(conn)) {
DEBUG(0,("set_user_quota: access_denied service [%s] user [%s]\n",
lp_servicename(SNUM(conn)),
conn->session_info->unix_name));