blob: b316d6ec4153e53eb4e1cd8a7b62c187a4d4942d [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <stdarg.h>
18#include <stdlib.h>
19#include <stdio.h>
20#include <string.h>
21#include <fcntl.h>
22#include <ctype.h>
23#include <errno.h>
Colin Cross504bc512010-04-13 19:35:09 -070024#include <time.h>
Nick Kralevichae76f6d2013-07-11 15:38:26 -070025#include <ftw.h>
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080026
Stephen Smalleye46f9d52012-01-13 08:48:47 -050027#include <selinux/label.h>
Stephen Smalleydbd37f22014-01-28 10:34:09 -050028#include <selinux/android.h>
Stephen Smalleye46f9d52012-01-13 08:48:47 -050029
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080030#include <sys/stat.h>
31#include <sys/types.h>
32#include <sys/socket.h>
33#include <sys/un.h>
34
Dan Albertc007bc32015-03-16 10:08:46 -070035#include <base/file.h>
Elliott Hughese5ce30f2015-05-06 19:19:24 -070036#include <base/strings.h>
Dan Albertc007bc32015-03-16 10:08:46 -070037
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080038/* for ANDROID_SOCKET_* */
39#include <cutils/sockets.h>
Andres Moralesdb5f5d42015-05-08 08:30:33 -070040#include <base/stringprintf.h>
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080041
42#include <private/android_filesystem_config.h>
43
Stephen Smalleye46f9d52012-01-13 08:48:47 -050044#include "init.h"
Colin Crossed8a7d82010-04-19 17:05:34 -070045#include "log.h"
Tom Cherryb7349902015-08-26 11:43:36 -070046#include "property_service.h"
Colin Crossf83d0b92010-04-21 12:04:20 -070047#include "util.h"
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080048
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080049/*
50 * android_name_to_id - returns the integer uid/gid associated with the given
Nick Kralevichd2104df2015-06-18 17:46:54 -070051 * name, or UINT_MAX on error.
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080052 */
53static unsigned int android_name_to_id(const char *name)
54{
Edwin Vanede7f1ad2012-07-26 14:09:13 -040055 const struct android_id_info *info = android_ids;
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080056 unsigned int n;
57
58 for (n = 0; n < android_id_count; n++) {
59 if (!strcmp(info[n].name, name))
60 return info[n].aid;
61 }
62
Nick Kralevichd2104df2015-06-18 17:46:54 -070063 return UINT_MAX;
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080064}
65
Nick Kralevichd2104df2015-06-18 17:46:54 -070066static unsigned int do_decode_uid(const char *s)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080067{
68 unsigned int v;
69
70 if (!s || *s == '\0')
Nick Kralevichd2104df2015-06-18 17:46:54 -070071 return UINT_MAX;
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080072 if (isalpha(s[0]))
73 return android_name_to_id(s);
74
75 errno = 0;
76 v = (unsigned int) strtoul(s, 0, 0);
77 if (errno)
Nick Kralevichd2104df2015-06-18 17:46:54 -070078 return UINT_MAX;
79 return v;
80}
81
82/*
83 * decode_uid - decodes and returns the given string, which can be either the
84 * numeric or name representation, into the integer uid or gid. Returns
85 * UINT_MAX on error.
86 */
87unsigned int decode_uid(const char *s) {
88 unsigned int v = do_decode_uid(s);
89 if (v == UINT_MAX) {
90 ERROR("decode_uid: Unable to find UID for '%s'. Returning UINT_MAX\n", s);
91 }
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080092 return v;
93}
94
95/*
96 * create_socket - creates a Unix domain socket in ANDROID_SOCKET_DIR
97 * ("/dev/socket") as dictated in init.rc. This socket is inherited by the
98 * daemon. We communicate the file descriptor's value via the environment
99 * variable ANDROID_SOCKET_ENV_PREFIX<name> ("ANDROID_SOCKET_foo").
100 */
Stephen Smalley8348d272013-05-13 12:37:04 -0400101int create_socket(const char *name, int type, mode_t perm, uid_t uid,
102 gid_t gid, const char *socketcon)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800103{
104 struct sockaddr_un addr;
105 int fd, ret;
Stephen Smalley8348d272013-05-13 12:37:04 -0400106 char *filecon;
107
108 if (socketcon)
109 setsockcreatecon(socketcon);
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800110
111 fd = socket(PF_UNIX, type, 0);
112 if (fd < 0) {
113 ERROR("Failed to open socket '%s': %s\n", name, strerror(errno));
114 return -1;
115 }
116
Stephen Smalley8348d272013-05-13 12:37:04 -0400117 if (socketcon)
118 setsockcreatecon(NULL);
119
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800120 memset(&addr, 0 , sizeof(addr));
121 addr.sun_family = AF_UNIX;
122 snprintf(addr.sun_path, sizeof(addr.sun_path), ANDROID_SOCKET_DIR"/%s",
123 name);
124
125 ret = unlink(addr.sun_path);
126 if (ret != 0 && errno != ENOENT) {
127 ERROR("Failed to unlink old socket '%s': %s\n", name, strerror(errno));
128 goto out_close;
129 }
130
Stephen Smalley8348d272013-05-13 12:37:04 -0400131 filecon = NULL;
Stephen Smalleye46f9d52012-01-13 08:48:47 -0500132 if (sehandle) {
Stephen Smalley8348d272013-05-13 12:37:04 -0400133 ret = selabel_lookup(sehandle, &filecon, addr.sun_path, S_IFSOCK);
Stephen Smalleye46f9d52012-01-13 08:48:47 -0500134 if (ret == 0)
Stephen Smalley8348d272013-05-13 12:37:04 -0400135 setfscreatecon(filecon);
Stephen Smalleye46f9d52012-01-13 08:48:47 -0500136 }
Stephen Smalleye46f9d52012-01-13 08:48:47 -0500137
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800138 ret = bind(fd, (struct sockaddr *) &addr, sizeof (addr));
139 if (ret) {
140 ERROR("Failed to bind socket '%s': %s\n", name, strerror(errno));
141 goto out_unlink;
142 }
143
Stephen Smalleye46f9d52012-01-13 08:48:47 -0500144 setfscreatecon(NULL);
Stephen Smalley8348d272013-05-13 12:37:04 -0400145 freecon(filecon);
Stephen Smalleye46f9d52012-01-13 08:48:47 -0500146
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800147 chown(addr.sun_path, uid, gid);
148 chmod(addr.sun_path, perm);
149
150 INFO("Created socket '%s' with mode '%o', user '%d', group '%d'\n",
151 addr.sun_path, perm, uid, gid);
152
153 return fd;
154
155out_unlink:
156 unlink(addr.sun_path);
157out_close:
158 close(fd);
159 return -1;
160}
161
Elliott Hughesf682b472015-02-06 12:19:48 -0800162bool read_file(const char* path, std::string* content) {
163 content->clear();
164
165 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY|O_NOFOLLOW|O_CLOEXEC));
166 if (fd == -1) {
167 return false;
168 }
169
170 // For security reasons, disallow world-writable
171 // or group-writable files.
Nick Kralevich38f368c2012-01-18 10:39:01 -0800172 struct stat sb;
Elliott Hughesf682b472015-02-06 12:19:48 -0800173 if (fstat(fd, &sb) == -1) {
174 ERROR("fstat failed for '%s': %s\n", path, strerror(errno));
175 return false;
Nick Kralevich38f368c2012-01-18 10:39:01 -0800176 }
177 if ((sb.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
Elliott Hughesf682b472015-02-06 12:19:48 -0800178 ERROR("skipping insecure file '%s'\n", path);
179 return false;
Nick Kralevich38f368c2012-01-18 10:39:01 -0800180 }
181
Dan Albertc007bc32015-03-16 10:08:46 -0700182 bool okay = android::base::ReadFdToString(fd, content);
Elliott Hughes9fc83432015-05-15 19:16:40 -0700183 close(fd);
Elliott Hughesf682b472015-02-06 12:19:48 -0800184 return okay;
185}
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800186
Elliott Hughesf682b472015-02-06 12:19:48 -0800187int write_file(const char* path, const char* content) {
188 int fd = TEMP_FAILURE_RETRY(open(path, O_WRONLY|O_CREAT|O_NOFOLLOW|O_CLOEXEC, 0600));
189 if (fd == -1) {
Nick Kralevicheedbe812015-04-25 14:10:03 -0700190 NOTICE("write_file: Unable to open '%s': %s\n", path, strerror(errno));
191 return -1;
Elliott Hughesf682b472015-02-06 12:19:48 -0800192 }
Nick Kralevicheedbe812015-04-25 14:10:03 -0700193 int result = android::base::WriteStringToFd(content, fd) ? 0 : -1;
194 if (result == -1) {
195 NOTICE("write_file: Unable to write to '%s': %s\n", path, strerror(errno));
196 }
Elliott Hughes9fc83432015-05-15 19:16:40 -0700197 close(fd);
Elliott Hughesf682b472015-02-06 12:19:48 -0800198 return result;
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -0800199}
200
Colin Crossf24ed8c2010-04-12 18:51:06 -0700201#define MAX_MTD_PARTITIONS 16
202
203static struct {
204 char name[16];
205 int number;
206} mtd_part_map[MAX_MTD_PARTITIONS];
207
208static int mtd_part_count = -1;
209
210static void find_mtd_partitions(void)
211{
212 int fd;
213 char buf[1024];
214 char *pmtdbufp;
215 ssize_t pmtdsize;
216 int r;
217
Nick Kralevich45a884f2015-02-02 14:37:22 -0800218 fd = open("/proc/mtd", O_RDONLY|O_CLOEXEC);
Colin Crossf24ed8c2010-04-12 18:51:06 -0700219 if (fd < 0)
220 return;
221
222 buf[sizeof(buf) - 1] = '\0';
223 pmtdsize = read(fd, buf, sizeof(buf) - 1);
224 pmtdbufp = buf;
225 while (pmtdsize > 0) {
226 int mtdnum, mtdsize, mtderasesize;
227 char mtdname[16];
228 mtdname[0] = '\0';
229 mtdnum = -1;
230 r = sscanf(pmtdbufp, "mtd%d: %x %x %15s",
231 &mtdnum, &mtdsize, &mtderasesize, mtdname);
232 if ((r == 4) && (mtdname[0] == '"')) {
233 char *x = strchr(mtdname + 1, '"');
234 if (x) {
235 *x = 0;
236 }
237 INFO("mtd partition %d, %s\n", mtdnum, mtdname + 1);
238 if (mtd_part_count < MAX_MTD_PARTITIONS) {
239 strcpy(mtd_part_map[mtd_part_count].name, mtdname + 1);
240 mtd_part_map[mtd_part_count].number = mtdnum;
241 mtd_part_count++;
242 } else {
243 ERROR("too many mtd partitions\n");
244 }
245 }
246 while (pmtdsize > 0 && *pmtdbufp != '\n') {
247 pmtdbufp++;
248 pmtdsize--;
249 }
250 if (pmtdsize > 0) {
251 pmtdbufp++;
252 pmtdsize--;
253 }
254 }
255 close(fd);
256}
257
258int mtd_name_to_number(const char *name)
259{
260 int n;
261 if (mtd_part_count < 0) {
262 mtd_part_count = 0;
263 find_mtd_partitions();
264 }
265 for (n = 0; n < mtd_part_count; n++) {
266 if (!strcmp(name, mtd_part_map[n].name)) {
267 return mtd_part_map[n].number;
268 }
269 }
270 return -1;
271}
Colin Cross504bc512010-04-13 19:35:09 -0700272
Elliott Hughesda40c002015-03-27 23:20:44 -0700273time_t gettime() {
274 timespec now;
275 clock_gettime(CLOCK_MONOTONIC, &now);
276 return now.tv_sec;
277}
Colin Cross504bc512010-04-13 19:35:09 -0700278
Elliott Hughesda40c002015-03-27 23:20:44 -0700279uint64_t gettime_ns() {
280 timespec now;
281 clock_gettime(CLOCK_MONOTONIC, &now);
282 return static_cast<uint64_t>(now.tv_sec) * UINT64_C(1000000000) + now.tv_nsec;
Colin Cross504bc512010-04-13 19:35:09 -0700283}
Colin Crossb0ab94b2010-04-08 16:16:20 -0700284
285int mkdir_recursive(const char *pathname, mode_t mode)
286{
287 char buf[128];
288 const char *slash;
289 const char *p = pathname;
290 int width;
291 int ret;
292 struct stat info;
293
294 while ((slash = strchr(p, '/')) != NULL) {
295 width = slash - pathname;
296 p = slash + 1;
297 if (width < 0)
298 break;
299 if (width == 0)
300 continue;
301 if ((unsigned int)width > sizeof(buf) - 1) {
302 ERROR("path too long for mkdir_recursive\n");
303 return -1;
304 }
305 memcpy(buf, pathname, width);
306 buf[width] = 0;
307 if (stat(buf, &info) != 0) {
Stephen Smalleye096e362012-06-11 13:37:39 -0400308 ret = make_dir(buf, mode);
Colin Crossb0ab94b2010-04-08 16:16:20 -0700309 if (ret && errno != EEXIST)
310 return ret;
311 }
312 }
Stephen Smalleye096e362012-06-11 13:37:39 -0400313 ret = make_dir(pathname, mode);
Colin Crossb0ab94b2010-04-08 16:16:20 -0700314 if (ret && errno != EEXIST)
315 return ret;
316 return 0;
317}
318
Johan Redestig93ca79b2012-04-18 16:41:19 +0200319/*
320 * replaces any unacceptable characters with '_', the
321 * length of the resulting string is equal to the input string
322 */
Colin Crossb0ab94b2010-04-08 16:16:20 -0700323void sanitize(char *s)
324{
Johan Redestig93ca79b2012-04-18 16:41:19 +0200325 const char* accept =
326 "abcdefghijklmnopqrstuvwxyz"
327 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
328 "0123456789"
329 "_-.";
330
Colin Crossb0ab94b2010-04-08 16:16:20 -0700331 if (!s)
332 return;
Johan Redestig93ca79b2012-04-18 16:41:19 +0200333
Christopher R. Palmer07f3fee2014-09-22 14:35:54 -0400334 while (*s) {
Johan Redestig93ca79b2012-04-18 16:41:19 +0200335 s += strspn(s, accept);
Christopher R. Palmer07f3fee2014-09-22 14:35:54 -0400336 if (*s) *s++ = '_';
Johan Redestig93ca79b2012-04-18 16:41:19 +0200337 }
Colin Crossb0ab94b2010-04-08 16:16:20 -0700338}
Johan Redestig93ca79b2012-04-18 16:41:19 +0200339
Chris Fries79f33842013-09-05 13:19:21 -0500340void make_link_init(const char *oldpath, const char *newpath)
Colin Crossb0ab94b2010-04-08 16:16:20 -0700341{
342 int ret;
343 char buf[256];
344 char *slash;
345 int width;
346
347 slash = strrchr(newpath, '/');
348 if (!slash)
349 return;
350 width = slash - newpath;
351 if (width <= 0 || width > (int)sizeof(buf) - 1)
352 return;
353 memcpy(buf, newpath, width);
354 buf[width] = 0;
355 ret = mkdir_recursive(buf, 0755);
356 if (ret)
357 ERROR("Failed to create directory %s: %s (%d)\n", buf, strerror(errno), errno);
358
359 ret = symlink(oldpath, newpath);
360 if (ret && errno != EEXIST)
361 ERROR("Failed to symlink %s to %s: %s (%d)\n", oldpath, newpath, strerror(errno), errno);
362}
363
364void remove_link(const char *oldpath, const char *newpath)
365{
366 char path[256];
367 ssize_t ret;
368 ret = readlink(newpath, path, sizeof(path) - 1);
369 if (ret <= 0)
370 return;
371 path[ret] = 0;
372 if (!strcmp(path, oldpath))
373 unlink(newpath);
374}
Colin Crosscd0f1732010-04-19 17:10:24 -0700375
376int wait_for_file(const char *filename, int timeout)
377{
378 struct stat info;
Thierry Strudel91cf41c2015-05-22 15:56:14 -0700379 uint64_t timeout_time_ns = gettime_ns() + timeout * UINT64_C(1000000000);
Colin Crosscd0f1732010-04-19 17:10:24 -0700380 int ret = -1;
381
Thierry Strudel91cf41c2015-05-22 15:56:14 -0700382 while (gettime_ns() < timeout_time_ns && ((ret = stat(filename, &info)) < 0))
Colin Crosscd0f1732010-04-19 17:10:24 -0700383 usleep(10000);
384
385 return ret;
386}
Colin Crossf83d0b92010-04-21 12:04:20 -0700387
388void open_devnull_stdio(void)
389{
Nick Kraleviche34577c2015-04-25 16:24:53 -0700390 // Try to avoid the mknod() call if we can. Since SELinux makes
391 // a /dev/null replacement available for free, let's use it.
392 int fd = open("/sys/fs/selinux/null", O_RDWR);
393 if (fd == -1) {
394 // OOPS, /sys/fs/selinux/null isn't available, likely because
395 // /sys/fs/selinux isn't mounted. Fall back to mknod.
396 static const char *name = "/dev/__null__";
397 if (mknod(name, S_IFCHR | 0600, (1 << 8) | 3) == 0) {
398 fd = open(name, O_RDWR);
399 unlink(name);
400 }
401 if (fd == -1) {
402 exit(1);
Colin Crossf83d0b92010-04-21 12:04:20 -0700403 }
404 }
405
Nick Kraleviche34577c2015-04-25 16:24:53 -0700406 dup2(fd, 0);
407 dup2(fd, 1);
408 dup2(fd, 2);
409 if (fd > 2) {
410 close(fd);
411 }
Colin Crossf83d0b92010-04-21 12:04:20 -0700412}
413
Elliott Hughese5ce30f2015-05-06 19:19:24 -0700414void import_kernel_cmdline(bool in_qemu,
415 std::function<void(const std::string&, const std::string&, bool)> fn) {
416 std::string cmdline;
417 android::base::ReadFileToString("/proc/cmdline", &cmdline);
Vladimir Chtchetkine2b995432011-09-28 09:55:31 -0700418
Elliott Hughese5ce30f2015-05-06 19:19:24 -0700419 for (const auto& entry : android::base::Split(android::base::Trim(cmdline), " ")) {
420 std::vector<std::string> pieces = android::base::Split(entry, "=");
421 if (pieces.size() == 2) {
422 fn(pieces[0], pieces[1], in_qemu);
423 }
Vladimir Chtchetkine2b995432011-09-28 09:55:31 -0700424 }
425}
Stephen Smalleye096e362012-06-11 13:37:39 -0400426
427int make_dir(const char *path, mode_t mode)
428{
429 int rc;
430
Stephen Smalleye096e362012-06-11 13:37:39 -0400431 char *secontext = NULL;
432
433 if (sehandle) {
434 selabel_lookup(sehandle, &secontext, path, mode);
435 setfscreatecon(secontext);
436 }
Stephen Smalleye096e362012-06-11 13:37:39 -0400437
438 rc = mkdir(path, mode);
439
Stephen Smalleye096e362012-06-11 13:37:39 -0400440 if (secontext) {
441 int save_errno = errno;
442 freecon(secontext);
443 setfscreatecon(NULL);
444 errno = save_errno;
445 }
Kenny Rootb5982bf2012-10-16 23:07:05 -0700446
Stephen Smalleye096e362012-06-11 13:37:39 -0400447 return rc;
448}
449
Stephen Smalleydbd37f22014-01-28 10:34:09 -0500450int restorecon(const char* pathname)
Stephen Smalleye096e362012-06-11 13:37:39 -0400451{
Stephen Smalley27a93652014-02-07 09:14:13 -0500452 return selinux_android_restorecon(pathname, 0);
Nick Kralevichae76f6d2013-07-11 15:38:26 -0700453}
454
455int restorecon_recursive(const char* pathname)
456{
Stephen Smalley27a93652014-02-07 09:14:13 -0500457 return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE);
Nick Kralevichae76f6d2013-07-11 15:38:26 -0700458}
Andres Moralesdb5f5d42015-05-08 08:30:33 -0700459
460/*
461 * Writes hex_len hex characters (1/2 byte) to hex from bytes.
462 */
463std::string bytes_to_hex(const uint8_t* bytes, size_t bytes_len) {
464 std::string hex("0x");
465 for (size_t i = 0; i < bytes_len; i++)
466 android::base::StringAppendF(&hex, "%02x", bytes[i]);
467 return hex;
468}
Lee Campbellf13b1b32015-07-24 16:57:14 -0700469
470/*
471 * Returns true is pathname is a directory
472 */
473bool is_dir(const char* pathname) {
474 struct stat info;
475 if (stat(pathname, &info) == -1) {
476 return false;
477 }
478 return S_ISDIR(info.st_mode);
479}
Tom Cherryb7349902015-08-26 11:43:36 -0700480
481bool expand_props(const std::string& src, std::string* dst) {
482 const char* src_ptr = src.c_str();
483
484 if (!dst) {
485 return false;
486 }
487
488 /* - variables can either be $x.y or ${x.y}, in case they are only part
489 * of the string.
490 * - will accept $$ as a literal $.
491 * - no nested property expansion, i.e. ${foo.${bar}} is not supported,
492 * bad things will happen
493 */
494 while (*src_ptr) {
495 const char* c;
496
497 c = strchr(src_ptr, '$');
498 if (!c) {
499 dst->append(src_ptr);
500 return true;
501 }
502
503 dst->append(src_ptr, c);
504 c++;
505
506 if (*c == '$') {
507 dst->push_back(*(c++));
508 src_ptr = c;
509 continue;
510 } else if (*c == '\0') {
511 return true;
512 }
513
514 std::string prop_name;
515 if (*c == '{') {
516 c++;
517 const char* end = strchr(c, '}');
518 if (!end) {
519 // failed to find closing brace, abort.
520 ERROR("unexpected end of string in '%s', looking for }\n", src.c_str());
521 return false;
522 }
523 prop_name = std::string(c, end);
524 c = end + 1;
525 } else {
526 prop_name = c;
527 ERROR("using deprecated syntax for specifying property '%s', use ${name} instead\n",
528 c);
529 c += prop_name.size();
530 }
531
532 if (prop_name.empty()) {
533 ERROR("invalid zero-length prop name in '%s'\n", src.c_str());
534 return false;
535 }
536
537 std::string prop_val = property_get(prop_name.c_str());
538 if (prop_val.empty()) {
539 ERROR("property '%s' doesn't exist while expanding '%s'\n",
540 prop_name.c_str(), src.c_str());
541 return false;
542 }
543
544 dst->append(prop_val);
545 src_ptr = c;
546 }
547
548 return true;
549}