~lefteris-nikoltsios/+junk/samba-lp1016895

« back to all changes in this revision

Viewing changes to source4/lib/registry/interface.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
/** Obtain name of specific hkey. */
45
45
_PUBLIC_ const char *reg_get_predef_name(uint32_t hkey)
46
46
{
47
 
        int i;
 
47
        unsigned int i;
48
48
        for (i = 0; reg_predefined_keys[i].name; i++) {
49
49
                if (reg_predefined_keys[i].handle == hkey)
50
50
                        return reg_predefined_keys[i].name;
58
58
                                               const char *name,
59
59
                                               struct registry_key **key)
60
60
{
61
 
        int i;
 
61
        unsigned int i;
62
62
 
63
63
        for (i = 0; reg_predefined_keys[i].name; i++) {
64
64
                if (!strcasecmp(reg_predefined_keys[i].name, name))
150
150
 */
151
151
_PUBLIC_ WERROR reg_key_get_subkey_by_index(TALLOC_CTX *mem_ctx,
152
152
                                            const struct registry_key *key,
153
 
                                            int idx, const char **name,
 
153
                                            uint32_t idx, const char **name,
154
154
                                            const char **keyclass,
155
155
                                            NTTIME *last_changed_time)
156
156
{
185
185
/**
186
186
 * Delete a key.
187
187
 */
188
 
_PUBLIC_ WERROR reg_key_del(struct registry_key *parent, const char *name)
 
188
_PUBLIC_ WERROR reg_key_del(TALLOC_CTX *mem_ctx, struct registry_key *parent,
 
189
                            const char *name)
189
190
{
190
191
        if (parent == NULL)
191
192
                return WERR_INVALID_PARAM;
193
194
        if (parent->context->ops->delete_key == NULL)
194
195
                return WERR_NOT_SUPPORTED;
195
196
 
196
 
        return parent->context->ops->delete_key(parent, name);
 
197
        return parent->context->ops->delete_key(mem_ctx, parent, name);
197
198
}
198
199
 
199
200
/**
201
202
 */
202
203
_PUBLIC_ WERROR reg_key_add_name(TALLOC_CTX *mem_ctx,
203
204
                                 struct registry_key *parent,
204
 
                                 const char *name, const char *key_class,
 
205
                                 const char *path, const char *key_class,
205
206
                                 struct security_descriptor *desc,
206
207
                                 struct registry_key **newkey)
207
208
{
214
215
                return WERR_NOT_SUPPORTED;
215
216
        }
216
217
 
217
 
        return parent->context->ops->create_key(mem_ctx, parent, name,
 
218
        return parent->context->ops->create_key(mem_ctx, parent, path,
218
219
                                                key_class, desc, newkey);
219
220
}
220
221
 
257
258
/**
258
259
 * Delete a value.
259
260
 */
260
 
_PUBLIC_ WERROR reg_del_value(struct registry_key *key, const char *valname)
 
261
_PUBLIC_ WERROR reg_del_value(TALLOC_CTX *mem_ctx, struct registry_key *key,
 
262
                              const char *valname)
261
263
{
262
264
        if (key == NULL)
263
265
                return WERR_INVALID_PARAM;
265
267
        if (key->context->ops->delete_value == NULL)
266
268
                return WERR_NOT_SUPPORTED;
267
269
 
268
 
        return key->context->ops->delete_value(key, valname);
 
270
        return key->context->ops->delete_value(mem_ctx, key, valname);
269
271
}
270
272
 
271
273
/**