~ubuntu-branches/ubuntu/gutsy/samba/gutsy-updates

« back to all changes in this revision

Viewing changes to source/smbd/conn.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2006-11-28 20:14:37 UTC
  • mfrom: (0.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128201437-a6x4lzlhempazocp
Tags: 3.0.23d-1ubuntu1
* Merge from debian unstable.
* Drop python2.4-samba, replace with python-samba. Added Conflicts/Replaces
  on python2.4-samba
* Drop track-connection-dos.patch, ubuntu-winbind-panic.patch, 
  ubuntu-fix-ldap.patch, ubuntu-setlocale.patch, ubuntu-setlocale-fixes.patch
* Remaining Ubuntu changes:
  - Revert Debian's installation of mount.cifs and umount.cifs as suid
  - Comment out the default [homes] shares and add more verbose comments to
    explain what they do and how they work (closes: launchpad.net/27608)
  - Add a "valid users = %S" stanza to the commented-out [homes] section, to
    show users how to restrict access to \\server\username to only username.
  - Change the (commented-out) "printer admin" example to use "@lpadmin"
    instead of "@ntadmin", since the lpadmin group is used for spool admin.
  - Alter the panic-action script to encourage users to report their
    bugs in Ubuntu packages to Ubuntu, rather than reporting to Debian.
    Modify text to more closely match the Debian script
  - Munge our init script to deal with the fact that our implementation
    (or lack thereof) of log_daemon_msg and log_progress_msg differs
    from Debian's implementation of the same (Ubuntu #19691)
  - Kept ubuntu-auxsrc.patch: some auxilliary sources (undocumented in 
    previous changelogs)
  - Set default workgroup to MSHOME

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
                        oldsz, newsz));
118
118
 
119
119
                nbmap = bitmap_allocate(newsz);
 
120
                if (!nbmap) {
 
121
                        DEBUG(0,("ERROR! malloc fail.\n"));
 
122
                        return NULL;
 
123
                }
120
124
 
121
125
                bitmap_copy(nbmap, bmap);
122
126
                bitmap_free(bmap);
154
158
}
155
159
 
156
160
/****************************************************************************
157
 
close all conn structures
 
161
 Close all conn structures.
158
162
****************************************************************************/
 
163
 
159
164
void conn_close_all(void)
160
165
{
161
166
        connection_struct *conn, *next;
178
183
 
179
184
        for (conn=Connections;conn;conn=next) {
180
185
                next=conn->next;
 
186
 
 
187
                /* Update if connection wasn't idle. */
 
188
                if (conn->lastused != conn->lastused_count) {
 
189
                        conn->lastused = t;
 
190
                        conn->lastused_count = t;
 
191
                }
 
192
 
181
193
                /* close dirptrs on connections that are idle */
182
 
                if ((t-conn->lastused) > DPTR_IDLE_TIMEOUT)
 
194
                if ((t-conn->lastused) > DPTR_IDLE_TIMEOUT) {
183
195
                        dptr_idlecnum(conn);
 
196
                }
184
197
 
185
 
                if (conn->num_files_open > 0 || 
186
 
                    (t-conn->lastused)<deadtime)
 
198
                if (conn->num_files_open > 0 || (t-conn->lastused)<deadtime) {
187
199
                        allidle = False;
 
200
                }
188
201
        }
189
202
 
190
203
        /*
249
262
        }
250
263
 
251
264
        if (conn->nt_user_token) {
252
 
                delete_nt_token(&(conn->nt_user_token));
 
265
                TALLOC_FREE(conn->nt_user_token);
253
266
        }
254
267
 
255
268
        free_namearray(conn->veto_list);