Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/file/file.h
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | 95 | private: | |||
---|---|---|---|---|---|
98 | int setACL(const char *path, mode_t perm, bool _directoryDefault); | 98 | int setACL(const char *path, mode_t perm, bool _directoryDefault); | ||
99 | QString getUserName(KUserId uid) const; | 99 | QString getUserName(KUserId uid) const; | ||
100 | QString getGroupName(KGroupId gid) const; | 100 | QString getGroupName(KGroupId gid) const; | ||
101 | bool deleteRecursive(const QString &path); | 101 | bool deleteRecursive(const QString &path); | ||
102 | 102 | | |||
103 | void fileSystemFreeSpace(const QUrl &url); // KF6 TODO: Turn into virtual method in SlaveBase | 103 | void fileSystemFreeSpace(const QUrl &url); // KF6 TODO: Turn into virtual method in SlaveBase | ||
104 | 104 | | |||
105 | bool privilegeOperationUnitTestMode(); | 105 | bool privilegeOperationUnitTestMode(); | ||
106 | PrivilegeOperationReturnValue execWithElevatedPrivilege(ActionType action, const QVariant &arg1, | 106 | PrivilegeOperationReturnValue execWithElevatedPrivilege(ActionType action, const QVariantList &args, int errcode); | ||
thiago: This change should be in a separate commit. I can't tell what you're doing specifically to fix… | |||||
The fixes in this commit uncovered a design issue in the code which this fixes. fvogt: The fixes in this commit uncovered a design issue in the code which this fixes.
It could… | |||||
107 | const QVariant &arg2 = QVariant(), | 107 | PrivilegeOperationReturnValue tryOpen(QFile &f, const QByteArray &path, int flags, int mode, int errcode); | ||
108 | const QVariant &arg3 = QVariant()); | | |||
109 | PrivilegeOperationReturnValue tryOpen(QFile &f, const QByteArray &path, int flags, int mode); | | |||
110 | 108 | | |||
111 | // We want to execute chmod/chown/utime with elevated privileges (in copy & put) | 109 | // We want to execute chmod/chown/utime with elevated privileges (in copy & put) | ||
112 | // only during the brief period privileges are elevated. If it's not the case show | 110 | // only during the brief period privileges are elevated. If it's not the case show | ||
113 | // a warning and continue. | 111 | // a warning and continue. | ||
114 | PrivilegeOperationReturnValue tryChangeFileAttr(ActionType action, const QVariant &arg1, | 112 | PrivilegeOperationReturnValue tryChangeFileAttr(ActionType action, const QVariantList &args, int errcode); | ||
115 | const QVariant &arg2, const QVariant &arg3 = QVariant()); | | |||
116 | private: | 113 | private: | ||
117 | mutable QHash<KUserId, QString> mUsercache; | 114 | mutable QHash<KUserId, QString> mUsercache; | ||
118 | mutable QHash<KGroupId, QString> mGroupcache; | 115 | mutable QHash<KGroupId, QString> mGroupcache; | ||
119 | QFile *mFile; | 116 | QFile *mFile; | ||
120 | }; | 117 | }; | ||
121 | 118 | | |||
122 | #endif | 119 | #endif |
This change should be in a separate commit. I can't tell what you're doing specifically to fix the bug with so much noise in this commit.