This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Revision History:
int i;
if (dbuf.dsize < sizeof(struct locking_data)) {
- smb_panic("PANIC: parse_share_modes: buffer too short.\n");
+ smb_panic("parse_share_modes: buffer too short");
}
data = (struct locking_data *)dbuf.dptr;
if ((lck->num_share_modes < 0) || (lck->num_share_modes > 1000000)) {
DEBUG(0, ("invalid number of share modes: %d\n",
lck->num_share_modes));
- smb_panic("PANIC: invalid number of share modes");
+ smb_panic("parse_share_modes: invalid number of share modes");
}
lck->share_modes = NULL;
if (dbuf.dsize < (sizeof(struct locking_data) +
(lck->num_share_modes *
sizeof(struct share_mode_entry)))) {
- smb_panic("PANIC: parse_share_modes: buffer too short.\n");
+ smb_panic("parse_share_modes: buffer too short");
}
lck->share_modes = (struct share_mode_entry *)
sizeof(struct share_mode_entry));
if (lck->share_modes == NULL) {
- smb_panic("talloc failed\n");
+ smb_panic("parse_share_modes: talloc failed");
}
}
((data->u.s.delete_token_size - sizeof(uid_t)) % sizeof(gid_t)) != 0) {
DEBUG(0, ("parse_share_modes: invalid token size %d\n",
data->u.s.delete_token_size));
- smb_panic("parse_share_modes: invalid token size\n");
+ smb_panic("parse_share_modes: invalid token size");
}
lck->delete_token = TALLOC_P(lck, UNIX_USER_TOKEN);
if (!lck->delete_token) {
- smb_panic("talloc failed\n");
+ smb_panic("parse_share_modes: talloc failed");
}
/* Copy out the uid and gid. */
lck->delete_token->groups = TALLOC_ARRAY(lck->delete_token, gid_t,
lck->delete_token->ngroups);
if (!lck->delete_token) {
- smb_panic("talloc failed\n");
+ smb_panic("parse_share_modes: talloc failed");
}
for (i = 0; i < lck->delete_token->ngroups; i++) {
sizeof(struct share_mode_entry)) +
data->u.s.delete_token_size );
if (lck->servicepath == NULL) {
- smb_panic("talloc_strdup failed\n");
+ smb_panic("parse_share_modes: talloc_strdup failed");
}
lck->filename = talloc_strdup(lck, (const char *)dbuf.dptr + sizeof(*data) +
data->u.s.delete_token_size +
strlen(lck->servicepath) + 1 );
if (lck->filename == NULL) {
- smb_panic("talloc_strdup failed\n");
+ smb_panic("parse_share_modes: talloc_strdup failed");
}
/*
result.dptr = TALLOC_ARRAY(lck, uint8, result.dsize);
if (result.dptr == NULL) {
- smb_panic("talloc failed\n");
+ smb_panic("talloc failed");
}
data = (struct locking_data *)result.dptr;
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("delete_rec returned %s\n",
nt_errstr(status)));
- smb_panic("Could not delete share entry\n");
+ smb_panic("could not delete share entry");
}
}
goto done;
status = lck->record->store(lck->record, data, TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("store returned %s\n", nt_errstr(status)));
- smb_panic("Could not store share mode entry\n");
+ smb_panic("could not store share mode entry");
}
done: